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
03e2844b
Commit
03e2844b
authored
Aug 25, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
64c22520
30ae471f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
60 deletions
+170
-60
troubleInfoWindowWarn.vue
...web/src/components/PopWindowGis/troubleInfoWindowWarn.vue
+19
-19
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+16
-7
index.vue
gassafety-web/src/views/device/map/index.vue
+1
-1
CreateWork.vue
...eb/src/views/enterprise/mapView/components/CreateWork.vue
+2
-2
CreateWorkTrouble.vue
...views/enterprise/mapView/components/CreateWorkTrouble.vue
+27
-23
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+105
-8
No files found.
gassafety-web/src/components/PopWindowGis/troubleInfoWindowWarn.vue
View file @
03e2844b
...
...
@@ -23,7 +23,7 @@
</div>
<div
class=
"eq-text"
>
处理状态:
<span>
{{
data
.
dealStatus
?
dealStatus
:
"暂未处理"
data
.
dealStatus
?
d
ata
.
d
ealStatus
:
"暂未处理"
}}
</span>
</div>
<div
class=
"eq-text"
>
...
...
@@ -69,10 +69,10 @@
<div
class=
"warn-wrapper"
v-if=
"true"
>
<div
class=
"warn-content"
>
<div>
关联设备:
<span>
(
{{
data
.
deviceName
?
data
.
deviceName
:
"-"
}}
)
</span>
关联设备:
<span>
{{
data
.
deviceName
?
data
.
deviceName
:
"-"
}}
</span>
</div>
<div>
设备类型:
<span>
{{
data
.
deviceType
?
data
.
deviceType
:
"-"
}}
</span>
设备类型:
<span>
{{
data
.
deviceType
?
this
.
deviceType
[
data
.
deviceType
]
:
"-"
}}
</span>
</div>
<div
v-if=
"!orderId"
>
工单编号:
<span>
{{
data
.
orderId
}}
</span>
...
...
@@ -80,11 +80,10 @@
</div>
<div
class=
"btn"
>
<span
@
mousedown
.
stop=
"deviceMore"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备
详情
</el-button>
<el-button
class=
"elbtn"
type=
"primary"
>
隐患
详情
</el-button>
</span>
<span
v-if=
"orderId"
@
mousedown
.
stop=
"createWork"
>
<el-button
v-if=
"title == '压力表' || title == '流量计'"
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button
...
...
@@ -111,6 +110,7 @@ export default {
data
()
{
return
{
deviceType
:
{
0
:
"管道"
,
1
:
"调压箱"
,
2
:
"阀门井"
,
3
:
"流量计"
,
...
...
@@ -121,7 +121,7 @@ export default {
computed
:
{
orderId
()
{
// 如果已经生成过工单,就不能再次生成了
console
.
log
(
"orderId"
,
this
.
data
.
orderId
)
// return this.data.orderId ? false : true;
return
this
.
data
.
orderId
?
false
:
true
;
},
...
...
@@ -131,15 +131,15 @@ export default {
createWork
()
{
// 控制外层弹框
// console.log(this.data.view.$refs.CreateWork);
this
.
data
.
view
.
$refs
.
CreateWork
.
alarmId
=
this
.
data
.
alarmId
;
this
.
data
.
view
.
$refs
.
CreateWork
.
open
=
true
;
this
.
data
.
view
.
$refs
.
CreateWork
.
gaoMap
=
this
.
data
.
view
.
gaoMap
;
this
.
data
.
class
.
view
.
$refs
.
CreateWorkTrouble
.
form
.
troubleId
=
this
.
data
.
troubleId
;
this
.
data
.
class
.
view
.
$refs
.
CreateWorkTrouble
.
form
.
troubleName
=
this
.
data
.
troubleName
;
this
.
data
.
class
.
view
.
$refs
.
CreateWorkTrouble
.
form
.
troubleType
=
this
.
data
.
troubleType
;
this
.
data
.
class
.
view
.
$refs
.
CreateWorkTrouble
.
form
.
troubleLevel
=
this
.
data
.
troubleLevel
;
this
.
data
.
class
.
view
.
$refs
.
CreateWorkTrouble
.
open
=
true
;
this
.
data
.
class
.
view
.
$refs
.
CreateWorkTrouble
.
gaoMap
=
this
.
data
.
class
.
view
.
gaoMap
;
// 改变外层回调
// this.data.view.CreateWorkCallBack = this.CreateWorkCallBack;
this
.
data
.
view
.
alarmObjChange
({
alarmId
:
this
.
data
.
alarmId
,
type
:
"device"
,
});
this
.
data
.
class
.
view
.
troubleObjChange
({
troubleId
:
this
.
data
.
troubleId
});
},
// CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
...
...
@@ -154,17 +154,17 @@ export default {
// marker.setExtData(options);
// },
deviceMore
()
{
this
.
data
.
view
.
$router
.
push
({
path
:
"/
dataMonitoring/alarmd
etail"
,
this
.
data
.
class
.
view
.
$router
.
push
({
path
:
"/
riskManagement/hiddenTroubleD
etail"
,
query
:
{
alarmId
:
this
.
data
.
alarm
Id
,
dcviceType
:
this
.
deviceType
[
this
.
data
.
deviceType
],
troubleId
:
this
.
data
.
trouble
Id
,
//
dcviceType: this.deviceType[this.data.deviceType],
},
});
},
// 查看工单
checkWork
()
{
this
.
data
.
view
.
$router
.
push
({
this
.
data
.
class
.
view
.
$router
.
push
({
path
:
"/workOrder/detail"
,
query
:
{
orderId
:
this
.
data
.
orderId
,
...
...
@@ -189,7 +189,7 @@ export default {
.top
{
width
:
100%
;
height
:
51px
;
background-color
:
#
ff5a67
;
background-color
:
#
e6a23c
;
.text
{
font-weight
:
600
;
font-size
:
16px
;
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
03e2844b
...
...
@@ -274,13 +274,13 @@ class gaodeMap {
this
.
workerManMarkArr
.
push
(
marker
);
}
}
// 隐患
if
(
DEVICE_TYPE
.
TROUBLE
==
markerType
)
{
marker
.
markerType
=
markerType
;
marker
.
data
=
data
;
marker
.
infoWindow
=
infoWindow
;
marker
.
on
(
"mouseover"
,
this
.
troubleOpen
);
marker
.
setExtData
(
data
);
this
.
troubles
.
push
(
marker
);
}
...
...
@@ -388,7 +388,14 @@ class gaodeMap {
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
};
// 隐患
troubleOpen
=
e
=>
{};
troubleOpen
=
e
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
};
// 鼠标移入设备时候实行的函数
infoOpen
=
e
=>
{
...
...
@@ -631,7 +638,6 @@ class gaodeMap {
opacity
:
0.1
,
image
:
require
(
"../assets/images/trouble.png"
)
});
marker
.
workerPoint
=
true
;
marker
.
setIcon
(
icon
);
break
;
}
...
...
@@ -705,7 +711,7 @@ class gaodeMap {
});
marker
.
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
autoMove
:
fals
e
,
autoMove
:
tru
e
,
content
:
dom
.
$el
,
//信息船体偏移量
// offset: new AMap.Pixel(20, 20),
...
...
@@ -1079,8 +1085,11 @@ class gaodeMap {
}
markerShow
(
type
,
bool
)
{
this
.
markers
.
forEach
(
item
=>
{
const
{
deviceType
}
=
item
.
getExtData
();
if
(
deviceType
==
type
)
{
const
{
deviceType
,
troubleId
}
=
item
.
getExtData
();
if
(
type
==
8
&&
troubleId
)
{
bool
?
item
.
show
()
:
item
.
hide
();
}
else
if
(
deviceType
==
type
)
{
// 如果是值班人员,还要隐藏身上的线条以及marker
if
(
type
==
9
)
{
if
(
bool
)
{
...
...
gassafety-web/src/views/device/map/index.vue
View file @
03e2844b
...
...
@@ -988,7 +988,7 @@ input[type="radio"] {
}
.upPic
{
display
:
inline-block
;
margin-left
:
64
px
;
margin-left
:
40
px
;
line-height
:
48px
;
font-size
:
16px
;
color
:
#053b6a
;
...
...
gassafety-web/src/views/enterprise/mapView/components/CreateWork.vue
View file @
03e2844b
...
...
@@ -130,11 +130,11 @@ export default {
this
.
form
.
orderType
=
"3"
;
addBasicsInfo
(
this
.
form
).
then
((
response
)
=>
{
if
(
response
.
code
==
200
)
{
console
.
log
(
response
.
msg
);
this
.
msgSuccess
(
"生成工单成功"
);
this
.
open
=
false
;
console
.
log
(
response
.
msg
);
this
.
$emit
(
"callback"
,
response
.
msg
);
}
this
.
$emit
(
"callback"
,
999
);
});
}
});
...
...
gassafety-web/src/views/enterprise/mapView/components/CreateWorkTrouble.vue
View file @
03e2844b
...
...
@@ -7,14 +7,14 @@
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-form-item
label=
"隐患名称"
prop=
"
devic
eName"
>
<font>
{{
form
.
devic
eName
}}
</font>
<el-form-item
label=
"隐患名称"
prop=
"
troubl
eName"
>
<font>
{{
form
.
troubl
eName
}}
</font>
</el-form-item>
<el-form-item
label=
"隐患类型"
prop=
"
alarm
Type"
>
<font>
{{
form
.
alarm
Type
}}
</font>
<el-form-item
label=
"隐患类型"
prop=
"
trouble
Type"
>
<font>
{{
form
.
trouble
Type
}}
</font>
</el-form-item>
<el-form-item
label=
"隐患级别"
prop=
"
alarmValue
"
>
<font>
{{
form
.
alarmValue
}}
</font>
<el-form-item
label=
"隐患级别"
prop=
"
troubleLevel
"
>
<font>
{{
form
.
troubleLevel
}}
</font>
</el-form-item>
<el-form-item
label=
"工单名称"
prop=
"orderName"
>
<el-input
v-model=
"form.orderName"
placeholder=
"请输入工单名称"
/>
...
...
@@ -69,9 +69,9 @@ export default {
data
()
{
return
{
form
:
{
devic
eName
:
""
,
alarm
Type
:
""
,
alarmValue
:
""
,
troubl
eName
:
""
,
trouble
Type
:
""
,
troubleLevel
:
""
,
orderName
:
""
,
appointInspector
:
""
,
remarks
:
""
,
...
...
@@ -95,24 +95,28 @@ export default {
created
()
{
// this.alarmId && this.handleIssue(this.alarmId);
console
.
log
(
"this.form"
);
},
watch
:
{
open
(
value
,
oldValue
)
{
if
(
value
)
{
console
.
log
(
this
.
alarmId
);
this
.
handleIssue
(
this
.
alarmId
);
this
.
getInspectorList
()
console
.
log
(
"this.form"
,
this
.
form
);
// console.log(this.alarmId);
// this.handleIssue(this.alarmId);
}
},
},
methods
:
{
handleIssue
(
alarmId
)
{
this
.
getInspectorList
();
getDeviceAlarm
(
alarmId
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"填写工单信息"
;
});
},
//
handleIssue(alarmId) {
//
this.getInspectorList();
//
getDeviceAlarm(alarmId).then((response) => {
//
this.form = response.data;
//
this.open = true;
//
this.title = "填写工单信息";
//
});
//
},
getInspectorList
()
{
this
.
loading
=
true
;
...
...
@@ -127,15 +131,15 @@ export default {
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
resourceId
=
this
.
form
.
alarm
Id
;
this
.
form
.
orderType
=
"
3
"
;
this
.
form
.
resourceId
=
this
.
form
.
trouble
Id
;
this
.
form
.
orderType
=
"
2
"
;
addBasicsInfo
(
this
.
form
).
then
((
response
)
=>
{
if
(
response
.
code
==
200
)
{
console
.
log
(
response
.
msg
);
this
.
msgSuccess
(
"生成工单成功"
);
this
.
open
=
false
;
console
.
log
(
response
.
msg
);
this
.
$emit
(
"callback"
,
response
.
msg
);
}
this
.
$emit
(
"callback"
,
999
);
});
}
});
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
03e2844b
...
...
@@ -76,11 +76,11 @@
@
callback=
"CreateWorkCallBack"
/>
<!-- 隐患工单 -->
<
!-- <
CreateWorkTrouble
<CreateWorkTrouble
ref=
"CreateWorkTrouble"
:open=
"createWorkTroubleOpen"
@
callback=
"CreateWorkTroubleCallBack"
/>
-->
/>
<div
ref=
"drawer"
...
...
@@ -149,7 +149,7 @@
<!-- 有数据 -->
<
template
v-if=
"item.list.length > 0"
>
<!-- 设备以及管道 展示内容是一样的 -->
<template
v-if=
"item.value != 9"
>
<template
v-if=
"item.value !=
8 && item.value !=
9"
>
<div
class=
"list-wrapper"
>
<div
class=
"thead"
>
<div
class=
"no"
>
序号
</div>
...
...
@@ -173,6 +173,31 @@
</div>
</div>
</
template
>
<!-- 隐患的展示 -->
<
template
v-else-if=
"item.value == 8"
>
<div
class=
"list-wrapper"
>
<div
class=
"thead"
>
<div
class=
"no"
>
序号
</div>
<div
class=
"code"
>
隐患等级
</div>
<div
class=
"name"
>
隐患名称
</div>
</div>
<div
class=
"deviceList"
:class=
"
{ topActive: index == 0 }"
v-for="(iten, index) in item.list"
:key="iten.deviceId + `` + index"
@mousedown.stop="panToo(iten, item)"
>
<div
class=
"no"
>
{{
iten
.
no
+
1
}}
</div>
<div
:title=
"iten.troubleLevel"
class=
"code"
>
{{
iten
.
troubleLevel
}}
</div>
<div
:title=
"iten.troubleName"
class=
"name"
>
{{
iten
.
troubleName
}}
</div>
</div>
</div>
</
template
>
<!-- 值班人员 展示不太一样-->
<
template
v-else-if=
"item.value == 9"
>
<div
class=
"list-wrapper"
>
...
...
@@ -198,6 +223,7 @@
</div>
</div>
</
template
>
<!-- 翻页 -->
<div
class=
"goback"
>
<div
class=
"btn-w"
>
...
...
@@ -245,12 +271,14 @@ import { getAllDeviceInfo, countDeviceByType } from "@/api/device/deviceInfo";
import
{
getMapHiddenTroublelist
}
from
"@/api/riskManagement/hiddenTrouble"
;
import
RightBototmData
from
"./components/RightBototmData.vue"
;
import
CreateWork
from
"./components/CreateWork.vue"
;
import
CreateWorkTrouble
from
"./components/CreateWorkTrouble.vue"
;
import
{
getInspectorLocations
}
from
"@/api/inspectorLocation/location"
;
export
default
{
components
:
{
RightBototmData
,
CreateWork
,
CreateWorkTrouble
,
},
data
()
{
return
{
...
...
@@ -342,8 +370,12 @@ export default {
bottomDataShow
:
true
,
// 是否显示生成工单弹框
createWorkOpen
:
false
,
//隐患工单
createWorkTroubleOpen
:
false
,
// 查询用的
alarmObj
:
{
alarmId
:
""
,
type
:
""
},
troubleObj
:
null
,
// 左边抽屉 内嵌scroll盒子的高
boxHeight
:
""
,
drawerOpacity
:
false
,
...
...
@@ -477,6 +509,7 @@ export default {
return
getMapHiddenTroublelist
().
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
this
.
troubleClassify
(
res
.
data
);
res
.
data
.
forEach
((
item
)
=>
{
console
.
log
(
"隐患"
,
item
);
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
TROUBLE
,
item
);
...
...
@@ -734,6 +767,13 @@ export default {
}
else
{
this
.
gaoMap
.
markerShow
(
4
,
false
);
}
// 隐患
if
(
this
.
leftBarNum
.
includes
(
8
))
{
this
.
gaoMap
.
markerShow
(
8
,
true
);
// this.panTo(item);
}
else
{
this
.
gaoMap
.
markerShow
(
8
,
false
);
}
if
(
this
.
leftBarNum
.
includes
(
9
))
{
this
.
gaoMap
.
markerShow
(
9
,
true
);
...
...
@@ -769,6 +809,8 @@ export default {
}
else
if
(
item
.
value
==
9
)
{
// 工作人员
this
.
workerManInfoWindowShow
(
iten
,
lat
,
lng
);
}
else
if
(
item
.
value
==
8
)
{
this
.
trouleInfoWindowShow
(
iten
,
lat
,
lng
)
}
else
{
// 其他设备
this
.
diveceInfoWindowShow
(
iten
,
lat
,
lng
);
...
...
@@ -815,6 +857,26 @@ export default {
this
.
gaoMap
.
infoOpen
(
e
);
};
},
// 隐患infowindow
trouleInfoWindowShow
(
iten
,
lat
,
lng
)
{
const
target
=
this
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
return
item
.
getExtData
().
troubleId
==
iten
.
troubleId
;
})[
0
];
console
.
log
(
"target"
,
target
);
const
e
=
{
target
,
lnglat
:
iten
.
path
,
};
// 如果是原地不动,就直接执行
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
==
lat
)
{
this
.
gaoMap
.
troubleOpen
(
e
);
return
;
}
// 因为地图移动的时候infowindow无法显示
this
.
gaoMap
.
handleInfoWindowOpenFunc
=
()
=>
{
this
.
gaoMap
.
troubleOpen
(
e
);
};
},
// workerMan,值班人员飞过去后侠士infowindow
workerManInfoWindowShow
(
iten
,
lat
,
lng
)
{
// console.log("iten",iten.userId)
...
...
@@ -932,6 +994,20 @@ export default {
this
.
allList
[
3
]
=
lljArr
;
this
.
allList
[
4
]
=
ylbArr
;
},
// 隐患存储
troubleClassify
(
troubleData
)
{
const
workManArr
=
troubleData
.
map
((
item
,
index
)
=>
{
return
{
path
:
[
item
.
longitude
,
item
.
latitude
],
no
:
index
,
troubleId
:
item
.
troubleId
,
troubleName
:
item
.
troubleName
,
troubleLevel
:
item
.
troubleLevel
,
};
});
console
.
log
(
"值班人员"
,
workManArr
);
this
.
allList
[
5
]
=
workManArr
;
},
// 值班人员
workerManClassify
(
workManData
)
{
const
workManArr
=
workManData
.
map
((
item
,
index
)
=>
{
...
...
@@ -1174,10 +1250,13 @@ export default {
this
.
initMap
();
this
.
leftBarNum
=
[
1
,
2
,
3
,
4
,
7
,
8
,
9
];
},
// 改变弹框状态
openChange
(
bool
)
{
this
.
createWorkOpen
=
bool
;
},
// 改变工单弹框状态
// openChange(bool) {
// this.createWorkOpen = bool;
// },
// openTroubleChange(bool) {
// this.createWorkTroubleOpen = bool;
// },
// 生成工单的回调
CreateWorkCallBack
(
e
)
{
if
(
!
this
.
alarmObj
.
alarmId
)
return
;
...
...
@@ -1205,6 +1284,24 @@ export default {
this
.
alarmObj
=
obj
;
console
.
log
(
this
.
alarmObj
);
},
// 隐患
// 手动加入orderId
CreateWorkTroubleCallBack
(
e
)
{
// console.log("隐患嘿嘿嘿")
const
trouble
=
this
.
gaoMap
.
troubles
.
filter
((
item
)
=>
{
console
.
log
(
item
,
this
.
troubleObj
.
troubleId
);
return
item
.
data
.
troubleId
==
this
.
troubleObj
.
troubleId
;
})[
0
];
console
.
log
(
"找到隐患了,是"
,
trouble
);
let
options
=
trouble
.
getExtData
();
// 暂时传值,到时候回重新刷新
options
.
orderId
=
e
;
trouble
.
setExtData
(
options
);
trouble
.
data
.
orderId
=
e
;
},
troubleObjChange
(
obj
)
{
this
.
troubleObj
=
obj
;
},
},
beforeDestroy
()
{
...
...
@@ -1518,7 +1615,7 @@ input[type="radio"] {
}
.upPic
{
display
:
inline-block
;
margin-left
:
64
px
;
margin-left
:
40
px
;
line-height
:
48px
;
font-size
:
16px
;
color
:
#053b6a
;
...
...
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