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
* @Author: your name
* @Date: 2022-04-21 09:47:01
* @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
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @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
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/statistic/overview/conponents/Middle/CharBoxE.vue
...
@@ -15,12 +15,11 @@
...
@@ -15,12 +15,11 @@
<
script
>
<
script
>
import
Chars
from
"@/components/allCharsCom/Chars"
;
import
Chars
from
"@/components/allCharsCom/Chars"
;
import
Infowindow
from
"./Infowindow"
;
import
Infowindow
from
"./Infowindow"
;
import
{
pingshanArr
}
from
"@/utils/echarsMap/pingshan"
;
import
axios
from
"axios"
;
import
axios
from
"axios"
;
const
data
=
[
const
data
=
[
{
{
name
:
"中西区"
,
name
:
"古月镇"
,
value
:
20057.34
,
index
:
0
,
index
:
0
,
a
:
1
,
a
:
1
,
b
:
1
,
b
:
1
,
...
@@ -33,8 +32,7 @@ const data = [
...
@@ -33,8 +32,7 @@ const data = [
i
:
"1/2"
,
i
:
"1/2"
,
},
},
{
{
name
:
"湾仔"
,
name
:
"西柏坡镇"
,
value
:
15477.48
,
index
:
1
,
index
:
1
,
a
:
2
,
a
:
2
,
b
:
2
,
b
:
2
,
...
@@ -47,8 +45,7 @@ const data = [
...
@@ -47,8 +45,7 @@ const data = [
i
:
"2/3"
,
i
:
"2/3"
,
},
},
{
{
name
:
"东区"
,
name
:
"温塘镇"
,
value
:
31686.1
,
index
:
2
,
index
:
2
,
a
:
3
,
a
:
3
,
b
:
3
,
b
:
3
,
...
@@ -61,8 +58,7 @@ const data = [
...
@@ -61,8 +58,7 @@ const data = [
i
:
"3/4"
,
i
:
"3/4"
,
},
},
{
{
name
:
"南区"
,
name
:
"平山镇"
,
value
:
6992.6
,
index
:
3
,
index
:
3
,
a
:
4
,
a
:
4
,
b
:
4
,
b
:
4
,
...
@@ -75,8 +71,7 @@ const data = [
...
@@ -75,8 +71,7 @@ const data = [
i
:
"4/5"
,
i
:
"4/5"
,
},
},
{
{
name
:
"油尖旺"
,
name
:
"东回舍镇"
,
value
:
44045.49
,
index
:
4
,
index
:
4
,
a
:
5
,
a
:
5
,
b
:
5
,
b
:
5
,
...
@@ -89,8 +84,7 @@ const data = [
...
@@ -89,8 +84,7 @@ const data = [
i
:
"5/6"
,
i
:
"5/6"
,
},
},
{
{
name
:
"深水埗"
,
name
:
"西大吴乡"
,
value
:
40689.64
,
index
:
5
,
index
:
5
,
a
:
6
,
a
:
6
,
b
:
6
,
b
:
6
,
...
@@ -103,8 +97,7 @@ const data = [
...
@@ -103,8 +97,7 @@ const data = [
i
:
"6/7"
,
i
:
"6/7"
,
},
},
{
{
name
:
"九龙城"
,
name
:
"岗南镇"
,
value
:
37659.78
,
index
:
6
,
index
:
6
,
a
:
7
,
a
:
7
,
b
:
7
,
b
:
7
,
...
@@ -117,8 +110,7 @@ const data = [
...
@@ -117,8 +110,7 @@ const data = [
i
:
"7/8"
,
i
:
"7/8"
,
},
},
{
{
name
:
"黄大仙"
,
name
:
"杨家桥乡"
,
value
:
45180.97
,
index
:
7
,
index
:
7
,
a
:
8
,
a
:
8
,
b
:
8
,
b
:
8
,
...
@@ -131,8 +123,7 @@ const data = [
...
@@ -131,8 +123,7 @@ const data = [
i
:
"8/9"
,
i
:
"8/9"
,
},
},
{
{
name
:
"观塘"
,
name
:
"下口镇"
,
value
:
55204.26
,
index
:
8
,
index
:
8
,
a
:
9
,
a
:
9
,
b
:
9
,
b
:
9
,
...
@@ -145,8 +136,7 @@ const data = [
...
@@ -145,8 +136,7 @@ const data = [
i
:
"9/10"
,
i
:
"9/10"
,
},
},
{
{
name
:
"葵青"
,
name
:
"北冶乡"
,
value
:
21900.9
,
index
:
9
,
index
:
9
,
a
:
10
,
a
:
10
,
b
:
10
,
b
:
10
,
...
@@ -159,8 +149,7 @@ const data = [
...
@@ -159,8 +149,7 @@ const data = [
i
:
"10/11"
,
i
:
"10/11"
,
},
},
{
{
name
:
"荃湾"
,
name
:
"小觉镇"
,
value
:
4918.26
,
index
:
10
,
index
:
10
,
a
:
11
,
a
:
11
,
b
:
11
,
b
:
11
,
...
@@ -173,8 +162,7 @@ const data = [
...
@@ -173,8 +162,7 @@ const data = [
i
:
"11/12"
,
i
:
"11/12"
,
},
},
{
{
name
:
"屯门"
,
name
:
"下槐镇"
,
value
:
5881.84
,
index
:
11
,
index
:
11
,
a
:
12
,
a
:
12
,
b
:
12
,
b
:
12
,
...
@@ -187,8 +175,7 @@ const data = [
...
@@ -187,8 +175,7 @@ const data = [
i
:
"12/13"
,
i
:
"12/13"
,
},
},
{
{
name
:
"元朗"
,
name
:
"上三汲乡"
,
value
:
4178.01
,
index
:
12
,
index
:
12
,
a
:
13
,
a
:
13
,
b
:
13
,
b
:
13
,
...
@@ -201,8 +188,7 @@ const data = [
...
@@ -201,8 +188,7 @@ const data = [
i
:
"13/14"
,
i
:
"13/14"
,
},
},
{
{
name
:
"北区"
,
name
:
"两河乡"
,
value
:
2227.92
,
index
:
13
,
index
:
13
,
a
:
14
,
a
:
14
,
b
:
14
,
b
:
14
,
...
@@ -215,8 +201,7 @@ const data = [
...
@@ -215,8 +201,7 @@ const data = [
i
:
"14/15"
,
i
:
"14/15"
,
},
},
{
{
name
:
"大埔"
,
name
:
"南甸镇"
,
value
:
2180.98
,
index
:
14
,
index
:
14
,
a
:
15
,
a
:
15
,
b
:
15
,
b
:
15
,
...
@@ -229,8 +214,7 @@ const data = [
...
@@ -229,8 +214,7 @@ const data = [
i
:
"15/16"
,
i
:
"15/16"
,
},
},
{
{
name
:
"沙田"
,
name
:
"东王坡乡"
,
value
:
9172.94
,
index
:
15
,
index
:
15
,
a
:
16
,
a
:
16
,
b
:
16
,
b
:
16
,
...
@@ -243,8 +227,7 @@ const data = [
...
@@ -243,8 +227,7 @@ const data = [
i
:
"16/17"
,
i
:
"16/17"
,
},
},
{
{
name
:
"西贡"
,
name
:
"苏家庄乡"
,
value
:
3368
,
index
:
16
,
index
:
16
,
a
:
17
,
a
:
17
,
b
:
17
,
b
:
17
,
...
@@ -257,8 +240,7 @@ const data = [
...
@@ -257,8 +240,7 @@ const data = [
i
:
"17/18"
,
i
:
"17/18"
,
},
},
{
{
name
:
"离岛"
,
name
:
"合河口乡"
,
value
:
806.98
,
index
:
17
,
index
:
17
,
a
:
18
,
a
:
18
,
b
:
18
,
b
:
18
,
...
@@ -270,6 +252,71 @@ const data = [
...
@@ -270,6 +252,71 @@ const data = [
h
:
"18/19"
,
h
:
"18/19"
,
i
:
"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
{
export
default
{
...
@@ -294,10 +341,11 @@ export default {
...
@@ -294,10 +341,11 @@ export default {
},
},
methods
:
{
methods
:
{
async
getPath
()
{
async
getPath
()
{
const
res
=
await
axios
(
// const res = await axios(
"https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/HK.json"
// "https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/HK.json"
);
// );
const
geoJson
=
res
.
data
;
const
geoJson
=
{
features
:
pingshanArr
,
type
:
"FeatureCollection"
};
console
.
log
(
geoJson
);
this
.
$echarts
.
registerMap
(
"HK"
,
geoJson
);
this
.
$echarts
.
registerMap
(
"HK"
,
geoJson
);
this
.
options
=
{
this
.
options
=
{
roam
:
true
,
roam
:
true
,
...
@@ -308,7 +356,7 @@ export default {
...
@@ -308,7 +356,7 @@ export default {
// alwaysShowContent: true,
// alwaysShowContent: true,
// transitionDuration:0,
// transitionDuration:0,
formatter
:
(
p
)
=>
{
formatter
:
(
p
)
=>
{
console
.
log
(
"p"
,
p
)
console
.
log
(
"p"
,
p
);
const
dom
=
this
.
createDom
(
p
.
data
,
this
);
const
dom
=
this
.
createDom
(
p
.
data
,
this
);
return
dom
;
return
dom
;
},
},
...
@@ -365,26 +413,26 @@ export default {
...
@@ -365,26 +413,26 @@ export default {
},
},
data
,
data
,
// 自定义名称映射
// 自定义名称映射
nameMap
:
{
//
nameMap: {
"Central and Western"
:
"中西区"
,
//
"Central and Western": "中西区",
Eastern
:
"东区"
,
//
Eastern: "东区",
Islands
:
"离岛"
,
//
Islands: "离岛",
"Kowloon City"
:
"九龙城"
,
//
"Kowloon City": "九龙城",
"Kwai Tsing"
:
"葵青"
,
//
"Kwai Tsing": "葵青",
"Kwun Tong"
:
"观塘"
,
//
"Kwun Tong": "观塘",
North
:
"北区"
,
//
North: "北区",
"Sai Kung"
:
"西贡"
,
//
"Sai Kung": "西贡",
"Sha Tin"
:
"沙田"
,
//
"Sha Tin": "沙田",
"Sham Shui Po"
:
"深水埗"
,
//
"Sham Shui Po": "深水埗",
Southern
:
"南区"
,
//
Southern: "南区",
"Tai Po"
:
"大埔"
,
//
"Tai Po": "大埔",
"Tsuen Wan"
:
"荃湾"
,
//
"Tsuen Wan": "荃湾",
"Tuen Mun"
:
"屯门"
,
//
"Tuen Mun": "屯门",
"Wan Chai"
:
"湾仔"
,
//
"Wan Chai": "湾仔",
"Wong Tai Sin"
:
"黄大仙"
,
//
"Wong Tai Sin": "黄大仙",
"Yau Tsim Mong"
:
"油尖旺"
,
//
"Yau Tsim Mong": "油尖旺",
"Yuen Long"
:
"元朗"
,
//
"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