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
6c32d1f9
Commit
6c32d1f9
authored
Mar 21, 2022
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加上轨迹点
parent
1fd71101
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
384 additions
and
200 deletions
+384
-200
carTarget.svg
gassafetyprogress-web/src/assets/mapImages/carTarget.svg
+2
-0
config.js
gassafetyprogress-web/src/utils/mapClass/config.js
+309
-159
map.js
gassafetyprogress-web/src/utils/mapClass/map.js
+73
-41
No files found.
gassafetyprogress-web/src/assets/mapImages/carTarget.svg
0 → 100644
View file @
6c32d1f9
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1647852854992"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2263"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"20"
height=
"20"
><defs><style
type=
"text/css"
>
@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path
d=
"M662.04973405 329.56834123l108.40905238-142.19888693c4.22372932-5.63163908 4.22372932-11.26327817 1.40790978-18.30282702-2.81581955-5.63163908-8.44745863-9.8553684-15.48700748-9.85536841H218.55815604c-9.8553684 0-16.89491725 7.03954885-16.89491725 16.89491726V867.38987389c0 9.8553684 7.03954885 16.89491725 16.89491725 16.89491726s16.89491725-7.03954885 16.89491726-16.89491726V487.25423562h522.33452519c7.03954885 0 12.67118794-4.22372932 15.48700749-9.8553684s1.40790977-12.67118794-2.81581955-18.30282703l-108.40905238-129.52769896z"
fill=
"#EA4942"
p-id=
"2264"
></path></svg>
\ No newline at end of file
gassafetyprogress-web/src/utils/mapClass/config.js
View file @
6c32d1f9
/*
* @Author: your name
* @Date: 2022-01-26 10:47:44
* @LastEditTime: 2022-03-
03 16:03:12
* @LastEditTime: 2022-03-
21 17:11:56
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/config.js
*/
import
store
from
'@/store'
import
store
from
"@/store"
;
export
const
pipeColor
=
{
1
:
"#2EE7E7"
,
...
...
@@ -36,6 +36,8 @@ export const svgUrl = {
11
:
require
(
"@/assets/mapImages/mark03.png"
),
12
:
require
(
"@/assets/mapImages/mark04.png"
),
13
:
require
(
"@/assets/mapImages/mark01.png"
),
//小汽车的路径标点图标
14
:
require
(
"@/assets/mapImages/carTarget.svg"
),
};
export
const
svgAlarm
=
{
2
:
require
(
"@/assets/mapImages/tyxAlarm.svg"
),
...
...
@@ -45,15 +47,14 @@ export const svgAlarm = {
6
:
require
(
"@/assets/mapImages/userAlarm.svg"
),
};
export
const
deviceType
=
{
1
:
"管道"
,
2
:
"调压箱"
,
3
:
"阀门"
,
4
:
"场站"
,
5
:
"监控"
,
6
:
"用户"
,
1
:
"管道"
,
2
:
"调压箱"
,
3
:
"阀门"
,
4
:
"场站"
,
5
:
"监控"
,
6
:
"用户"
,
};
export
const
companyType
=
{
1
:
"中燃翔科"
,
2
:
"中诚燃气"
,
...
...
@@ -85,33 +86,55 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
"备注"
,
companyType
:
"1"
,
path
:
[
[
114.165756
,
38.270519
],
[
114.165421
,
38.269184
],
[
114.165039
,
38.267927
],
[
114.164857
,
38.266685
],
[
114.16446
,
38.263696
],
[
114.164405
,
38.263111
],
[
114.164418
,
38.262426
],
[
114.164194
,
38.260908
],
[
114.165692
,
38.260752
],
[
114.167399
,
38.260559
],
[
114.168369
,
38.260391
],
[
114.168901
,
38.260879
],
[
114.169059
,
38.261128
],
[
114.169078
,
38.261693
],
[
114.172569
,
38.261263
],
[
114.181772
,
38.260066
],
[
114.181584
,
38.259023
],
[
114.181353
,
38.258139
]
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"主管道至小区"
,
coordinates
:
"[['114.165756','38.270519'],['114.16394','38.259056'],['114.173441','38.261087'],['114.181729','38.260066'],['114.181353','38.258139']]"
,
pipeLength
:
213
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/274e17c3-1c93-4f09-956e-615dd0e5fca6.png"
,
installationTime
:
"2021-10-07"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
"备注"
,
companyType
:
"1"
,
path
:
[
[
114.17947
,
38.260353
],
[
114.179546
,
38.260732
]
],
},
path
:
[
[
114.165756
,
38.270519
],
[
114.165421
,
38.269184
],
[
114.165039
,
38.267927
],
[
114.164857
,
38.266685
],
[
114.16446
,
38.263696
],
[
114.164405
,
38.263111
],
[
114.164418
,
38.262426
],
[
114.164194
,
38.260908
],
[
114.165692
,
38.260752
],
[
114.167399
,
38.260559
],
[
114.168369
,
38.260391
],
[
114.168901
,
38.260879
],
[
114.169059
,
38.261128
],
[
114.169078
,
38.261693
],
[
114.172569
,
38.261263
],
[
114.181772
,
38.260066
],
[
114.181584
,
38.259023
],
[
114.181353
,
38.258139
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"主管道至小区"
,
coordinates
:
"[['114.165756','38.270519'],['114.16394','38.259056'],['114.173441','38.261087'],['114.181729','38.260066'],['114.181353','38.258139']]"
,
pipeLength
:
213
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/274e17c3-1c93-4f09-956e-615dd0e5fca6.png"
,
installationTime
:
"2021-10-07"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
"备注"
,
companyType
:
"1"
,
path
:
[
[
114.17947
,
38.260353
],
[
114.179546
,
38.260732
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
...
...
@@ -135,8 +158,19 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"1"
,
path
:
[
[
114.236904
,
38.239155
],
[
114.234145
,
38.239202
],
[
114.233368
,
38.242778
],
[
114.233895
,
38.249292
],
[
114.233937
,
38.251334
],
[
114.229746
,
38.251479
],
[
114.226905
,
38.25181
],
[
114.224532
,
38.252174
],
[
114.224474
,
38.253066
],
[
114.224389
,
38.254749
],
[
114.224273
,
38.258808
]
],
path
:
[
[
114.236904
,
38.239155
],
[
114.234145
,
38.239202
],
[
114.233368
,
38.242778
],
[
114.233895
,
38.249292
],
[
114.233937
,
38.251334
],
[
114.229746
,
38.251479
],
[
114.226905
,
38.25181
],
[
114.224532
,
38.252174
],
[
114.224474
,
38.253066
],
[
114.224389
,
38.254749
],
[
114.224273
,
38.258808
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -161,7 +195,16 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
"阿斯顿"
,
companyType
:
"1"
,
path
:
[
[
114.164985
,
38.267853
],
[
114.169441
,
38.267047
],
[
114.176153
,
38.265802
],
[
114.176198
,
38.26608
],
[
114.176877
,
38.266001
],
[
114.176815
,
38.265712
],
[
114.177443
,
38.265609
],
[
114.176635
,
38.260772
]
],
path
:
[
[
114.164985
,
38.267853
],
[
114.169441
,
38.267047
],
[
114.176153
,
38.265802
],
[
114.176198
,
38.26608
],
[
114.176877
,
38.266001
],
[
114.176815
,
38.265712
],
[
114.177443
,
38.265609
],
[
114.176635
,
38.260772
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -185,7 +228,16 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
"管道高压"
,
companyType
:
"1"
,
path
:
[
[
114.169401
,
38.267041
],
[
114.169923
,
38.273139
],
[
114.169782
,
38.274468
],
[
114.169324
,
38.276147
],
[
114.169237
,
38.277648
],
[
114.170117
,
38.2815
],
[
114.170207
,
38.282984
],
[
114.174419
,
38.282971
]
],
path
:
[
[
114.169401
,
38.267041
],
[
114.169923
,
38.273139
],
[
114.169782
,
38.274468
],
[
114.169324
,
38.276147
],
[
114.169237
,
38.277648
],
[
114.170117
,
38.2815
],
[
114.170207
,
38.282984
],
[
114.174419
,
38.282971
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -209,7 +261,16 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"1"
,
path
:
[
[
114.214022
,
38.258963
],
[
114.215365
,
38.25896
],
[
114.215363
,
38.259637
],
[
114.215366
,
38.258961
],
[
114.216537
,
38.258983
],
[
114.216534
,
38.259115
],
[
114.216537
,
38.258983
],
[
114.218661
,
38.258925
]
],
path
:
[
[
114.214022
,
38.258963
],
[
114.215365
,
38.25896
],
[
114.215363
,
38.259637
],
[
114.215366
,
38.258961
],
[
114.216537
,
38.258983
],
[
114.216534
,
38.259115
],
[
114.216537
,
38.258983
],
[
114.218661
,
38.258925
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -289,36 +350,50 @@ export const pipeData = {
remarks
:
"可以"
,
companyType
:
"1"
,
path
:
[
[
[
114.181858
,
38.260066
],
[
114.188165
,
38.259239
],
[
114.188883
,
38.259136
],
[
114.190042
,
38.259164
],
[
114.19217
,
38.259316
],
[
114.194628
,
38.258174
],
[
114.19722
,
38.25744
],
[
114.200157
,
38.257364
],
[
114.206203
,
38.256601
]
]
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"南北"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"冶河西路至县政府"
,
coordinates
:
"[['114.18219','38.260066'],['114.19217','38.259316'],['114.197248','38.257486'],['114.196603','38.252102']]"
,
pipeLength
:
3255
,
pipeType
:
"1"
,
pipePressure
:
"4"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/aa4bd171-6be1-46f1-ba82-322d3ef54737.png"
,
installationTime
:
"2021-10-13"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
"可以"
,
companyType
:
"1"
,
path
:
[
[
[
114.185887
,
38.259572
],
[
114.185973
,
38.260098
],
[
114.18599
,
38.260102
]
]
],
},
[
[
114.181858
,
38.260066
],
[
114.188165
,
38.259239
],
[
114.188883
,
38.259136
],
[
114.190042
,
38.259164
],
[
114.19217
,
38.259316
],
[
114.194628
,
38.258174
],
[
114.19722
,
38.25744
],
[
114.200157
,
38.257364
],
[
114.206203
,
38.256601
],
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"南北"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"冶河西路至县政府"
,
coordinates
:
"[['114.18219','38.260066'],['114.19217','38.259316'],['114.197248','38.257486'],['114.196603','38.252102']]"
,
pipeLength
:
3255
,
pipeType
:
"1"
,
pipePressure
:
"4"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/aa4bd171-6be1-46f1-ba82-322d3ef54737.png"
,
installationTime
:
"2021-10-13"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
"可以"
,
companyType
:
"1"
,
path
:
[
[
[
114.185887
,
38.259572
],
[
114.185973
,
38.260098
],
[
114.18599
,
38.260102
],
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -430,7 +505,15 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
"123"
,
companyType
:
"2"
,
path
:
[
[
114.192016
,
38.259428
],
[
114.192084
,
38.262614
],
[
114.187931
,
38.263887
],
[
114.186155
,
38.264606
],
[
114.184682
,
38.26551
],
[
114.185353
,
38.264926
],
[
114.183887
,
38.264904
]
],
path
:
[
[
114.192016
,
38.259428
],
[
114.192084
,
38.262614
],
[
114.187931
,
38.263887
],
[
114.186155
,
38.264606
],
[
114.184682
,
38.26551
],
[
114.185353
,
38.264926
],
[
114.183887
,
38.264904
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -455,7 +538,12 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
114.210714
,
38.255961
],
[
114.210617
,
38.255911
],
[
114.209614
,
38.256096
],
[
114.206401
,
38.2566
]
],
path
:
[
[
114.210714
,
38.255961
],
[
114.210617
,
38.255911
],
[
114.209614
,
38.256096
],
[
114.206401
,
38.2566
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -479,7 +567,11 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
114.17755
,
38.265569
],
[
114.181274
,
38.264945
],
[
114.185067
,
38.264924
]
],
path
:
[
[
114.17755
,
38.265569
],
[
114.181274
,
38.264945
],
[
114.185067
,
38.264924
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -535,36 +627,53 @@ export const pipeData = {
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
[
114.199316
,
38.260473
],
[
114.199122
,
38.260326
],
[
114.198749
,
38.260441
],
[
114.198473
,
38.260509
],
[
114.198402
,
38.260507
],
[
114.198345
,
38.260473
],
[
114.197739
,
38.258908
],
[
114.19719
,
38.257478
],
[
114.196485
,
38.251297
],
[
114.195518
,
38.242209
]
]
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"康乐街岔口"
,
coordinates
:
"[['114.198561','38.26075'],['114.197173','38.257331'],['114.195376','38.241776']]"
,
pipeLength
:
3469
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/8f51b133-6b5f-48d1-aff6-7d68bcb58849.png"
,
installationTime
:
"2021-10-08"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
[
114.193173
,
38.250357
],
[
114.193096
,
38.249905
],
[
114.19368
,
38.249803
],
[
114.194377
,
38.249718
],
[
114.196261
,
38.249521
]
]
],
},
[
[
114.199316
,
38.260473
],
[
114.199122
,
38.260326
],
[
114.198749
,
38.260441
],
[
114.198473
,
38.260509
],
[
114.198402
,
38.260507
],
[
114.198345
,
38.260473
],
[
114.197739
,
38.258908
],
[
114.19719
,
38.257478
],
[
114.196485
,
38.251297
],
[
114.195518
,
38.242209
],
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"康乐街岔口"
,
coordinates
:
"[['114.198561','38.26075'],['114.197173','38.257331'],['114.195376','38.241776']]"
,
pipeLength
:
3469
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/8f51b133-6b5f-48d1-aff6-7d68bcb58849.png"
,
installationTime
:
"2021-10-08"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
[
114.193173
,
38.250357
],
[
114.193096
,
38.249905
],
[
114.19368
,
38.249803
],
[
114.194377
,
38.249718
],
[
114.196261
,
38.249521
],
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
...
...
@@ -588,8 +697,21 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
114.206898
,
38.259072
],
[
114.20675
,
38.25672
],
[
114.20636
,
38.256667
],
[
114.206091
,
38.254336
],
[
114.203348
,
38.254645
],
[
114.206094
,
38.254333
],
[
114.204444
,
38.241922
],
[
114.203839
,
38.242023
],
[
114.203782
,
38.240171
],
[
114.202854
,
38.240167
],
[
114.201458
,
38.240228
],
[
114.200296
,
38.239421
],
[
114.200292
,
38.240242
]
],
path
:
[
[
114.206898
,
38.259072
],
[
114.20675
,
38.25672
],
[
114.20636
,
38.256667
],
[
114.206091
,
38.254336
],
[
114.203348
,
38.254645
],
[
114.206094
,
38.254333
],
[
114.204444
,
38.241922
],
[
114.203839
,
38.242023
],
[
114.203782
,
38.240171
],
[
114.202854
,
38.240167
],
[
114.201458
,
38.240228
],
[
114.200296
,
38.239421
],
[
114.200292
,
38.240242
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -615,7 +737,13 @@ export const pipeData = {
remarks
:
null
,
companyType
:
"2"
,
path
:
[
[
[
114.196451
,
38.250502
],
[
114.200326
,
38.250398
],
[
114.200496
,
38.250399
],
[
114.221349
,
38.249354
],
[
114.224139
,
38.250939
]
]
[
[
114.196451
,
38.250502
],
[
114.200326
,
38.250398
],
[
114.200496
,
38.250399
],
[
114.221349
,
38.249354
],
[
114.224139
,
38.250939
],
],
],
},
{
...
...
@@ -674,34 +802,48 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"3"
,
path
:
[
[
114.219113
,
38.255163
],
[
114.21852
,
38.254677
],
[
114.218446
,
38.249739
],
[
114.218477
,
38.251096
]
],
path
:
[
[
114.219113
,
38.255163
],
[
114.21852
,
38.254677
],
[
114.218446
,
38.249739
],
[
114.218477
,
38.251096
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"主管道至高村"
,
coordinates
:
"[['114.219113','38.255163'],['114.21852','38.254677'],['114.21848','38.253932'],['114.218508','38.253723']]"
,
pipeLength
:
1010
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/471da450-c2c9-4a3b-89c8-a697a0ba2713.png"
,
installationTime
:
"2021-10-14"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"3"
,
path
:
[
[
114.208486
,
38.259254
],
[
114.208521
,
38.260195
],
[
114.208488
,
38.261122
],
[
114.208428
,
38.262953
],
[
114.208522
,
38.263256
],
[
114.208593
,
38.263614
],
[
114.208551
,
38.26458
],
[
114.208647
,
38.266885
]
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"主管道至高村"
,
coordinates
:
"[['114.219113','38.255163'],['114.21852','38.254677'],['114.21848','38.253932'],['114.218508','38.253723']]"
,
pipeLength
:
1010
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/471da450-c2c9-4a3b-89c8-a697a0ba2713.png"
,
installationTime
:
"2021-10-14"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"3"
,
path
:
[
[
114.208486
,
38.259254
],
[
114.208521
,
38.260195
],
[
114.208488
,
38.261122
],
[
114.208428
,
38.262953
],
[
114.208522
,
38.263256
],
[
114.208593
,
38.263614
],
[
114.208551
,
38.26458
],
[
114.208647
,
38.266885
],
],
},
{
pipeya
:
"20Pa"
,
...
...
@@ -894,32 +1036,40 @@ export const pipeData = {
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"3"
,
path
:
[
[
114.224644
,
38.254009
],
[
114.223455
,
38.254043
]
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"电大街石上流名苑1"
,
coordinates
:
"[['114.22432','38.254788'],['114.224201','38.253337']]"
,
pipeLength
:
1717
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/fe331990-6871-4d42-94a3-55b093eeb3b0.png"
,
installationTime
:
"2021-10-14"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"3"
,
path
:
[
[
114.218794
,
38.260883
],
[
114.218831
,
38.264988
],
[
114.220933
,
38.264941
],
[
114.220905
,
38.266866
]
],
},
path
:
[
[
114.224644
,
38.254009
],
[
114.223455
,
38.254043
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
pipeMaterial
:
"塑料"
,
pipeDepth
:
"5"
,
pipeTrend
:
"东西"
,
buildyear
:
"2019-03-05"
,
buildCompany
:
"通达管道"
,
powerCompany
:
"河北泽宏科技"
,
iconType
:
"1"
,
pipeAddr
:
"电大街石上流名苑1"
,
coordinates
:
"[['114.22432','38.254788'],['114.224201','38.253337']]"
,
pipeLength
:
1717
,
pipeType
:
"1"
,
pipePressure
:
"1"
,
iconUrl
:
"http://36.148.1.253:8091/gassafety/profile/loadPath/upload/2021/10/14/fe331990-6871-4d42-94a3-55b093eeb3b0.png"
,
installationTime
:
"2021-10-14"
,
inspectionTime
:
null
,
isDel
:
"0"
,
remarks
:
null
,
companyType
:
"3"
,
path
:
[
[
114.218794
,
38.260883
],
[
114.218831
,
38.264988
],
[
114.220933
,
38.264941
],
[
114.220905
,
38.266866
],
],
},
{
pipeya
:
"20Pa"
,
pipeDiameter
:
"0.5"
,
...
...
gassafetyprogress-web/src/utils/mapClass/map.js
View file @
6c32d1f9
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-21
08:57:08
* @LastEditTime: 2022-03-21
17:43:29
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
...
...
@@ -313,9 +313,7 @@ export class EditorMap {
this
.
allDevice
[
iconType
].
push
(
device
);
this
.
deviceEvent
(
device
,
compontent
);
// 设备的事件函数
if
(
iconType
<
10
){
this
.
deviceEvent
(
device
,
compontent
);
}
this
.
deviceEvent
(
device
,
compontent
);
}
deviceEvent
(
device
,
compontent
)
{
device
.
on
(
"click"
,
(
e
)
=>
{
...
...
@@ -334,7 +332,11 @@ export class EditorMap {
const
data
=
target
.
getExtData
();
console
.
log
(
data
);
const
name
=
data
.
nickName
||
data
.
deviceName
||
data
.
videoName
||
data
.
stationName
;
data
.
nickName
||
data
.
deviceName
||
data
.
videoName
||
data
.
stationName
||
data
.
time
;
target
.
setLabel
({
content
:
name
,
direction
:
"top"
});
});
device
.
on
(
"mouseout"
,
(
e
)
=>
{
...
...
@@ -681,65 +683,95 @@ export class EditorMap {
* @param {*} path 轨迹回访率丼
* @return {*}
*/
backTrack
(
vehicleId
,
path
)
{
backTrack
(
vehicleId
,
path
,
times
)
{
this
.
infowindowClose
();
AMap
.
plugin
(
"AMap.MoveAnimation"
,
()
=>
{
let
marker
=
this
.
allDevice
[
9
].
filter
(
item
=>
item
.
getExtData
().
vehicleId
==
vehicleId
)[
0
];
let
marker
=
this
.
allDevice
[
9
].
filter
(
(
item
)
=>
item
.
getExtData
().
vehicleId
==
vehicleId
)[
0
];
// 绘制轨迹
marker
.
polyline
=
new
AMap
.
Polyline
({
map
:
this
.
map
,
path
,
showDir
:
true
,
strokeColor
:
"#28F"
,
//线颜色
// strokeOpacity: 1, //线透明度
strokeWeight
:
6
,
//线宽
// strokeStyle: "solid" //线样式
});
marker
.
passedPolyline
=
new
AMap
.
Polyline
({
map
:
this
.
map
,
strokeColor
:
"#AF5"
,
//线颜色
strokeWeight
:
6
,
//线宽
});
marker
.
on
(
"moving"
,
(
e
)
=>
{
marker
.
passedPolyline
.
setPath
(
e
.
passedPath
);
// this.map.setCenter(e.target.getPosition(), true);
});
// 绘制轨迹
marker
.
polyline
=
new
AMap
.
Polyline
({
map
:
this
.
map
,
path
,
showDir
:
true
,
strokeColor
:
"#28F"
,
//线颜色
// strokeOpacity: 1, //线透明度
strokeWeight
:
6
,
//线宽
// strokeStyle: "solid" //线样式
});
marker
.
passedPolyline
=
new
AMap
.
Polyline
({
map
:
this
.
map
,
strokeColor
:
"#AF5"
,
//线颜色
strokeWeight
:
6
,
//线宽
});
marker
.
on
(
"moving"
,
(
e
)
=>
{
marker
.
passedPolyline
.
setPath
(
e
.
passedPath
);
// this.map.setCenter(e.target.getPosition(), true);
// console.log(getPosition());
});
marker
.
moveAlong
(
path
,
{
// 每一段的时长
duration
:
8000
,
//可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation
:
true
,
});
// 每个path的点
marker
.
pointArr
=
[];
// carTarget
});
//点击的时候,先传进来一个点
const
carPathData
=
{
...
marker
.
getExtData
()
};
carPathData
.
iconType
=
14
;
this
.
addDevice
(
carPathData
,
null
);
marker
.
on
(
"moveend"
,
(
e
)
=>
{
// this.addDevice(carPathData,carBackComponent);
// 如果不是最后一个点,就创建一个新的worderpoint,如果是就不创建,并且把自身删除
}
let
z
=
{
longitude
:
e
.
pos
[
0
],
latitude
:
e
.
pos
[
1
],
time
:
times
[
e
.
index
],
};
if
(
e
.
index
==
path
.
length
-
1
)
{
}
else
{
this
.
addDevice
(
z
,
null
);
// workPoint.infoWindow.open(map,e.passedPos);
marker
.
pointArr
.
push
(
workPoint
);
}
console
.
log
(
"定点"
,
e
);
});
marker
.
moveAlong
(
path
,
{
// 每一段的时长
duration
:
8000
,
//可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation
:
true
,
});
});
}
clearbackTrack
(
vehicleId
)
{
// let marker = this.allDevice[9].filter(
// (item) => item.getExtData().vehicleId == vehicleId
// )[0];
this
.
allDevice
[
"9"
]?.
forEach
(
item
=>
{
this
.
allDevice
[
"9"
]?.
forEach
(
(
item
)
=>
{
if
(
item
)
{
// 停止运动
item
.
stopMove
();
if
(
item
.
polyline
){
// 删除每个点
item
.
pointArr
?.
forEach
((
iten
)
=>
{
this
.
map
.
remove
(
iten
);
});
if
(
item
.
polyline
)
{
this
.
map
.
remove
(
item
.
polyline
);
}
if
(
item
.
passedPolyline
)
{
if
(
item
.
passedPolyline
)
{
this
.
map
.
remove
(
item
.
passedPolyline
);
}
this
.
map
.
remove
(
item
);
}
})
})
;
// 最后把数组清空
this
.
allDevice
[
"9"
]
=
[];
this
.
allDevice
[
"9"
]
=
[];
// 把car的路径点也清空
this
.
allDevice
[
"14"
]
=
[];
this
.
infowindowClose
();
}
}
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