Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety-progress
Commits
d3c5d727
Commit
d3c5d727
authored
Apr 24, 2022
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
echars地图改成平山地图
parent
92182f4f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5935 additions
and
63 deletions
+5935
-63
pingshan.js
gassafetyprogress-web/src/utils/echarsMap/pingshan.js
+5824
-0
CharBoxE.vue
...c/views/statistic/overview/conponents/Middle/CharBoxE.vue
+111
-63
No files found.
gassafetyprogress-web/src/utils/echarsMap/pingshan.js
0 → 100644
View file @
d3c5d727
This diff is collapsed.
Click to expand it.
gassafetyprogress-web/src/views/statistic/overview/conponents/Middle/CharBoxE.vue
View file @
d3c5d727
<!--
* @Author: your name
* @Date: 2022-04-21 09:47:01
* @LastEditTime: 2022-04-2
1 16:56:49
* @LastEditTime: 2022-04-2
4 09:29:53
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/statistic/overview/conponents/Middle/CharBoxE.vue
...
...
@@ -15,12 +15,11 @@
<
script
>
import
Chars
from
"@/components/allCharsCom/Chars"
;
import
Infowindow
from
"./Infowindow"
;
import
{
pingshanArr
}
from
"@/utils/echarsMap/pingshan"
;
import
axios
from
"axios"
;
const
data
=
[
{
name
:
"中西区"
,
value
:
20057.34
,
name
:
"古月镇"
,
index
:
0
,
a
:
1
,
b
:
1
,
...
...
@@ -33,8 +32,7 @@ const data = [
i
:
"1/2"
,
},
{
name
:
"湾仔"
,
value
:
15477.48
,
name
:
"西柏坡镇"
,
index
:
1
,
a
:
2
,
b
:
2
,
...
...
@@ -47,8 +45,7 @@ const data = [
i
:
"2/3"
,
},
{
name
:
"东区"
,
value
:
31686.1
,
name
:
"温塘镇"
,
index
:
2
,
a
:
3
,
b
:
3
,
...
...
@@ -61,8 +58,7 @@ const data = [
i
:
"3/4"
,
},
{
name
:
"南区"
,
value
:
6992.6
,
name
:
"平山镇"
,
index
:
3
,
a
:
4
,
b
:
4
,
...
...
@@ -75,8 +71,7 @@ const data = [
i
:
"4/5"
,
},
{
name
:
"油尖旺"
,
value
:
44045.49
,
name
:
"东回舍镇"
,
index
:
4
,
a
:
5
,
b
:
5
,
...
...
@@ -89,8 +84,7 @@ const data = [
i
:
"5/6"
,
},
{
name
:
"深水埗"
,
value
:
40689.64
,
name
:
"西大吴乡"
,
index
:
5
,
a
:
6
,
b
:
6
,
...
...
@@ -103,8 +97,7 @@ const data = [
i
:
"6/7"
,
},
{
name
:
"九龙城"
,
value
:
37659.78
,
name
:
"岗南镇"
,
index
:
6
,
a
:
7
,
b
:
7
,
...
...
@@ -117,8 +110,7 @@ const data = [
i
:
"7/8"
,
},
{
name
:
"黄大仙"
,
value
:
45180.97
,
name
:
"杨家桥乡"
,
index
:
7
,
a
:
8
,
b
:
8
,
...
...
@@ -131,8 +123,7 @@ const data = [
i
:
"8/9"
,
},
{
name
:
"观塘"
,
value
:
55204.26
,
name
:
"下口镇"
,
index
:
8
,
a
:
9
,
b
:
9
,
...
...
@@ -145,8 +136,7 @@ const data = [
i
:
"9/10"
,
},
{
name
:
"葵青"
,
value
:
21900.9
,
name
:
"北冶乡"
,
index
:
9
,
a
:
10
,
b
:
10
,
...
...
@@ -159,8 +149,7 @@ const data = [
i
:
"10/11"
,
},
{
name
:
"荃湾"
,
value
:
4918.26
,
name
:
"小觉镇"
,
index
:
10
,
a
:
11
,
b
:
11
,
...
...
@@ -173,8 +162,7 @@ const data = [
i
:
"11/12"
,
},
{
name
:
"屯门"
,
value
:
5881.84
,
name
:
"下槐镇"
,
index
:
11
,
a
:
12
,
b
:
12
,
...
...
@@ -187,8 +175,7 @@ const data = [
i
:
"12/13"
,
},
{
name
:
"元朗"
,
value
:
4178.01
,
name
:
"上三汲乡"
,
index
:
12
,
a
:
13
,
b
:
13
,
...
...
@@ -201,8 +188,7 @@ const data = [
i
:
"13/14"
,
},
{
name
:
"北区"
,
value
:
2227.92
,
name
:
"两河乡"
,
index
:
13
,
a
:
14
,
b
:
14
,
...
...
@@ -215,8 +201,7 @@ const data = [
i
:
"14/15"
,
},
{
name
:
"大埔"
,
value
:
2180.98
,
name
:
"南甸镇"
,
index
:
14
,
a
:
15
,
b
:
15
,
...
...
@@ -229,8 +214,7 @@ const data = [
i
:
"15/16"
,
},
{
name
:
"沙田"
,
value
:
9172.94
,
name
:
"东王坡乡"
,
index
:
15
,
a
:
16
,
b
:
16
,
...
...
@@ -243,8 +227,7 @@ const data = [
i
:
"16/17"
,
},
{
name
:
"西贡"
,
value
:
3368
,
name
:
"苏家庄乡"
,
index
:
16
,
a
:
17
,
b
:
17
,
...
...
@@ -257,8 +240,7 @@ const data = [
i
:
"17/18"
,
},
{
name
:
"离岛"
,
value
:
806.98
,
name
:
"合河口乡"
,
index
:
17
,
a
:
18
,
b
:
18
,
...
...
@@ -270,6 +252,71 @@ const data = [
h
:
"18/19"
,
i
:
"18/19"
,
},
{
name
:
"蛟潭庄镇"
,
index
:
18
,
a
:
19
,
b
:
19
,
c
:
19
,
d
:
19
,
e
:
19
,
f
:
19
,
g
:
"19/20"
,
h
:
"19/20"
,
i
:
"19/20"
,
},
{
name
:
"上观音堂乡"
,
index
:
19
,
a
:
20
,
b
:
20
,
c
:
20
,
d
:
20
,
e
:
20
,
f
:
20
,
g
:
"20/21"
,
h
:
"20/21"
,
i
:
"20/21"
,
},
{
name
:
"营里乡"
,
index
:
20
,
a
:
21
,
b
:
21
,
c
:
21
,
d
:
21
,
e
:
21
,
f
:
21
,
g
:
"21/22"
,
h
:
"21/22"
,
i
:
"21/22"
,
},
{
name
:
"孟家庄乡"
,
index
:
21
,
a
:
22
,
b
:
22
,
c
:
22
,
d
:
22
,
e
:
22
,
f
:
22
,
g
:
"22/23"
,
h
:
"22/23"
,
i
:
"22/23"
,
},
{
name
:
"宅北乡"
,
index
:
22
,
a
:
23
,
b
:
23
,
c
:
23
,
d
:
23
,
e
:
23
,
f
:
23
,
g
:
"23/24"
,
h
:
"23/24"
,
i
:
"23/24"
,
},
];
export
default
{
...
...
@@ -294,10 +341,11 @@ export default {
},
methods
:
{
async
getPath
()
{
const
res
=
await
axios
(
"https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/HK.json"
);
const
geoJson
=
res
.
data
;
// const res = await axios(
// "https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/HK.json"
// );
const
geoJson
=
{
features
:
pingshanArr
,
type
:
"FeatureCollection"
};
console
.
log
(
geoJson
);
this
.
$echarts
.
registerMap
(
"HK"
,
geoJson
);
this
.
options
=
{
roam
:
true
,
...
...
@@ -308,7 +356,7 @@ export default {
// alwaysShowContent: true,
// transitionDuration:0,
formatter
:
(
p
)
=>
{
console
.
log
(
"p"
,
p
)
console
.
log
(
"p"
,
p
);
const
dom
=
this
.
createDom
(
p
.
data
,
this
);
return
dom
;
},
...
...
@@ -365,26 +413,26 @@ export default {
},
data
,
// 自定义名称映射
nameMap
:
{
"Central and Western"
:
"中西区"
,
Eastern
:
"东区"
,
Islands
:
"离岛"
,
"Kowloon City"
:
"九龙城"
,
"Kwai Tsing"
:
"葵青"
,
"Kwun Tong"
:
"观塘"
,
North
:
"北区"
,
"Sai Kung"
:
"西贡"
,
"Sha Tin"
:
"沙田"
,
"Sham Shui Po"
:
"深水埗"
,
Southern
:
"南区"
,
"Tai Po"
:
"大埔"
,
"Tsuen Wan"
:
"荃湾"
,
"Tuen Mun"
:
"屯门"
,
"Wan Chai"
:
"湾仔"
,
"Wong Tai Sin"
:
"黄大仙"
,
"Yau Tsim Mong"
:
"油尖旺"
,
"Yuen Long"
:
"元朗"
,
},
//
nameMap: {
//
"Central and Western": "中西区",
//
Eastern: "东区",
//
Islands: "离岛",
//
"Kowloon City": "九龙城",
//
"Kwai Tsing": "葵青",
//
"Kwun Tong": "观塘",
//
North: "北区",
//
"Sai Kung": "西贡",
//
"Sha Tin": "沙田",
//
"Sham Shui Po": "深水埗",
//
Southern: "南区",
//
"Tai Po": "大埔",
//
"Tsuen Wan": "荃湾",
//
"Tuen Mun": "屯门",
//
"Wan Chai": "湾仔",
//
"Wong Tai Sin": "黄大仙",
//
"Yau Tsim Mong": "油尖旺",
//
"Yuen Long": "元朗",
//
},
},
],
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment