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
93682c78
Commit
93682c78
authored
Sep 08, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
2c0ca401
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
180 additions
and
49 deletions
+180
-49
permission.js
gassafety-web/src/store/modules/permission.js
+2
-2
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+2
-2
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+22
-1
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+128
-36
RightBototmData.vue
...c/views/enterprise/mapView/components/RightBototmData.vue
+26
-8
No files found.
gassafety-web/src/store/modules/permission.js
View file @
93682c78
...
...
@@ -31,11 +31,11 @@ const permission = {
const
index
=
[
{
path
:
""
,
meta
:
{
title
:
"G
is
地图"
,
icon
:
"dashboard"
},
meta
:
{
title
:
"G
IS
地图"
,
icon
:
"dashboard"
},
children
:
[
{
path
:
"enterprise/mapView"
,
meta
:
{
title
:
"G
is
地图"
,
icon
:
"dashboard"
}
meta
:
{
title
:
"G
IS
地图"
,
icon
:
"dashboard"
}
}
]
}
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
93682c78
...
...
@@ -53,8 +53,8 @@ class gaodeMap {
showLabel
:
true
,
// labelzIndex: 110,
pitch
:
8
,
zoom
:
9
//mapStyle: 'amap://styles/darkblue',
zoom
:
9
,
//
mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
});
this
.
myMap
=
map
;
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
93682c78
...
...
@@ -117,7 +117,7 @@ class gaodeMap {
if
(
this
.
handleInfoWindowOpenFunc
)
{
this
.
handleInfoWindowOpenFunc
();
this
.
handleInfoWindowOpenFunc
=
null
;
this
.
leftListClick
=
false
;
this
.
leftListClick
=
false
;
}
// 刚进入页面的时候只调用一次,让左侧的抽屉在地图移动完之后显示
...
...
@@ -216,6 +216,8 @@ class gaodeMap {
options
.
scrollWheel
=
true
;
map
.
setStatus
(
options
);
});
this
.
infoWindowMove
(
infoWindow
);
let
marker
=
new
AMap
.
Marker
({
position
:
[
data
.
longitude
,
data
.
latitude
],
map
:
map
,
...
...
@@ -1011,6 +1013,25 @@ class gaodeMap {
this
.
markerPassedPolylineInfoWindow
&&
this
.
markerPassedPolylineInfoWindow
.
close
();
}
// infoWindow的拖拽
infoWindowMove
(
infoWindow
)
{
let
disX
,
disY
,
dom
;
infoWindow
.
on
(
"mousedown"
,
e
=>
{
dom
=
e
.
target
.
dom
;
// const a = dom.offsetTop + 20;
// dom.style.top = a + "px";
// console.log(dom.offsetTop);
// console.log(e.originEvent.clientY);
// console.log(dom.offsetLeft);
// console.log(e.originEvent.clientX);
disX
=
dom
.
offsetTop
-
e
.
originEvent
.
clientX
;
disY
=
dom
.
offsetLeft
-
e
.
originEvent
.
clientY
;
window
.
addEventListener
(
"mousemove"
,(
e
)
=>
{
})
});
}
// 关闭转化到vue的dom
removeCloneDom
()
{
// 线
...
...
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
93682c78
<
template
>
<div
class=
"app-container"
>
<el-row
v-if=
"$route.query.back"
>
<el-col
:span=
"24"
style=
"padding-left: 15px"
>
<div
style=
"height: 45px"
@
click=
"$router.go(-1)"
>
<el-button
size=
"medium"
type=
"text"
style=
"font-size: 18px; color: rgb(7, 63, 112); float: left"
>
返回
</el-button>
<div
style=
"float: left; margin-top: 8px; margin-left: 5px"
>
<img
src=
"../../../assets/logo/fanhui.png"
style=
"width: 25px"
alt=
""
/>
</div>
</div>
</el-col>
</el-row>
<el-form
:model=
"queryParams"
ref=
"queryForm"
...
...
@@ -71,30 +90,80 @@
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"deviceAlarmList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
width=
"280px"
/>
<el-table-column
label=
"设备编号"
align=
"center"
prop=
"deviceCode"
width=
"240px"
/>
<el-table-column
label=
"设备类型"
align=
"center"
prop=
"deviceType"
/>
<el-table
v-loading=
"loading"
:data=
"deviceAlarmList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
width=
"280px"
/>
<el-table-column
label=
"设备编号"
align=
"center"
prop=
"deviceCode"
width=
"240px"
/>
<el-table-column
label=
"设备类型"
align=
"center"
prop=
"deviceType"
/>
<el-table-column
label=
"报警类型"
align=
"center"
prop=
"alarmType"
/>
<el-table-column
label=
"报警值"
align=
"center"
prop=
"alarmValue"
width=
"150px"
/>
<el-table-column
label=
"报警开始时间"
align=
"center"
prop=
"startTime"
width=
"220px"
/>
<el-table-column
label=
"报警结束时间"
align=
"center"
prop=
"endTime"
width=
"220px"
>
<el-table-column
label=
"报警值"
align=
"center"
prop=
"alarmValue"
width=
"150px"
/>
<el-table-column
label=
"报警开始时间"
align=
"center"
prop=
"startTime"
width=
"220px"
/>
<el-table-column
label=
"报警结束时间"
align=
"center"
prop=
"endTime"
width=
"220px"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.endTime == null || scope.row.endTime == ''"
>
-
</span>
<span
v-if=
"scope.row.endTime != null && scope.row.endTime != ''"
>
{{
scope
.
row
.
endTime
}}
</span>
<span
v-if=
"scope.row.endTime == null || scope.row.endTime == ''"
>
-
</span
>
<span
v-if=
"scope.row.endTime != null && scope.row.endTime != ''"
>
{{
scope
.
row
.
endTime
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
width=
"150px"
>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未生成工单
</span>
<span
v-if=
"(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''"
>
暂未处理
</span>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未生成工单
</span
>
<span
v-if=
"
(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null &&
scope.row.orderId != ''
"
>
暂未处理
</span
>
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"normal"
...
...
@@ -102,7 +171,8 @@
icon=
"el-icon-edit"
@
click=
"handleIssue(scope.row)"
v-hasPermi=
"['workOrder:basicsInfo:add']"
v-if=
"scope.row.orderId == '' || scope.row.orderId == null"
>
v-if=
"scope.row.orderId == '' || scope.row.orderId == null"
>
生成工单
</el-button>
<el-button
...
...
@@ -110,7 +180,8 @@
type=
"text"
icon=
"el-icon-edit"
@
click=
"showDetail(scope.row)"
v-hasPermi=
"['dataMonitoring:deviceAlarm:query']"
>
v-hasPermi=
"['dataMonitoring:deviceAlarm:query']"
>
详情
</el-button>
</
template
>
...
...
@@ -118,11 +189,12 @@
</el-table>
<pagination
v-show=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<!-- 添加工单信息对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
>
...
...
@@ -137,10 +209,22 @@
<font>
{{ form.alarmValue }}
</font>
</el-form-item>
<el-form-item
label=
"工单名称"
prop=
"orderName"
>
<el-input
v-model=
"form.orderName"
placeholder=
"请输入工单名称"
style=
"width: 590px"
/>
<el-input
v-model=
"form.orderName"
placeholder=
"请输入工单名称"
style=
"width: 590px"
/>
</el-form-item>
<el-form-item
label=
"指定执行人员"
prop=
"appointInspector"
>
<el-select
v-model=
"form.appointInspector"
placeholder=
"请选择执行人员"
clearable
filterable
size=
"small"
@
change=
"setUserId"
style=
"width: 590px"
>
<el-select
v-model=
"form.appointInspector"
placeholder=
"请选择执行人员"
clearable
filterable
size=
"small"
@
change=
"setUserId"
style=
"width: 590px"
>
<el-option
v-for=
"item in inspector"
:key=
"item.userId"
...
...
@@ -150,7 +234,12 @@
</el-select>
</el-form-item>
<el-form-item
label=
"工单描述"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入工单描述"
style=
"width: 590px"
/>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入工单描述"
style=
"width: 590px"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -162,9 +251,12 @@
</template>
<
script
>
import
{
listDeviceAlarm
,
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
import
{
inspectorList
}
from
"@/api/system/user"
;
import
{
listDeviceAlarm
,
getDeviceAlarm
,
}
from
"@/api/dataMonitoring/deviceAlarm"
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
import
{
inspectorList
}
from
"@/api/system/user"
;
export
default
{
name
:
"DeviceAlarm"
,
...
...
@@ -172,7 +264,7 @@ export default {
data
()
{
return
{
// 判断是从哪里来的,如果是地图里来的,则可以返回
fromGisMap
:
false
,
fromGisMap
:
false
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -241,11 +333,11 @@ export default {
beforeRouteEnter
:
(
to
,
from
,
next
)
=>
{
next
((
vm
)
=>
{
// 如果是从地图里来的
if
(
from
.
path
==
"/enterprise/mapView"
)
{
if
(
from
.
path
==
"/enterprise/mapView"
)
{
// console.log(123)
vm
.
fromGisMap
=
true
;
}
else
{
vm
.
fromGisMap
=
false
;
vm
.
fromGisMap
=
true
;
}
else
{
vm
.
fromGisMap
=
false
;
}
});
},
...
...
@@ -302,9 +394,9 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
alarmId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
alarmId
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 下发按钮操作 */
handleIssue
(
row
)
{
...
...
@@ -334,12 +426,12 @@ export default {
/** 详细信息跳转 */
showDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/dataMonitoring/alarmdetail'
,
path
:
"/dataMonitoring/alarmdetail"
,
query
:
{
alarmId
:
row
.
alarmId
,
deviceType
:
row
.
deviceType
}
})
//带参跳转
deviceType
:
row
.
deviceType
,
}
,
})
;
//带参跳转
},
},
};
...
...
gassafety-web/src/views/enterprise/mapView/components/RightBototmData.vue
View file @
93682c78
...
...
@@ -28,21 +28,34 @@
style=
"width: 100%"
height=
"170"
>
<el-table-column
prop=
"deviceCode"
label=
"设备编号"
width=
"100"
>
</el-table-column>
<el-table-column
prop=
"deviceName"
label=
"设备名称"
width=
""
>
<el-table-column
prop=
"deviceName"
label=
"设备名称"
width=
"
150
"
>
</el-table-column>
<el-table-column
prop=
"alarmType"
label=
"报警类型"
width=
"
80
"
>
<el-table-column
prop=
"alarmType"
label=
"报警类型"
width=
""
>
</el-table-column>
<el-table-column
prop=
"createTime"
label=
"报警开始时间"
width=
"170"
>
<el-table-column
prop=
"createTime"
label=
"报警开始时间"
width=
""
>
</el-table-column>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未生成工单
</span
>
<span
v-else-if=
"!scope.row.dealStatus && scope.row.orderId"
>
暂未处理
</span
>
<span
v-else-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-else-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-else-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"alarmValue"
label=
"报警内容"
width=
"100"
>
</el-table-column>
</el-table>
</div>
</div>
<div
class=
"right"
>
<
template
v-for=
"(item, index) in list"
>
<div
...
...
@@ -95,6 +108,7 @@ export default {
4
:
"icon-ylbgs"
,
99
:
"icon-gdcd"
,
},
tableData
:
[
{
deviceCode
:
"2016-05-03"
,
...
...
@@ -158,12 +172,12 @@ export default {
return
this
.
iconList
[
item
.
type
];
},
moreClick
()
{
this
.
$router
.
push
(
"/dataMonitoring/deviceAlarm"
);
this
.
$router
.
push
(
"/dataMonitoring/deviceAlarm
?back=1
"
);
// route.push(`dataMonitoring/deviceAlarm`)
},
repeatClick
()
{
// this.tableData=[];
if
(
this
.
repeatFinshed
)
return
;
if
(
this
.
repeatFinshed
)
return
;
this
.
getList
(
true
);
},
getList
(
bool
)
{
...
...
@@ -176,14 +190,18 @@ export default {
deviceName
,
alarmType
,
createTime
,
dealStatus
,
alarmValue
,
orderId
,
}
=
item
;
return
{
deviceCode
,
deviceName
,
alarmType
,
createTime
,
dealStatus
,
alarmValue
,
orderId
,
};
});
this
.
tableData
=
arr
;
...
...
@@ -242,7 +260,7 @@ export default {
}
.repeat2
{
margin-left
:
20px
;
color
:
#67c23a
;
color
:
#67c23a
;
}
.more
{
float
:
right
;
...
...
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