Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
Commits
69d7d39e
Commit
69d7d39e
authored
Feb 10, 2022
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管道根据压力过滤
parent
21995873
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
241 additions
and
95 deletions
+241
-95
workerManView.vue
gassafety-web/src/components/PopWindowGis/workerManView.vue
+3
-3
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+33
-7
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+31
-5
index.vue
gassafety-web/src/views/device/map/index.vue
+76
-32
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+98
-48
No files found.
gassafety-web/src/components/PopWindowGis/workerManView.vue
View file @
69d7d39e
...
@@ -154,10 +154,10 @@ export default {
...
@@ -154,10 +154,10 @@ export default {
},
},
radioChange
(
e
)
{
radioChange
(
e
)
{
if
(
e
==
1
)
{
if
(
e
==
1
)
{
this
.
formData
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
beginTime
=
moment
()
this
.
formData
.
endTime
=
moment
()
.
subtract
(
2
,
"h"
)
.
add
(
2
,
"h"
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
else
if
(
e
==
2
)
{
}
else
if
(
e
==
2
)
{
this
.
formData
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
()
this
.
formData
.
endTime
=
moment
()
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
69d7d39e
import
createPop
from
"./createPop"
;
import
createPop
from
"./createPop"
;
import
{
lineColor
,
mapStyle
}
from
"./mapCommon.js"
;
import
{
lineColor
,
mapStyle
}
from
"./mapCommon.js"
;
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
;
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
...
@@ -43,7 +43,7 @@ class gaodeMap {
...
@@ -43,7 +43,7 @@ class gaodeMap {
leftListClick
=
false
;
leftListClick
=
false
;
//构造函数中设置中央点默认值
//构造函数中设置中央点默认值
constructor
(
center
,
latlng
,
containerId
)
{
constructor
(
center
,
latlng
,
containerId
)
{
let
container
=
containerId
?
containerId
:
"container"
;
let
container
=
containerId
?
containerId
:
"container"
;
this
.
markers
=
[];
this
.
markers
=
[];
this
.
center
=
center
?
center
:
defaultCenter
;
this
.
center
=
center
?
center
:
defaultCenter
;
...
@@ -57,7 +57,7 @@ class gaodeMap {
...
@@ -57,7 +57,7 @@ class gaodeMap {
// labelzIndex: 110,
// labelzIndex: 110,
pitch
:
8
,
pitch
:
8
,
zoom
:
12
,
zoom
:
12
,
mapStyle
,
mapStyle
// mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
// mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
});
});
...
@@ -351,7 +351,7 @@ class gaodeMap {
...
@@ -351,7 +351,7 @@ class gaodeMap {
//infoWindow.close(map, e.target.getPosition());
//infoWindow.close(map, e.target.getPosition());
}
}
if
(
func
)
{
if
(
func
)
{
if
(
func
!=
"false"
)
{
if
(
func
!=
"false"
)
{
func
();
func
();
}
}
}
}
...
@@ -611,6 +611,26 @@ class gaodeMap {
...
@@ -611,6 +611,26 @@ class gaodeMap {
// 缩放地图到合适的视野级别
// 缩放地图到合适的视野级别
// map.setFitView();
// map.setFitView();
}
}
// 根据压力过滤管道
pipePressureFilter
(
pipePressureArr
,
func
)
{
this
.
polyLines
.
forEach
(
item
=>
{
const
ind
=
pipePressureArr
.
indexOf
(
+
item
.
getExtData
().
lineData
.
pipePressure
)
>=
0
;
// 根据压力过滤出来的显示,过滤掉的管道隐藏
if
(
ind
)
{
item
.
show
();
}
else
{
item
.
hide
();
}
});
// 改变数据类型
const
newArr
=
this
.
polyLines
.
map
(
item
=>
{
return
item
.
getExtData
().
lineData
;
});
if
(
func
)
{
func
(
newArr
);
}
}
// 鼠标移入管道
// 鼠标移入管道
polylineMouseOver
=
e
=>
{
polylineMouseOver
=
e
=>
{
console
.
log
(
e
.
type
);
console
.
log
(
e
.
type
);
...
@@ -814,10 +834,15 @@ class gaodeMap {
...
@@ -814,10 +834,15 @@ class gaodeMap {
});
});
}
}
// 隐藏所有管道
// 隐藏所有管道
lineShow
(
bool
)
{
lineShow
(
bool
,
pipePressureArr
)
{
const
filterArr
=
this
.
polyLines
.
filter
(
item
=>
pipePressureArr
.
indexOf
(
+
item
.
getExtData
().
lineData
.
pipePressure
)
>=
0
);
// 然后过滤出来的管道才会显示隐藏
bool
bool
?
this
.
polyLines
.
forEach
(
item
=>
item
.
show
())
?
filterArr
.
forEach
(
item
=>
item
.
show
())
:
this
.
polyLines
.
forEach
(
item
=>
item
.
hide
());
:
filterArr
.
forEach
(
item
=>
item
.
hide
());
if
(
this
.
newLineObj
)
{
if
(
this
.
newLineObj
)
{
bool
?
this
.
newLineObj
.
show
()
:
this
.
newLineObj
.
hide
();
bool
?
this
.
newLineObj
.
show
()
:
this
.
newLineObj
.
hide
();
}
}
...
@@ -918,6 +943,7 @@ class gaodeMap {
...
@@ -918,6 +943,7 @@ class gaodeMap {
});
});
});
});
}
}
// 关闭所有已经上传的线的编辑状态
// 关闭所有已经上传的线的编辑状态
linePolyEditorAllClose
()
{
linePolyEditorAllClose
()
{
this
.
polyLines
.
forEach
(
item
=>
{
this
.
polyLines
.
forEach
(
item
=>
{
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
69d7d39e
...
@@ -573,7 +573,7 @@ class gaodeMap {
...
@@ -573,7 +573,7 @@ class gaodeMap {
map
:
map
map
:
map
});
});
const
html
=
dom
.
$el
;
const
html
=
dom
.
$el
;
console
.
log
(
"html"
,
html
)
console
.
log
(
"html"
,
html
);
dom
.
remove
();
dom
.
remove
();
return
html
;
return
html
;
...
@@ -943,6 +943,26 @@ class gaodeMap {
...
@@ -943,6 +943,26 @@ class gaodeMap {
// 缩放地图到合适的视野级别
// 缩放地图到合适的视野级别
// map.setFitView();
// map.setFitView();
}
}
// 根据压力过滤管道
pipePressureFilter
(
pipePressureArr
,
func
)
{
this
.
polyLines
.
forEach
(
item
=>
{
const
ind
=
pipePressureArr
.
indexOf
(
+
item
.
getExtData
().
lineData
.
pipePressure
)
>=
0
;
// 根据压力过滤出来的显示,过滤掉的管道隐藏
if
(
ind
)
{
item
.
show
();
}
else
{
item
.
hide
();
}
});
// 改变数据类型
const
newArr
=
this
.
polyLines
.
map
(
item
=>
{
return
item
.
getExtData
().
lineData
;
});
if
(
func
)
{
func
(
newArr
);
}
}
// 鼠标移入线条执行
// 鼠标移入线条执行
polylineMouseOver
=
e
=>
{
polylineMouseOver
=
e
=>
{
let
polyline
=
e
.
target
;
let
polyline
=
e
.
target
;
...
@@ -1262,10 +1282,17 @@ class gaodeMap {
...
@@ -1262,10 +1282,17 @@ class gaodeMap {
});
});
}
}
// 隐藏所有管道
// 隐藏所有管道
lineShow
(
bool
)
{
lineShow
(
bool
,
pipePressureArr
)
{
// 把选中的压力过滤出来
const
filterArr
=
this
.
polyLines
.
filter
(
item
=>
pipePressureArr
.
indexOf
(
+
item
.
getExtData
().
lineData
.
pipePressure
)
>=
0
);
// 然后过滤出来的管道才会显示隐藏
console
.
log
(
filterArr
);
bool
bool
?
this
.
polyLines
.
forEach
(
item
=>
item
.
show
())
?
filterArr
.
forEach
(
item
=>
item
.
show
())
:
this
.
polyLines
.
forEach
(
item
=>
item
.
hide
());
:
filterArr
.
forEach
(
item
=>
item
.
hide
());
if
(
this
.
newLineObj
)
{
if
(
this
.
newLineObj
)
{
bool
?
this
.
newLineObj
.
show
()
:
this
.
newLineObj
.
hide
();
bool
?
this
.
newLineObj
.
show
()
:
this
.
newLineObj
.
hide
();
}
}
...
@@ -1273,7 +1300,6 @@ class gaodeMap {
...
@@ -1273,7 +1300,6 @@ class gaodeMap {
markerShow
(
type
,
bool
)
{
markerShow
(
type
,
bool
)
{
this
.
markers
.
forEach
(
item
=>
{
this
.
markers
.
forEach
(
item
=>
{
const
{
deviceType
,
troubleId
}
=
item
.
getExtData
();
const
{
deviceType
,
troubleId
}
=
item
.
getExtData
();
if
(
type
==
8
&&
troubleId
)
{
if
(
type
==
8
&&
troubleId
)
{
bool
?
item
.
show
()
:
item
.
hide
();
bool
?
item
.
show
()
:
item
.
hide
();
}
else
if
(
deviceType
==
type
)
{
}
else
if
(
deviceType
==
type
)
{
...
...
gassafety-web/src/views/device/map/index.vue
View file @
69d7d39e
...
@@ -110,21 +110,19 @@
...
@@ -110,21 +110,19 @@
<div
class=
"pipePressure"
>
<div
class=
"pipePressure"
>
<!-- <div>管道压力</div> -->
<!-- <div>管道压力</div> -->
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`1`] }"
>
<div
<div
:style=
"{ backgroundColor: lineColor[`1`] }"
></div>
v-for=
"item in pipeColor"
低压
:key=
"item.value"
</div>
class=
"hasColorBox"
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`2`] }"
>
:style=
"{ color: lineColor[item.value] }"
<div
:style=
"{ backgroundColor: lineColor[`2`] }"
></div>
>
中压
<div
:style=
"{ backgroundColor: lineColor[item.value] }"
></div>
</div>
<span
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`3`] }"
>
:class=
"{ active: pipePressureArr.indexOf(item.value) >= 0 }"
<div
:style=
"{ backgroundColor: lineColor[`3`] }"
></div>
@
click=
"pipePressureArrAdd(item.value)"
次高压
>
</div>
{{ item.name }}
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`4`] }"
>
</span>
<div
:style=
"{ backgroundColor: lineColor[`4`] }"
></div>
高压
</div>
</div>
</div>
</div>
...
@@ -266,7 +264,15 @@ export default {
...
@@ -266,7 +264,15 @@ export default {
// 1新建,2编辑,3删除,点按钮变色
// 1新建,2编辑,3删除,点按钮变色
targetNum
:
0
,
targetNum
:
0
,
lineColor
,
lineColor
,
// 管道根据压力值不同的颜色变化
pipeColor
:
[
{
value
:
1
,
name
:
"低压"
},
{
value
:
2
,
name
:
"中压"
},
{
value
:
3
,
name
:
"次高压"
},
{
value
:
4
,
name
:
"高压"
},
],
// 管道压力过滤
pipePressureArr
:
[
1
,
2
,
3
,
4
],
backFlag
:
true
,
backFlag
:
true
,
// 卫星与全景地图的切换
// 卫星与全景地图的切换
mapStyle
:
true
,
mapStyle
:
true
,
...
@@ -370,9 +376,9 @@ export default {
...
@@ -370,9 +376,9 @@ export default {
console
.
log
(
this
.
leftBarNum
);
console
.
log
(
this
.
leftBarNum
);
if
(
this
.
leftBarNum
.
includes
(
1
))
{
if
(
this
.
leftBarNum
.
includes
(
1
))
{
this
.
gaoMap
.
lineShow
(
true
);
this
.
gaoMap
.
lineShow
(
true
,
this
.
pipePressureArr
);
}
else
{
}
else
{
this
.
gaoMap
.
lineShow
(
false
);
this
.
gaoMap
.
lineShow
(
false
,
this
.
pipePressureArr
);
}
}
// console.log("marks",this.gaoMap.markers)
// console.log("marks",this.gaoMap.markers)
...
@@ -563,6 +569,23 @@ export default {
...
@@ -563,6 +569,23 @@ export default {
}
}
});
});
},
},
// 管道压力展示选项过滤
pipePressureArrAdd
(
num
)
{
const
pipePressIndex
=
this
.
pipePressureArr
.
indexOf
(
num
);
if
(
pipePressIndex
>=
0
)
{
this
.
pipePressureArr
.
splice
(
pipePressIndex
,
1
);
}
else
{
this
.
pipePressureArr
.
push
(
num
);
}
// console.log(this.pipePressureArr)
// 过滤左侧管道
this
.
gaoMap
.
pipePressureFilter
(
this
.
pipePressureArr
,
this
.
pipeClassify
);
// 管道回第一页
this
.
changeBtnData
[
0
].
nowPage
=
1
;
// 左侧管道列表改变
this
.
pipeList
();
},
searchClear
()
{
searchClear
()
{
this
.
iconClass
=
"icon-create"
;
this
.
iconClass
=
"icon-create"
;
this
.
createValue
=
0
;
this
.
createValue
=
0
;
...
@@ -659,18 +682,22 @@ export default {
...
@@ -659,18 +682,22 @@ export default {
// 管道储存
// 管道储存
pipeClassify
(
pipeData
)
{
pipeClassify
(
pipeData
)
{
const
pipeArr
=
pipeData
.
map
((
item
,
index
)
=>
{
const
pipeArr
=
pipeData
// console.log( '管道路径',eval(item.coordinates )[0])
.
filter
((
item
)
=>
{
return
{
return
this
.
pipePressureArr
.
indexOf
(
+
item
.
pipePressure
)
>=
0
;
lnglat
:
eval
(
item
.
coordinates
)[
0
],
})
path
:
eval
(
item
.
coordinates
)[
1
],
.
map
((
item
,
index
)
=>
{
no
:
index
,
// console.log( '管道路径',eval(item.coordinates )[0])
deviceId
:
item
.
pipeId
,
return
{
deviceType
:
"0"
,
lnglat
:
eval
(
item
.
coordinates
)[
0
],
deviceName
:
item
.
pipeName
,
path
:
eval
(
item
.
coordinates
)[
1
],
code
:
item
.
pipeCode
,
no
:
index
,
};
deviceId
:
item
.
pipeId
,
});
deviceType
:
"0"
,
deviceName
:
item
.
pipeName
,
code
:
item
.
pipeCode
,
};
});
this
.
allList
[
0
]
=
pipeArr
;
this
.
allList
[
0
]
=
pipeArr
;
console
.
log
(
"管道管道管道管道"
,
pipeArr
);
console
.
log
(
"管道管道管道管道"
,
pipeArr
);
},
},
...
@@ -894,8 +921,8 @@ export default {
...
@@ -894,8 +921,8 @@ export default {
window
.
removeEventListener
(
"resize"
,
this
.
onResize
);
window
.
removeEventListener
(
"resize"
,
this
.
onResize
);
// 离开的时候清除创建的元素
// 离开的时候清除创建的元素
let
removeElements
=
document
.
getElementsByClassName
(
"el-dialog__wrapper"
);
let
removeElements
=
document
.
getElementsByClassName
(
"el-dialog__wrapper"
);
const
arr
=
[...
removeElements
]
const
arr
=
[...
removeElements
]
;
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
item
=
arr
[
i
];
const
item
=
arr
[
i
];
document
.
body
.
removeChild
(
item
);
document
.
body
.
removeChild
(
item
);
}
}
...
@@ -1208,6 +1235,23 @@ input[type="radio"] {
...
@@ -1208,6 +1235,23 @@ input[type="radio"] {
width
:
10px
;
width
:
10px
;
height
:
10px
;
height
:
10px
;
}
}
&
>
span
{
display
:
inline-block
;
margin-left
:
5px
;
height
:
25px
;
cursor
:
pointer
;
box-sizing
:
border-box
;
&
:hover
{
color
:
#7fc0f8
;
}
&
.active
{
// text-shadow: 0 0 10px #2ee7e7, 0 0 10px #2ee7e7, 0 0 15px #2ee7e7,
// 0 0 20px #2ee7e7;
// background-color: #053b6a;
// border-radius: 10px;
border-bottom
:
1px
solid
#2ee7e7
;
}
}
}
}
}
}
.scroll
{
.scroll
{
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
69d7d39e
...
@@ -108,21 +108,20 @@
...
@@ -108,21 +108,20 @@
<!-- 管道压力 -->
<!-- 管道压力 -->
<div
class=
"pipePressure"
>
<div
class=
"pipePressure"
>
<!-- <div>管道压力</div> -->
<!-- <div>管道压力</div> -->
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`1`] }"
>
<!-- pipeColor -->
<div
:style=
"{ backgroundColor: lineColor[`1`] }"
></div>
<div
低压
v-for=
"item in pipeColor"
</div>
:key=
"item.value"
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`2`] }"
>
class=
"hasColorBox"
<div
:style=
"{ backgroundColor: lineColor[`2`] }"
></div>
:style=
"{ color: lineColor[item.value] }"
中压
>
</div>
<div
:style=
"{ backgroundColor: lineColor[item.value] }"
></div>
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`3`] }"
>
<span
<div
:style=
"{ backgroundColor: lineColor[`3`] }"
></div>
:class=
"{ active: pipePressureArr.indexOf(item.value) >= 0 }"
次高压
@
click=
"pipePressureArrAdd(item.value)"
</div>
>
<div
class=
"hasColorBox"
:style=
"{ color: lineColor[`4`] }"
>
{{ item.name }}
<div
:style=
"{ backgroundColor: lineColor[`4`] }"
></div>
</span>
高压
</div>
</div>
</div>
</div>
<div
class=
"switch"
@
click=
"backFlag = !backFlag"
>
<div
class=
"switch"
@
click=
"backFlag = !backFlag"
>
...
@@ -365,6 +364,15 @@ export default {
...
@@ -365,6 +364,15 @@ export default {
value
:
""
,
value
:
""
,
operateType
:
""
,
operateType
:
""
,
radio1
:
""
,
radio1
:
""
,
// 管道根据压力值不同的颜色变化
pipeColor
:
[
{
value
:
1
,
name
:
"低压"
},
{
value
:
2
,
name
:
"中压"
},
{
value
:
3
,
name
:
"次高压"
},
{
value
:
4
,
name
:
"高压"
},
],
// 管道压力过滤
pipePressureArr
:
[
1
,
2
,
3
,
4
],
// 1新建,2编辑,3删除,点按钮变色
// 1新建,2编辑,3删除,点按钮变色
targetNum
:
0
,
targetNum
:
0
,
// 左边的bar的active判定
// 左边的bar的active判定
...
@@ -526,6 +534,23 @@ export default {
...
@@ -526,6 +534,23 @@ export default {
this
.
$refs
.
audio
.
play
();
this
.
$refs
.
audio
.
play
();
}
}
},
},
// 管道压力展示选项过滤
pipePressureArrAdd
(
num
)
{
const
pipePressIndex
=
this
.
pipePressureArr
.
indexOf
(
num
);
if
(
pipePressIndex
>=
0
)
{
this
.
pipePressureArr
.
splice
(
pipePressIndex
,
1
);
}
else
{
this
.
pipePressureArr
.
push
(
num
);
}
// console.log(this.pipePressureArr)
// 过滤左侧管道
this
.
gaoMap
.
pipePressureFilter
(
this
.
pipePressureArr
,
this
.
pipeClassify
);
// 管道回第一页
this
.
changeBtnData
[
0
].
nowPage
=
1
;
// 左侧管道列表改变
this
.
pipeList
();
},
initMap
()
{
initMap
()
{
let
gaoMap
=
new
gaodeMap
(
process
.
env
.
VUE_APP_MAP_CENTER
);
let
gaoMap
=
new
gaodeMap
(
process
.
env
.
VUE_APP_MAP_CENTER
);
this
.
gaoMap
=
gaoMap
;
this
.
gaoMap
=
gaoMap
;
...
@@ -542,16 +567,16 @@ export default {
...
@@ -542,16 +567,16 @@ export default {
// this.backFlag = false;
// this.backFlag = false;
let
marker
=
new
AMap
.
Marker
({
let
marker
=
new
AMap
.
Marker
({
position
:
[
124.73681
0
,
45.118425
],
position
:
[
124.73681
,
45.118425
],
map
:
this
.
gaoMap
.
myMap
,
map
:
this
.
gaoMap
.
myMap
,
offset
:
new
AMap
.
Pixel
(
5
,
19
)
offset
:
new
AMap
.
Pixel
(
5
,
19
)
,
});
});
let
icon
=
new
AMap
.
Icon
({
let
icon
=
new
AMap
.
Icon
({
opacity
:
0.1
,
opacity
:
0.1
,
image
:
require
(
"../../../assets/images/tianqi.png"
)
image
:
require
(
"../../../assets/images/tianqi.png"
)
,
});
});
marker
.
setIcon
(
icon
);
marker
.
setIcon
(
icon
);
console
.
log
(
"=========="
,
marker
);
console
.
log
(
"=========="
,
marker
);
},
},
// 更改卫星图
// 更改卫星图
mapChange
(
num
)
{
mapChange
(
num
)
{
...
@@ -637,6 +662,7 @@ export default {
...
@@ -637,6 +662,7 @@ export default {
// console.log("管道", res);
// console.log("管道", res);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
gaoMap
.
addPolyline
(
res
.
data
);
this
.
gaoMap
.
addPolyline
(
res
.
data
);
// 根据管道压力过滤
this
.
pipeClassify
(
res
.
data
);
this
.
pipeClassify
(
res
.
data
);
}
}
return
res
.
code
;
return
res
.
code
;
...
@@ -703,14 +729,14 @@ export default {
...
@@ -703,14 +729,14 @@ export default {
// 过滤报警管道
// 过滤报警管道
const
polyLineArr
=
list
.
filter
((
item
)
=>
{
const
polyLineArr
=
list
.
filter
((
item
)
=>
{
return
item
.
deviceType
==
"0"
||
item
.
deviceType
==
"管道"
;
return
item
.
deviceType
==
"0"
||
item
.
deviceType
==
"管道"
;
});
});
// 过滤报警的其它设备
// 过滤报警的其它设备
const
deviceArr
=
list
.
filter
((
item
)
=>
{
const
deviceArr
=
list
.
filter
((
item
)
=>
{
return
item
.
deviceType
!=
"管道"
;
return
item
.
deviceType
!=
"管道"
;
});
});
// 管道
// 管道
console
.
log
(
"polyLineArr"
,
polyLineArr
)
console
.
log
(
"polyLineArr"
,
polyLineArr
);
if
(
polyLineArr
.
length
>
0
)
{
if
(
polyLineArr
.
length
>
0
)
{
polyLineArr
.
forEach
((
item
)
=>
{
polyLineArr
.
forEach
((
item
)
=>
{
// 获取循报警设备的id
// 获取循报警设备的id
...
@@ -739,15 +765,17 @@ export default {
...
@@ -739,15 +765,17 @@ export default {
options
.
lineData
.
alarmId
=
alarmId
;
options
.
lineData
.
alarmId
=
alarmId
;
options
.
lineData
.
orderId
=
orderId
;
options
.
lineData
.
orderId
=
orderId
;
// dealStatus==4 就是取消报警状态
// dealStatus==4 就是取消报警状态
if
(
endTime
||
dealStatus
==
4
)
{
if
(
endTime
||
dealStatus
==
4
)
{
// 判断管道颜色
// 判断管道颜色
const
pipePressureObj
=
this
.
gaoMap
.
polyLines
.
filter
(
item
=>
{
const
pipePressureObj
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
return
options
.
lineData
.
alarmId
==
item
.
getExtData
().
lineData
.
alarmId
;
return
(
options
.
lineData
.
alarmId
==
item
.
getExtData
().
lineData
.
alarmId
);
})[
0
];
})[
0
];
const
{
pipePressure
}
=
pipePressureObj
.
getExtData
().
lineData
;
const
{
pipePressure
}
=
pipePressureObj
.
getExtData
().
lineData
;
polyline
.
setOptions
({
strokeColor
:
lineColor
[
pipePressure
]
});
polyline
.
setOptions
({
strokeColor
:
lineColor
[
pipePressure
]
});
options
.
lineData
.
alarmState
=
0
;
options
.
lineData
.
alarmState
=
0
;
options
.
lineData
.
dealStatus
=
4
options
.
lineData
.
dealStatus
=
4
;
// 报警类型
// 报警类型
options
.
lineData
.
alarmType
=
null
;
options
.
lineData
.
alarmType
=
null
;
// 报警信息
// 报警信息
...
@@ -758,17 +786,17 @@ export default {
...
@@ -758,17 +786,17 @@ export default {
this
.
audio
();
this
.
audio
();
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
options
.
lineData
.
alarmState
=
1
;
options
.
lineData
.
alarmState
=
1
;
// 报警类型
// 报警类型
options
.
lineData
.
alarmType
=
alarmType
;
options
.
lineData
.
alarmType
=
alarmType
;
// 报警信息
// 报警信息
options
.
lineData
.
alarmValue
=
alarmValue
;
options
.
lineData
.
alarmValue
=
alarmValue
;
console
.
log
(
"管道报警"
);
console
.
log
(
"管道报警"
);
}
}
polyline
.
setExtData
(
options
);
polyline
.
setExtData
(
options
);
console
.
log
(
"dealStatus"
,
dealStatus
)
console
.
log
(
"dealStatus"
,
dealStatus
);
const
myP
=
this
.
allList
[
0
].
filter
((
item
)
=>
{
const
myP
=
this
.
allList
[
0
].
filter
((
item
)
=>
{
console
.
log
(
item
.
selfData
.
alarmState
);
console
.
log
(
item
.
selfData
.
alarmState
);
return
item
.
selfData
.
alarmState
||
item
.
selfData
.
dealStatus
==
4
;
return
item
.
selfData
.
alarmState
||
item
.
selfData
.
dealStatus
==
4
;
})[
0
];
})[
0
];
// console.log("this.allList[0]", this.allList[0]);
// console.log("this.allList[0]", this.allList[0]);
...
@@ -971,10 +999,11 @@ export default {
...
@@ -971,10 +999,11 @@ export default {
// 1,2,3,4,7分别对应数据库type5,1,2,3,4
// 1,2,3,4,7分别对应数据库type5,1,2,3,4
// console.log(this.leftBarNum);
// console.log(this.leftBarNum);
if
(
this
.
leftBarNum
.
includes
(
1
))
{
if
(
this
.
leftBarNum
.
includes
(
1
))
{
this
.
gaoMap
.
lineShow
(
true
);
this
.
gaoMap
.
lineShow
(
true
,
this
.
pipePressureArr
);
//
// this.panTo(item);
// this.panTo(item);
}
else
{
}
else
{
this
.
gaoMap
.
lineShow
(
false
);
this
.
gaoMap
.
lineShow
(
false
,
this
.
pipePressureArr
);
}
}
// console.log("marks",this.gaoMap.markers)
// console.log("marks",this.gaoMap.markers)
...
@@ -1235,22 +1264,26 @@ export default {
...
@@ -1235,22 +1264,26 @@ export default {
// 管道储存
// 管道储存
pipeClassify
(
pipeData
)
{
pipeClassify
(
pipeData
)
{
const
pipeArr
=
pipeData
.
map
((
item
,
index
)
=>
{
// 根据选择的管道压力过滤一下
// console.log( '管道路径',eval(item.coordinates )[0])
const
pipeArr
=
pipeData
return
{
.
filter
((
item
)
=>
{
lnglat
:
eval
(
item
.
coordinates
)[
0
],
return
this
.
pipePressureArr
.
indexOf
(
+
item
.
pipePressure
)
>=
0
;
path
:
eval
(
item
.
coordinates
)[
1
],
})
no
:
index
,
.
map
((
item
,
index
)
=>
{
deviceId
:
item
.
pipeId
,
// console.log( '管道路径',eval(item.coordinates )[0])
deviceType
:
"0"
,
return
{
deviceName
:
item
.
pipeName
,
lnglat
:
eval
(
item
.
coordinates
)[
0
],
code
:
item
.
pipeCode
,
path
:
eval
(
item
.
coordinates
)[
1
],
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
no
:
index
,
selfData
:
item
,
deviceId
:
item
.
pipeId
,
};
deviceType
:
"0"
,
});
deviceName
:
item
.
pipeName
,
code
:
item
.
pipeCode
,
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
selfData
:
item
,
};
});
this
.
allList
[
0
]
=
pipeArr
;
this
.
allList
[
0
]
=
pipeArr
;
console
.
log
(
"管道"
,
pipeArr
);
},
},
// 设备分类存储
// 设备分类存储
deviceClassify
(
data
)
{
deviceClassify
(
data
)
{
...
@@ -1530,7 +1563,7 @@ export default {
...
@@ -1530,7 +1563,7 @@ export default {
},
},
// 搜索
// 搜索
async
search
()
{
async
search
()
{
this
.
Clear
();
this
.
search
Clear
();
map
.
clearMap
();
map
.
clearMap
();
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
placeSearch
.
clear
();
if
(
!
(
!
this
.
gaoMap
.
searchSelectAdcode
&&
!
this
.
gaoMap
.
searchSelectName
))
{
if
(
!
(
!
this
.
gaoMap
.
searchSelectAdcode
&&
!
this
.
gaoMap
.
searchSelectName
))
{
...
@@ -1904,6 +1937,23 @@ input[type="radio"] {
...
@@ -1904,6 +1937,23 @@ input[type="radio"] {
width
:
10px
;
width
:
10px
;
height
:
10px
;
height
:
10px
;
}
}
&
>
span
{
display
:
inline-block
;
margin-left
:
5px
;
height
:
25px
;
cursor
:
pointer
;
box-sizing
:
border-box
;
&
:hover
{
color
:
#7fc0f8
;
}
&
.active
{
// text-shadow: 0 0 10px #2ee7e7, 0 0 10px #2ee7e7, 0 0 15px #2ee7e7,
// 0 0 20px #2ee7e7;
// background-color: #053b6a;
// border-radius: 10px;
border-bottom
:
1px
solid
#2ee7e7
;
}
}
}
}
}
}
.scroll
{
.scroll
{
...
...
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