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
ea113c13
Commit
ea113c13
authored
Aug 10, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成工单制作完成
parent
e63c5879
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
332 additions
and
57 deletions
+332
-57
lineInfoWindowWarn.vue
...ty-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
+40
-20
markerInfoWindowWarn.vue
...-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
+44
-10
index.vue
gassafety-web/src/components/TopNav/index.vue
+9
-3
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+22
-12
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+1
-0
CreateWork.vue
...eb/src/views/enterprise/mapView/components/CreateWork.vue
+147
-0
RightBototmData.vue
...c/views/enterprise/mapView/components/RightBototmData.vue
+1
-1
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+67
-10
login.vue
gassafety-web/src/views/login.vue
+1
-1
No files found.
gassafety-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
View file @
ea113c13
...
@@ -77,12 +77,20 @@
...
@@ -77,12 +77,20 @@
<!--
报警状态
-->
<!--
报警状态
-->
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<
div
class
=
"warn-content"
>
<
div
class
=
"warn-content"
>
<
div
>
报警状态:
<
span
>
报警
({{
alarmType
}}
)
<
/span></
div
>
<
div
>
<
div
>
详细信息:
<
span
>
{{
alarmValue
?
alarmValue
:
"-"
}}
<
/span></
div
>
报警状态:
<
span
>
报警
({{
alarmType
}}
)
<
/span
>
<
/div
>
<
div
>
详细信息:
<
span
>
{{
alarmValue
?
alarmValue
:
"-"
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"btn"
>
<
div
@
click
.
stop
=
"stopPropatation"
class
=
"btn"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
span
>
<
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
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -95,10 +103,8 @@ export default {
...
@@ -95,10 +103,8 @@ export default {
props
:
{
props
:
{
obj
:
{
typs
:
Object
}
,
obj
:
{
typs
:
Object
}
,
}
,
}
,
data
(){
data
()
{
return
{
return
{
}
;
}
}
,
}
,
created
()
{
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
console
.
log
(
"created"
,
this
.
obj
);
...
@@ -108,17 +114,21 @@ export default {
...
@@ -108,17 +114,21 @@ export default {
bigImageArr
()
{
bigImageArr
()
{
return
[
this
.
obj
.
iconUrl
];
return
[
this
.
obj
.
iconUrl
];
}
,
}
,
alarmType
(){
alarmType
()
{
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmType
;
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmType
;
}
,
}
,
alarmValue
(){
alarmValue
()
{
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmValue
;
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmValue
;
}
}
,
orderId
()
{
// 如果已经生成过工单,就不能再次生成了
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
orderId
?
false
:
true
;
}
,
}
,
}
,
methods
:
{
methods
:
{
moment
,
moment
,
mousedown
(
e
)
{
mousedown
(
e
)
{
console
.
log
(
"??"
)
console
.
log
(
"??"
)
;
return
;
return
;
// console.log(this.$refs.previewImg)
// console.log(this.$refs.previewImg)
this
.
$refs
.
previewImg
.
showViewer
=
true
;
this
.
$refs
.
previewImg
.
showViewer
=
true
;
...
@@ -134,6 +144,11 @@ export default {
...
@@ -134,6 +144,11 @@ export default {
}
);
}
);
}
);
}
);
}
,
}
,
createWork
()
{
// 控制外层弹框 可能有点长
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
$refs
.
CreateWork
.
alarmId
=
this
.
data
.
alarmId
;
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
$refs
.
CreateWork
.
open
=
true
;
}
,
close
()
{
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
}
,
...
@@ -152,7 +167,7 @@ export default {
...
@@ -152,7 +167,7 @@ export default {
.
top
{
.
top
{
width
:
100
%
;
width
:
100
%
;
height
:
51
px
;
height
:
51
px
;
background
-
color
:
#
FF5A
67
;
background
-
color
:
#
ff5a
67
;
.
text
{
.
text
{
font
-
weight
:
600
;
font
-
weight
:
600
;
font
-
size
:
16
px
;
font
-
size
:
16
px
;
...
@@ -241,7 +256,7 @@ export default {
...
@@ -241,7 +256,7 @@ export default {
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
padding
:
10
px
0
2
px
22
px
;
padding
:
10
px
0
2
px
22
px
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
color
:
#
FE
5966
;
color
:
#
fe
5966
;
&
>
div
{
&
>
div
{
font
-
size
:
14
px
;
font
-
size
:
14
px
;
font
-
weight
:
400
;
font
-
weight
:
400
;
...
@@ -251,11 +266,16 @@ export default {
...
@@ -251,11 +266,16 @@ export default {
.
btn
{
.
btn
{
padding
:
16
px
0
;
padding
:
16
px
0
;
text
-
align
:
center
;
text
-
align
:
center
;
.
elbtn
{
span
{
background
-
color
:
#
053
b6a
;
display
:
inline
-
block
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
padding
:
0
10
px
;
width
:
95
px
;
.
elbtn
{
height
:
33
px
;
background
-
color
:
#
053
b6a
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
width
:
95
px
;
height
:
33
px
;
border
:
none
;
}
}
}
}
}
}
}
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
View file @
ea113c13
...
@@ -64,12 +64,25 @@
...
@@ -64,12 +64,25 @@
<!-- 报警状态 -->
<!-- 报警状态 -->
<div
class=
"warn-wrapper"
v-if=
"true"
>
<div
class=
"warn-wrapper"
v-if=
"true"
>
<div
class=
"warn-content"
>
<div
class=
"warn-content"
>
<div>
报警状态:
<span>
报警(
{{
data
.
alarmType
}}
)
</span></div>
<div>
<div>
详细信息:
<span>
{{
data
.
alarmValue
?
data
.
alarmValue
:
"-"
}}
</span></div>
报警状态:
<span>
报警(
{{
data
.
alarmType
}}
)
</span>
</div>
<div>
详细信息:
<span>
{{
data
.
alarmValue
?
data
.
alarmValue
:
"-"
}}
</span>
</div>
</div>
</div>
<div
class=
"btn"
>
<div
class=
"btn"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<span>
<el-button
v-if=
"title=='压力表'|| title=='流量计' "
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
>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -85,8 +98,24 @@ export default {
...
@@ -85,8 +98,24 @@ export default {
data
:
{},
data
:
{},
map
:
null
,
map
:
null
,
},
},
computed
:
{
orderId
()
{
// 如果已经生成过工单,就不能再次生成了
return
this
.
data
.
orderId
?
false
:
true
;
},
},
methods
:
{
methods
:
{
moment
,
moment
,
createWork
()
{
// 控制外层弹框
console
.
log
(
this
.
data
.
view
.
$refs
.
CreateWork
);
this
.
data
.
view
.
$refs
.
CreateWork
.
alarmId
=
this
.
data
.
alarmId
;
this
.
data
.
view
.
$refs
.
CreateWork
.
open
=
true
;
},
},
beforeDestroy
()
{
// this.data.view.createWorkOpen = false;
},
},
};
};
</
script
>
</
script
>
...
@@ -102,7 +131,7 @@ export default {
...
@@ -102,7 +131,7 @@ export default {
.top
{
.top
{
width
:
100%
;
width
:
100%
;
height
:
51px
;
height
:
51px
;
background-color
:
#
FF5A
67
;
background-color
:
#
ff5a
67
;
.text
{
.text
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
16px
;
font-size
:
16px
;
...
@@ -201,11 +230,16 @@ export default {
...
@@ -201,11 +230,16 @@ export default {
.btn
{
.btn
{
padding
:
16px
0
;
padding
:
16px
0
;
text-align
:
center
;
text-align
:
center
;
.elbtn
{
span
{
background-color
:
#053b6a
;
display
:
inline-block
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
padding
:
0
10px
;
width
:
95px
;
.elbtn
{
height
:
33px
;
background-color
:
#053b6a
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
width
:
95px
;
height
:
33px
;
border
:
none
;
}
}
}
}
}
}
}
...
...
gassafety-web/src/components/TopNav/index.vue
View file @
ea113c13
...
@@ -135,8 +135,6 @@ export default {
...
@@ -135,8 +135,6 @@ export default {
},
},
// 菜单选择事件
// 菜单选择事件
handleSelect
(
key
,
keyPath
)
{
handleSelect
(
key
,
keyPath
)
{
console
.
log
(
"key"
,
key
);
console
.
log
(
"keypath"
,
keyPath
);
let
path
;
let
path
;
this
.
currentIndex
=
key
;
this
.
currentIndex
=
key
;
if
(
this
.
ishttp
(
key
))
{
if
(
this
.
ishttp
(
key
))
{
...
@@ -148,8 +146,15 @@ export default {
...
@@ -148,8 +146,15 @@ export default {
}
else
{
}
else
{
// 显示左侧联动菜单
// 显示左侧联动菜单
path
=
this
.
activeRoutes
(
key
);
path
=
this
.
activeRoutes
(
key
);
console
.
log
(
path
)
console
.
log
(
this
.
$route
.
path
)
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
this
.
$router
.
push
(
path
[
0
].
path
);
if
(
path
[
0
].
path
){
this
.
$router
.
push
(
path
[
0
].
path
);
}
else
{
if
(
path
[
0
].
path
==
""
&&
this
.
$route
.
path
==
"/index"
)
return
;
this
.
$router
.
push
(
"/index"
);
}
}
}
// if (key == "/enterprise") {
// if (key == "/enterprise") {
...
@@ -163,6 +168,7 @@ export default {
...
@@ -163,6 +168,7 @@ export default {
},
},
// 当前激活的路由
// 当前激活的路由
activeRoutes
(
key
)
{
activeRoutes
(
key
)
{
// if(this.$route.path=="/index") return;
var
routes
=
[];
var
routes
=
[];
if
(
this
.
childrenMenus
&&
this
.
childrenMenus
.
length
>
0
)
{
if
(
this
.
childrenMenus
&&
this
.
childrenMenus
.
length
>
0
)
{
this
.
childrenMenus
.
map
((
item
)
=>
{
this
.
childrenMenus
.
map
((
item
)
=>
{
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
ea113c13
...
@@ -328,12 +328,12 @@ class gaodeMap {
...
@@ -328,12 +328,12 @@ class gaodeMap {
function
infoOpen
(
e
)
{
function
infoOpen
(
e
)
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
that
.
markerType
=
"7"
;
that
.
markerType
=
"7"
;
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
}
console
.
log
(
"that.markerType"
,
that
.
markerType
)
console
.
log
(
"that.markerType"
,
that
.
markerType
);
// 警告状态这样就要换infowindow
// 警告状态这样就要换infowindow
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
getExtData
(),
e
.
target
.
getExtData
(),
...
@@ -346,12 +346,12 @@ class gaodeMap {
...
@@ -346,12 +346,12 @@ class gaodeMap {
// ? "2"
// ? "2"
// : e.target.getExtData().deviceType + "";
// : e.target.getExtData().deviceType + "";
// 上图状态跟后台状态不统一,所以需要判断一下
// 上图状态跟后台状态不统一,所以需要判断一下
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
that
.
markerType
=
"7"
;
that
.
markerType
=
"7"
;
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
}
console
.
log
(
"that.markerType"
)
console
.
log
(
"that.markerType"
)
;
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
getExtData
(),
e
.
target
.
getExtData
(),
markerInfoWindow
markerInfoWindow
...
@@ -485,7 +485,7 @@ class gaodeMap {
...
@@ -485,7 +485,7 @@ class gaodeMap {
* @param marker
* @param marker
*/
*/
setMarkerIcon
(
marker
)
{
setMarkerIcon
(
marker
)
{
console
.
log
(
this
.
markerType
)
console
.
log
(
this
.
markerType
)
;
switch
(
this
.
markerType
)
{
switch
(
this
.
markerType
)
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
let
icon
=
new
AMap
.
Icon
({
let
icon
=
new
AMap
.
Icon
({
...
@@ -554,7 +554,7 @@ class gaodeMap {
...
@@ -554,7 +554,7 @@ class gaodeMap {
}
}
}
}
}
}
changeMarkIcon
(
marker
,
iconUrl
)
{
changeMarkIcon
(
marker
,
iconUrl
)
{
let
icon
=
new
AMap
.
Icon
({
let
icon
=
new
AMap
.
Icon
({
opacity
:
0.1
,
opacity
:
0.1
,
image
:
iconUrl
image
:
iconUrl
...
@@ -765,10 +765,10 @@ class gaodeMap {
...
@@ -765,10 +765,10 @@ class gaodeMap {
}
}
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
{
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
{
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
}
else
{
}
else
{
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
}
}
console
.
log
(
polyline
.
getOptions
()
);
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
showInfoWindow
=
infoWindow
;
this
.
showInfoWindow
=
infoWindow
;
...
@@ -990,10 +990,20 @@ class gaodeMap {
...
@@ -990,10 +990,20 @@ class gaodeMap {
item
.
moveMarker
&&
item
.
moveMarker
.
show
();
item
.
moveMarker
&&
item
.
moveMarker
.
show
();
item
.
polyline
&&
item
.
polyline
.
show
();
item
.
polyline
&&
item
.
polyline
.
show
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
show
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
show
();
if
(
item
.
pointArr
?.
length
>
0
)
{
item
.
pointArr
.
forEach
(
item
=>
{
item
.
show
();
});
}
}
else
{
}
else
{
item
.
moveMarker
&&
item
.
moveMarker
.
hide
();
item
.
moveMarker
&&
item
.
moveMarker
.
hide
();
item
.
polyline
&&
item
.
polyline
.
hide
();
item
.
polyline
&&
item
.
polyline
.
hide
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
hide
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
hide
();
if
(
item
.
pointArr
?.
length
>
0
)
{
item
.
pointArr
.
forEach
(
item
=>
{
item
.
hide
();
});
}
}
}
}
}
bool
?
item
.
show
()
:
item
.
hide
();
bool
?
item
.
show
()
:
item
.
hide
();
...
...
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
ea113c13
...
@@ -278,6 +278,7 @@ export default {
...
@@ -278,6 +278,7 @@ export default {
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
this
.
form
)
this
.
form
.
resourceId
=
this
.
form
.
alarmId
;
this
.
form
.
resourceId
=
this
.
form
.
alarmId
;
this
.
form
.
orderType
=
"3"
;
this
.
form
.
orderType
=
"3"
;
addBasicsInfo
(
this
.
form
).
then
(
response
=>
{
addBasicsInfo
(
this
.
form
).
then
(
response
=>
{
...
...
gassafety-web/src/views/enterprise/mapView/components/CreateWork.vue
0 → 100644
View file @
ea113c13
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
:close=
"close"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-form-item
label=
"报警设备"
prop=
"deviceName"
>
<font>
{{
form
.
deviceName
}}
</font>
</el-form-item>
<el-form-item
label=
"报警类型"
prop=
"alarmType"
>
<font>
{{
form
.
alarmType
}}
</font>
</el-form-item>
<el-form-item
label=
"报警值"
prop=
"alarmValue"
>
<font>
{{
form
.
alarmValue
}}
</font>
</el-form-item>
<el-form-item
label=
"工单名称"
prop=
"orderName"
>
<el-input
v-model=
"form.orderName"
placeholder=
"请输入工单名称"
/>
</el-form-item>
<el-form-item
label=
"指定执行人员"
prop=
"appointInspector"
>
<el-select
v-model=
"form.appointInspector"
placeholder=
"请选择执行人员"
clearable
size=
"small"
@
change=
"setUserId"
>
<el-option
v-for=
"item in inspector"
:key=
"item.userId"
:label=
"item.nickName"
:value=
"item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"工单描述"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入工单描述"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button
>
<!--
<el-button
@
click=
"cancel"
>
取 消
</el-button>
-->
<el-button>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
inspectorList
}
from
"@/api/system/user"
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
import
{
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
export
default
{
props
:
{
// 传进来一些内容
content
:
{
type
:
Object
,
},
},
data
()
{
return
{
form
:
{
deviceName
:
""
,
alarmType
:
""
,
alarmValue
:
""
,
orderName
:
""
,
appointInspector
:
""
,
remarks
:
""
,
},
open
:
false
,
title
:
""
,
inspector
:
[],
loading
:
false
,
alarmId
:
""
,
rules
:
{
orderName
:
[
{
required
:
true
,
message
:
"工单名称不能为空"
,
trigger
:
"blur"
},
],
appointInspector
:
[
{
required
:
true
,
message
:
"请选择巡检人员"
,
trigger
:
"blur"
},
],
},
};
},
created
()
{
// this.alarmId && this.handleIssue(this.alarmId);
},
watch
:
{
open
(
value
,
oldValue
)
{
if
(
value
)
{
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
=
"填写工单信息"
;
});
},
getInspectorList
()
{
this
.
loading
=
true
;
inspectorList
().
then
((
response
)
=>
{
this
.
inspector
=
response
.
data
;
this
.
loading
=
false
;
});
},
setUserId
(
val
)
{
this
.
form
.
appointInspector
=
val
;
},
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
resourceId
=
this
.
form
.
alarmId
;
this
.
form
.
orderType
=
"3"
;
addBasicsInfo
(
this
.
form
).
then
((
response
)
=>
{
this
.
msgSuccess
(
"生成工单成功"
);
this
.
open
=
false
;
this
.
$emit
(
"callback"
);
});
}
});
},
close
()
{
this
.
open
=
false
;
},
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
gassafety-web/src/views/enterprise/mapView/components/RightBototmData.vue
View file @
ea113c13
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<div
class=
"text"
>
<div
class=
"text"
>
<div
class=
"top"
>
{{
typeName
[
item
.
type
]
}}
</div>
<div
class=
"top"
>
{{
typeName
[
item
.
type
]
}}
</div>
<div
class=
"bottom"
>
<div
class=
"bottom"
>
{{
item
.
number
}}{{
item
.
type
==
99
?
"
K
M"
:
"个"
}}
{{
item
.
number
}}{{
item
.
type
==
99
?
"M"
:
"个"
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
ea113c13
...
@@ -100,6 +100,7 @@
...
@@ -100,6 +100,7 @@
ref=
"RightBototmData"
ref=
"RightBototmData"
:list=
"rightBototmData"
:list=
"rightBototmData"
/>
/>
<CreateWork
ref=
"CreateWork"
:open=
"createWorkOpen"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -113,11 +114,13 @@ import gaodeMap, {
...
@@ -113,11 +114,13 @@ import gaodeMap, {
import
{
selectAlarmDevice
}
from
"@/api/dataMonitoring/deviceAlarm.js"
;
import
{
selectAlarmDevice
}
from
"@/api/dataMonitoring/deviceAlarm.js"
;
import
{
getAllDeviceInfo
,
countDeviceByType
}
from
"@/api/device/deviceInfo"
;
import
{
getAllDeviceInfo
,
countDeviceByType
}
from
"@/api/device/deviceInfo"
;
import
RightBototmData
from
"./components/RightBototmData.vue"
;
import
RightBototmData
from
"./components/RightBototmData.vue"
;
import
CreateWork
from
"./components/CreateWork.vue"
;
import
{
getInspectorLocations
}
from
"@/api/inspectorLocation/location"
;
import
{
getInspectorLocations
}
from
"@/api/inspectorLocation/location"
;
export
default
{
export
default
{
components
:
{
components
:
{
RightBototmData
,
RightBototmData
,
CreateWork
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -175,6 +178,10 @@ export default {
...
@@ -175,6 +178,10 @@ export default {
// 右下角的数据data
// 右下角的数据data
rightBototmData
:
[],
rightBototmData
:
[],
bottomDataShow
:
true
,
bottomDataShow
:
true
,
// 是否显示生成工单弹框
createWorkOpen
:
false
,
// 查询用的
alarmId
:
""
,
};
};
},
},
created
()
{
created
()
{
...
@@ -193,6 +200,10 @@ export default {
...
@@ -193,6 +200,10 @@ export default {
gaoMap
.
searchTips
(
"tipinput"
);
gaoMap
.
searchTips
(
"tipinput"
);
// 获取地图上设备资源
// 获取地图上设备资源
this
.
getResource
();
this
.
getResource
();
// 把组件this传入类
this
.
gaoMap
.
view
=
this
;
// 右下角数据 跟值班人员
// 右下角数据 跟值班人员
this
.
rightBottomData
();
this
.
rightBottomData
();
},
},
...
@@ -216,15 +227,50 @@ export default {
...
@@ -216,15 +227,50 @@ export default {
},
},
// 右下角数据
// 右下角数据
async
rightBottomData
()
{
async
rightBottomData
()
{
this
.
gaoMap
.
view
=
this
;
await
countPipeLength
().
then
((
res
)
=>
{
await
countPipeLength
().
then
((
res
)
=>
{
// console.log("管道管道管道管道管道管道", res);
// console.log("管道管道管道管道管道管道", res);
const
obj
=
{
number
:
res
.
data
,
type
:
"99"
};
if
(
res
.
code
==
200
)
{
this
.
rightBototmData
.
push
(
obj
);
let
obj
;
if
(
res
.
data
>
0
)
{
obj
=
{
number
:
res
.
data
,
type
:
"99"
};
}
else
{
obj
=
{
number
:
0
,
type
:
"99"
};
}
this
.
rightBototmData
.
push
(
obj
);
}
});
});
await
countDeviceByType
().
then
((
res
)
=>
{
await
countDeviceByType
().
then
((
res
)
=>
{
// console.log("markerresresresresresresresresresresresres", res);
console
.
log
(
"markerresresresresresresresresresresresres"
,
res
);
this
.
rightBototmData
.
push
(...
res
.
data
);
if
(
res
.
code
==
200
)
{
let
obj
=
[
{
number
:
0
,
type
:
"1"
,
},
{
number
:
0
,
type
:
"2"
,
},
{
number
:
0
,
type
:
"3"
,
},
{
number
:
0
,
type
:
"4"
,
},
];
res
.
data
.
forEach
((
item
,
index
)
=>
{
for
(
let
i
=
0
;
i
<
obj
.
length
;
i
++
)
{
let
objItem
=
obj
[
i
];
if
(
item
.
type
==
objItem
.
type
)
{
objItem
.
number
=
item
.
number
;
}
}
});
this
.
rightBototmData
.
push
(...
obj
);
}
});
});
// 值班人员
// 值班人员
this
.
getInspectorLocations
();
this
.
getInspectorLocations
();
...
@@ -232,7 +278,6 @@ export default {
...
@@ -232,7 +278,6 @@ export default {
// 左边的Bar修改值
// 左边的Bar修改值
leftBarChange
(
item
)
{
leftBarChange
(
item
)
{
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
this
.
leftBarNum
.
splice
(
index
,
1
);
this
.
leftBarNum
.
splice
(
index
,
1
);
...
@@ -326,7 +371,7 @@ export default {
...
@@ -326,7 +371,7 @@ export default {
if
(
polyLineArr
.
length
>
0
)
{
if
(
polyLineArr
.
length
>
0
)
{
polyLineArr
.
forEach
((
item
)
=>
{
polyLineArr
.
forEach
((
item
)
=>
{
// 获取循报警设备的id
// 获取循报警设备的id
const
{
deviceId
,
alarmType
,
alarmValue
,
endTime
}
=
item
;
const
{
deviceId
,
orderId
,
alarmId
,
alarmType
,
alarmValue
,
endTime
}
=
item
;
console
.
log
(
"endTime"
,
endTime
);
console
.
log
(
"endTime"
,
endTime
);
// 获取polyLine
// 获取polyLine
const
polyline
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
const
polyline
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
...
@@ -336,6 +381,9 @@ export default {
...
@@ -336,6 +381,9 @@ export default {
let
options
=
polyline
.
getExtData
();
let
options
=
polyline
.
getExtData
();
// 增加一个报警状态
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options
.
lineData
.
view
=
this
;
options
.
lineData
.
alarmId
=
alarmId
;
options
.
lineData
.
orderId
=
orderId
;
if
(
endTime
)
{
if
(
endTime
)
{
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
options
.
lineData
.
alarmState
=
0
;
options
.
lineData
.
alarmState
=
0
;
...
@@ -362,7 +410,7 @@ export default {
...
@@ -362,7 +410,7 @@ export default {
if
(
deviceArr
.
length
>
0
)
{
if
(
deviceArr
.
length
>
0
)
{
deviceArr
.
forEach
((
item
)
=>
{
deviceArr
.
forEach
((
item
)
=>
{
// 获取循报警设备的id
// 获取循报警设备的id
const
{
deviceId
,
alarmType
,
alarmValue
,
endTime
}
=
item
;
const
{
deviceId
,
alarmId
,
alarmType
,
alarmValue
,
endTime
,
orderId
}
=
item
;
console
.
log
(
"endTime"
,
endTime
);
console
.
log
(
"endTime"
,
endTime
);
// 获取polyLine
// 获取polyLine
const
device
=
this
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
const
device
=
this
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
...
@@ -374,6 +422,9 @@ export default {
...
@@ -374,6 +422,9 @@ export default {
// 增加一个报警状态
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options
.
view
=
this
;
options
.
alarmId
=
alarmId
;
options
.
orderId
=
orderId
;
if
(
endTime
)
{
if
(
endTime
)
{
console
.
log
(
"设备恢复"
);
console
.
log
(
"设备恢复"
);
options
.
alarmState
=
0
;
options
.
alarmState
=
0
;
...
@@ -654,15 +705,21 @@ export default {
...
@@ -654,15 +705,21 @@ export default {
this
.
initMap
();
this
.
initMap
();
this
.
leftBarNum
=
[
1
,
2
,
3
,
4
,
7
,
8
,
9
];
this
.
leftBarNum
=
[
1
,
2
,
3
,
4
,
7
,
8
,
9
];
},
},
// 改变弹框状态
openChange
(
bool
){
this
.
createWorkOpen
=
bool
;
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
console
.
log
(
"移除window事件"
);
console
.
log
(
"移除window事件"
);
window
.
removeEventListener
(
"click"
,
this
.
barClose
);
map
.
clearMap
();
window
.
removeEventListener
(
"mousedown"
,
this
.
barClose
);
// 关闭scoket
// 关闭scoket
if
(
this
.
ws
)
{
if
(
this
.
ws
)
{
this
.
ws
.
close
();
this
.
ws
.
close
();
this
.
ws
=
null
;
this
.
ws
=
null
;
}
}
},
},
};
};
...
...
gassafety-web/src/views/login.vue
View file @
ea113c13
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
code
:
[{
required
:
true
,
trigger
:
"change"
,
message
:
"验证码不能为空"
}]
code
:
[{
required
:
true
,
trigger
:
"change"
,
message
:
"验证码不能为空"
}]
},
},
loading
:
false
,
loading
:
false
,
redirect
:
undefined
redirect
:
"/index"
};
};
},
},
watch
:
{
watch
:
{
...
...
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