Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
huaxin-rq
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
耿迪迪
huaxin-rq
Commits
5ba1f93c
Commit
5ba1f93c
authored
Jul 15, 2026
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图边界更新
parent
78a911fa
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30959 additions
and
168 deletions
+30959
-168
fengrun.js
huaxin-web/src/utils/mapClass/fengrun.js
+29616
-0
newMap.js
huaxin-web/src/utils/mapClass/newMap.js
+180
-168
xiangzhen.js
huaxin-web/src/utils/mapClass/xiangzhen.js
+1163
-0
No files found.
huaxin-web/src/utils/mapClass/fengrun.js
0 → 100644
View file @
5ba1f93c
This diff is collapsed.
Click to expand it.
huaxin-web/src/utils/mapClass/newMap.js
View file @
5ba1f93c
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 202
3-10-13 15:32:17
* @LastEditTime: 202
6-07-15 11:31:09
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @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: /test/hello-world/src/utils/mapClass.js
* @FilePath: /test/hello-world/src/utils/mapClass.js
*/
*/
// import { pipeColor, svgUrl, svgAlarm } from "@/utils/mapClass/config.js";
// import { pipeColor, svgUrl, svgAlarm } from "@/utils/mapClass/config.js";
// 编辑类
// 编辑类
// 在地图上新增的设备可以直接编辑,
// 在地图上新增的设备可以直接编辑,
// 已经保存完成的设备需要点编辑才可以编辑
// 已经保存完成的设备需要点编辑才可以编辑
import
{
townsData
}
from
"./xiangzhen"
;
export
class
EditorMap
{
export
class
EditorMap
{
// 地图的对象实例
// 地图的对象实例
map
=
null
;
map
=
null
;
...
@@ -34,7 +35,7 @@ export class EditorMap {
...
@@ -34,7 +35,7 @@ export class EditorMap {
mouseToolPolineOptions
=
null
;
mouseToolPolineOptions
=
null
;
// 存放设备图标的对象,需要new的时候传进来
// 存放设备图标的对象,需要new的时候传进来
devicePicData
=
{};
devicePicData
=
{};
pipeColor
=
{};
pipeColor
=
{};
// 存放所有的设备的数组集合,这是一个对象,对象里面是各种设备的数组
// 存放所有的设备的数组集合,这是一个对象,对象里面是各种设备的数组
allDevice
=
{};
allDevice
=
{};
// 存放所有的管道
// 存放所有的管道
...
@@ -87,6 +88,7 @@ export class EditorMap {
...
@@ -87,6 +88,7 @@ export class EditorMap {
this
.
mouseAddDevice
();
this
.
mouseAddDevice
();
// this.mouseAddMarker();
// this.mouseAddMarker();
// this.mouseAddPipeline();
// this.mouseAddPipeline();
this
.
frbj
();
// 地图边界
// 地图边界
this
.
map
.
getCity
((
res
)
=>
{
this
.
map
.
getCity
((
res
)
=>
{
const
district
=
res
.
district
;
const
district
=
res
.
district
;
...
@@ -121,15 +123,26 @@ export class EditorMap {
...
@@ -121,15 +123,26 @@ export class EditorMap {
// fillColor: "transparent",
// fillColor: "transparent",
// strokeColor: "#09f",
// strokeColor: "#09f",
// });
// });
// new AMap.Polyline({
// map: this.map,
// strokeWeight: 4,
// strokeColor: "#09f",
// path: bounds[i],
// });
// polygons.push(polygon);
}
}
});
}
frbj
()
{
townsData
.
forEach
((
item
)
=>
{
console
.
log
(
item
);
new
AMap
.
Polyline
({
new
AMap
.
Polyline
({
map
:
this
.
map
,
map
:
this
.
map
,
strokeWeight
:
4
,
strokeWeight
:
4
,
strokeColor
:
"#09f"
,
strokeColor
:
"#09f"
,
path
:
bounds
[
i
]
,
path
:
item
.
lnglat
,
});
});
// polygons.push(polygon);
}
}
});
});
}
}
// map的事件监听
// map的事件监听
...
@@ -341,7 +354,11 @@ export class EditorMap {
...
@@ -341,7 +354,11 @@ export class EditorMap {
position
:
[
lng
,
lat
],
position
:
[
lng
,
lat
],
extData
:
deviceData
,
extData
:
deviceData
,
label
:
{
label
:
{
content
:
deviceData
.
siteStationName
||
deviceData
.
titlename
||
deviceData
.
deviceName
||
'设备'
,
content
:
deviceData
.
siteStationName
||
deviceData
.
titlename
||
deviceData
.
deviceName
||
"设备"
,
direction
:
"top"
,
direction
:
"top"
,
},
},
});
});
...
@@ -473,13 +490,13 @@ export class EditorMap {
...
@@ -473,13 +490,13 @@ export class EditorMap {
path
:
eval
(
path
),
path
:
eval
(
path
),
strokeWeight
:
objData
.
strokeWeight
||
4
,
strokeWeight
:
objData
.
strokeWeight
||
4
,
strokeColor
:
color
,
strokeColor
:
color
,
strokeOpacity
:
pipePressure
==
5
?
1
:
0.6
,
strokeOpacity
:
pipePressure
==
5
?
1
:
0.6
,
extData
:
objData
,
extData
:
objData
,
cursor
:
"pointer"
,
cursor
:
"pointer"
,
zIndex
:
pipePressure
==
5
?
20
:
10
zIndex
:
pipePressure
==
5
?
20
:
10
,
});
});
if
(
objData
.
ishidden
==
1
)
{
if
(
objData
.
ishidden
==
1
)
{
pipe
.
hide
();
pipe
.
hide
();
}
}
...
@@ -488,9 +505,9 @@ export class EditorMap {
...
@@ -488,9 +505,9 @@ export class EditorMap {
// if (!Array.isArray(this.pipeArr[iconType])) {
// if (!Array.isArray(this.pipeArr[iconType])) {
// this.pipeArr[iconType] = [];
// this.pipeArr[iconType] = [];
// }
// }
if
(
pipePressure
==
5
)
{
if
(
pipePressure
==
5
)
{
this
.
pipeArr2
.
push
(
pipe
);
this
.
pipeArr2
.
push
(
pipe
);
}
else
{
}
else
{
this
.
pipeArr
.
push
(
pipe
);
this
.
pipeArr
.
push
(
pipe
);
this
.
pipeEvent
(
pipe
,
component
);
this
.
pipeEvent
(
pipe
,
component
);
}
}
...
@@ -580,8 +597,8 @@ export class EditorMap {
...
@@ -580,8 +597,8 @@ export class EditorMap {
pipefilter
(
ind
,
type
)
{
pipefilter
(
ind
,
type
)
{
this
.
pipeArr
.
forEach
((
pipe
)
=>
{
this
.
pipeArr
.
forEach
((
pipe
)
=>
{
const
data
=
pipe
.
getExtData
();
const
data
=
pipe
.
getExtData
();
if
(
type
==
data
.
pipePressure
-
1
)
{
if
(
type
==
data
.
pipePressure
-
1
)
{
if
(
ind
>=
0
)
{
if
(
ind
>=
0
)
{
pipe
.
hide
();
pipe
.
hide
();
}
else
{
}
else
{
pipe
.
show
();
pipe
.
show
();
...
@@ -591,8 +608,8 @@ export class EditorMap {
...
@@ -591,8 +608,8 @@ export class EditorMap {
this
.
pipeArr2
.
forEach
((
pipe
)
=>
{
this
.
pipeArr2
.
forEach
((
pipe
)
=>
{
const
data
=
pipe
.
getExtData
();
const
data
=
pipe
.
getExtData
();
if
(
type
==
data
.
pipeType
-
1
)
{
if
(
type
==
data
.
pipeType
-
1
)
{
if
(
ind
>=
0
)
{
if
(
ind
>=
0
)
{
pipe
.
hide
();
pipe
.
hide
();
}
else
{
}
else
{
pipe
.
show
();
pipe
.
show
();
...
@@ -604,7 +621,7 @@ export class EditorMap {
...
@@ -604,7 +621,7 @@ export class EditorMap {
/**
/**
* 清除管线
* 清除管线
*/
*/
clearPipe
(){
clearPipe
()
{
this
.
map
.
remove
(
this
.
pipeArrold
);
this
.
map
.
remove
(
this
.
pipeArrold
);
}
}
...
@@ -893,7 +910,6 @@ export class EditorMap {
...
@@ -893,7 +910,6 @@ export class EditorMap {
this
.
map
.
destroy
();
this
.
map
.
destroy
();
}
}
/**
/**
* 地图上添加场站 海量标注 LabelMarker 方式
* 地图上添加场站 海量标注 LabelMarker 方式
* @param {*} detectorUserData
* @param {*} detectorUserData
...
@@ -1107,11 +1123,7 @@ export class EditorMap {
...
@@ -1107,11 +1123,7 @@ export class EditorMap {
* @param {*} component
* @param {*} component
* @param {*} showBool
* @param {*} showBool
*/
*/
labelsLayerMarksDetectorUserList
(
labelsLayerMarksDetectorUserList
(
mapData
,
compontent
,
showBool
=
true
)
{
mapData
,
compontent
,
showBool
=
true
)
{
if
(
mapData
!=
null
)
{
if
(
mapData
!=
null
)
{
const
hashMap
=
new
Map
();
const
hashMap
=
new
Map
();
this
.
businessDetectorUserlabelsLayer
=
new
AMap
.
LabelsLayer
({
this
.
businessDetectorUserlabelsLayer
=
new
AMap
.
LabelsLayer
({
...
...
huaxin-web/src/utils/mapClass/xiangzhen.js
0 → 100644
View file @
5ba1f93c
This diff is collapsed.
Click to expand it.
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