|
@ -23,9 +23,9 @@
|
23
|
23
|
</div>
|
24
|
24
|
<div class="right-content">
|
25
|
25
|
<t-button
|
26
|
|
color="success"
|
27
|
|
icon="map-marker-outline"
|
28
|
|
@click="trackClick"
|
|
26
|
color="success"
|
|
27
|
icon="map-marker-outline"
|
|
28
|
@click="trackClick"
|
29
|
29
|
>轨迹</t-button
|
30
|
30
|
>
|
31
|
31
|
<div style="min-width:100px">悬浮窗<t-switch v-model="switch1" rounded @change="switchChange"></t-switch></div>
|
|
@ -66,24 +66,24 @@
|
66
|
66
|
</div>
|
67
|
67
|
|
68
|
68
|
<t-modal
|
69
|
|
:visibled.sync="trackModal"
|
70
|
|
:footer-visibled="false"
|
71
|
|
:mask-closable="false"
|
72
|
|
:width="1400"
|
73
|
|
:height="800"
|
74
|
|
:cancel="stopPlayback"
|
75
|
|
title="历史轨迹"
|
|
69
|
:visibled.sync="trackModal"
|
|
70
|
:footer-visibled="false"
|
|
71
|
:mask-closable="false"
|
|
72
|
:width="1400"
|
|
73
|
:height="800"
|
|
74
|
:cancel="stopPlayback"
|
|
75
|
title="历史轨迹"
|
76
|
76
|
>
|
77
|
77
|
<div class="track-modal-container">
|
78
|
78
|
<div class="track-modal-right">
|
79
|
79
|
<t-button-group>
|
80
|
80
|
<t-button
|
81
|
|
v-for="(item, index) in trackTypeList"
|
82
|
|
:class="
|
|
81
|
v-for="(item, index) in trackTypeList"
|
|
82
|
:class="
|
83
|
83
|
index == trackTypeCondition.currentIndex ? 'active' : ''
|
84
|
84
|
"
|
85
|
|
:key="index"
|
86
|
|
@click="changeTrackType(index)"
|
|
85
|
:key="index"
|
|
86
|
@click="changeTrackType(index)"
|
87
|
87
|
>{{ item }}</t-button
|
88
|
88
|
>
|
89
|
89
|
</t-button-group>
|
|
@ -97,12 +97,12 @@
|
97
|
97
|
</t-select>
|
98
|
98
|
<span class="track-span">时间</span>
|
99
|
99
|
<t-date-picker
|
100
|
|
v-model="rangeDate"
|
101
|
|
align-right
|
102
|
|
style="width:320px"
|
103
|
|
type="dateTimeRange"
|
104
|
|
placeholder="请选择时间"
|
105
|
|
@date-change="onChangeDate">
|
|
100
|
v-model="rangeDate"
|
|
101
|
align-right
|
|
102
|
style="width:320px"
|
|
103
|
type="dateTimeRange"
|
|
104
|
placeholder="请选择时间"
|
|
105
|
@date-change="onChangeDate">
|
106
|
106
|
</t-date-picker>
|
107
|
107
|
<span class="track-span">速度</span>
|
108
|
108
|
<t-select v-model="playbackRate" placeholder="回放速度" style="width: 60px;">
|
|
@ -138,11 +138,11 @@
|
138
|
138
|
</t-modal>
|
139
|
139
|
<t-modal :visibled.sync="rescueModal" title="指派救援人员">
|
140
|
140
|
<t-form
|
141
|
|
ref="formValidate"
|
142
|
|
:model="formValidate"
|
143
|
|
:rules="ruleValidate"
|
144
|
|
:label-width="80"
|
145
|
|
label-position="left"
|
|
141
|
ref="formValidate"
|
|
142
|
:model="formValidate"
|
|
143
|
:rules="ruleValidate"
|
|
144
|
:label-width="80"
|
|
145
|
label-position="left"
|
146
|
146
|
>
|
147
|
147
|
<t-form-item label="救援人员" prop="rescue">
|
148
|
148
|
<t-select v-model="formValidate.rescue" placeholder="请选择">
|
|
@ -171,27 +171,27 @@ export default {
|
171
|
171
|
month >= 10 ? month : '0' + month
|
172
|
172
|
var day = value.getDate() >= 10 ? value.getDate() : '0' + value.getDate()
|
173
|
173
|
var hours =
|
174
|
|
value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
|
|
174
|
value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
|
175
|
175
|
var minutes =
|
176
|
|
value.getMinutes() >= 10
|
177
|
|
? value.getMinutes()
|
178
|
|
: '0' + value.getMinutes()
|
|
176
|
value.getMinutes() >= 10
|
|
177
|
? value.getMinutes()
|
|
178
|
: '0' + value.getMinutes()
|
179
|
179
|
var seconds =
|
180
|
|
value.getSeconds() >= 10
|
181
|
|
? value.getSeconds()
|
182
|
|
: '0' + value.getSeconds()
|
|
180
|
value.getSeconds() >= 10
|
|
181
|
? value.getSeconds()
|
|
182
|
: '0' + value.getSeconds()
|
183
|
183
|
return (
|
184
|
|
year +
|
185
|
|
'.' +
|
186
|
|
month +
|
187
|
|
'.' +
|
188
|
|
day +
|
189
|
|
' ' +
|
190
|
|
hours +
|
191
|
|
':' +
|
192
|
|
minutes +
|
193
|
|
':' +
|
194
|
|
seconds
|
|
184
|
year +
|
|
185
|
'.' +
|
|
186
|
month +
|
|
187
|
'.' +
|
|
188
|
day +
|
|
189
|
' ' +
|
|
190
|
hours +
|
|
191
|
':' +
|
|
192
|
minutes +
|
|
193
|
':' +
|
|
194
|
seconds
|
195
|
195
|
)
|
196
|
196
|
}
|
197
|
197
|
},
|
|
@ -310,7 +310,7 @@ export default {
|
310
|
310
|
lineColors: ['#26B728', '#280e9e', '#dc8020', '#EAFF00',
|
311
|
311
|
'#cc48ca', '#83b5ff', '#4D4128', '#08570c'], // 定义几种颜色多人轨迹回放使用,不够再取随机颜色
|
312
|
312
|
tal: 32.465444444444444,
|
313
|
|
switch1: true,
|
|
313
|
switch1: false,
|
314
|
314
|
pointsarr: null,
|
315
|
315
|
markTypes: [],
|
316
|
316
|
toolTypes: [],
|
|
@ -445,17 +445,17 @@ export default {
|
445
|
445
|
// },
|
446
|
446
|
async getTagType() {
|
447
|
447
|
await this.$test
|
448
|
|
.post(services.mapTag.MAP_TAG_TYPE, {})
|
449
|
|
.then((res) => {
|
450
|
|
// 请求成功处理...
|
451
|
|
this.markTypes = res.data
|
452
|
|
this.markTypes.forEach(e => {
|
453
|
|
e.show = true
|
|
448
|
.post(services.mapTag.MAP_TAG_TYPE, {})
|
|
449
|
.then((res) => {
|
|
450
|
// 请求成功处理...
|
|
451
|
this.markTypes = res.data
|
|
452
|
this.markTypes.forEach(e => {
|
|
453
|
e.show = true
|
|
454
|
})
|
|
455
|
})
|
|
456
|
.catch((res) => {
|
|
457
|
// 请求失败处理...
|
454
|
458
|
})
|
455
|
|
})
|
456
|
|
.catch((res) => {
|
457
|
|
// 请求失败处理...
|
458
|
|
})
|
459
|
459
|
},
|
460
|
460
|
async getToolType() {
|
461
|
461
|
await this.$test.post(services.equipment.EQUIPMENT_TYPE, {}
|
|
@ -481,8 +481,8 @@ export default {
|
481
|
481
|
var maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
|
482
|
482
|
this.map.addLayer(maplayer)
|
483
|
483
|
var la = Ai.WMTSLayer(
|
484
|
|
GIS_SEA_URL,
|
485
|
|
{ opacity: 0.5 }
|
|
484
|
GIS_SEA_URL,
|
|
485
|
{ opacity: 0.5 }
|
486
|
486
|
)
|
487
|
487
|
this.map.addLayer(la)
|
488
|
488
|
Ai.Scale({ position: 'bottomright' }).addTo(this.map)
|
|
@ -747,8 +747,10 @@ export default {
|
747
|
747
|
point.popup.setContent(content)
|
748
|
748
|
point.popup.openo = this.switch1
|
749
|
749
|
point.popup.openOn(this.map) // 需要先显示
|
750
|
|
if (!this.switch1) { // 如果全局关闭则立即关闭
|
751
|
|
this.map.closePopup(point.popup)
|
|
750
|
this.map.closePopup(point.popup)
|
|
751
|
if (this.switch1) { // 如果全局关闭则立即关闭
|
|
752
|
point.popup.openOn(this.map)
|
|
753
|
// this.map.closePopup(point.popup)
|
752
|
754
|
}
|
753
|
755
|
point.on('click', (e) => { // 配置点击事件 点击开关
|
754
|
756
|
if (point.popup.openo) {
|
|
@ -932,86 +934,86 @@ export default {
|
932
|
934
|
this.loadBindDevicePerson()
|
933
|
935
|
this.loadNotBindEquipment()
|
934
|
936
|
this.$test
|
935
|
|
.post(services.alarm.LOAD_MAP_AREA_TOOL, {})
|
936
|
|
.then((res) => {
|
937
|
|
console.log(res)
|
938
|
|
res.data.mapAreaList.forEach(e => {
|
939
|
|
var typeObj = res.data.mapAreaTypeList.filter(type => {
|
940
|
|
return e.businessType == type.mapAreaBusinessType
|
941
|
|
})
|
942
|
|
var polygon = Ai.Polygon(e.mapAreaContent, {color: typeObj[0].color, opacity: 1.0, weight: 1.2})
|
943
|
|
this.trackMap.addLayer(polygon)
|
944
|
|
})
|
945
|
|
res.data.toolList.forEach(e => {
|
946
|
|
var typeObj = res.data.toolTypeList.filter(type => {
|
947
|
|
return e.resourceToolType == type.resourceToolType
|
|
937
|
.post(services.alarm.LOAD_MAP_AREA_TOOL, {})
|
|
938
|
.then((res) => {
|
|
939
|
console.log(res)
|
|
940
|
res.data.mapAreaList.forEach(e => {
|
|
941
|
var typeObj = res.data.mapAreaTypeList.filter(type => {
|
|
942
|
return e.businessType == type.mapAreaBusinessType
|
|
943
|
})
|
|
944
|
var polygon = Ai.Polygon(e.mapAreaContent, {color: typeObj[0].color, opacity: 1.0, weight: 1.2})
|
|
945
|
this.trackMap.addLayer(polygon)
|
948
|
946
|
})
|
949
|
|
var point = Ai.Point([e.latitude, e.longitude], {
|
950
|
|
icon: Ai.Icon({
|
951
|
|
// 设置图标URL路径
|
952
|
|
iconUrl: typeObj[0].iconUrl,
|
953
|
|
// 设置图标大小
|
954
|
|
iconSize: [20, 20],
|
955
|
|
// 设置点对象和图标的相对偏移量
|
956
|
|
iconAnchor: [100, 100]
|
|
947
|
res.data.toolList.forEach(e => {
|
|
948
|
var typeObj = res.data.toolTypeList.filter(type => {
|
|
949
|
return e.resourceToolType == type.resourceToolType
|
|
950
|
})
|
|
951
|
var point = Ai.Point([e.latitude, e.longitude], {
|
|
952
|
icon: Ai.Icon({
|
|
953
|
// 设置图标URL路径
|
|
954
|
iconUrl: typeObj[0].iconUrl,
|
|
955
|
// 设置图标大小
|
|
956
|
iconSize: [20, 20],
|
|
957
|
// 设置点对象和图标的相对偏移量
|
|
958
|
iconAnchor: [100, 100]
|
|
959
|
})
|
957
|
960
|
})
|
|
961
|
this.trackMap.addLayer(point)
|
958
|
962
|
})
|
959
|
|
this.trackMap.addLayer(point)
|
960
|
963
|
})
|
961
|
|
})
|
962
|
|
.catch((res) => {
|
963
|
|
// 请求失败处理...
|
964
|
|
})
|
|
964
|
.catch((res) => {
|
|
965
|
// 请求失败处理...
|
|
966
|
})
|
965
|
967
|
},
|
966
|
968
|
loadBindDevicePerson() {
|
967
|
969
|
this.$test
|
968
|
|
.post(services.organization.BIND_DEVICE, {})
|
969
|
|
.then((res) => {
|
970
|
|
console.log(res)
|
971
|
|
this.personList = res.data
|
972
|
|
})
|
973
|
|
.catch((res) => {
|
974
|
|
// 请求失败处理...
|
975
|
|
})
|
|
970
|
.post(services.organization.BIND_DEVICE, {})
|
|
971
|
.then((res) => {
|
|
972
|
console.log(res)
|
|
973
|
this.personList = res.data
|
|
974
|
})
|
|
975
|
.catch((res) => {
|
|
976
|
// 请求失败处理...
|
|
977
|
})
|
976
|
978
|
},
|
977
|
979
|
initStatusCount() {
|
978
|
980
|
this.$test
|
979
|
|
.post(services.organization.INIT_STATUS_COUNT, {})
|
980
|
|
.then((res) => {
|
981
|
|
this.personStatistics = res.data
|
982
|
|
})
|
983
|
|
.catch((res) => {
|
984
|
|
// 请求失败处理...
|
985
|
|
})
|
|
981
|
.post(services.organization.INIT_STATUS_COUNT, {})
|
|
982
|
.then((res) => {
|
|
983
|
this.personStatistics = res.data
|
|
984
|
})
|
|
985
|
.catch((res) => {
|
|
986
|
// 请求失败处理...
|
|
987
|
})
|
986
|
988
|
},
|
987
|
989
|
loadNotBindEquipment() {
|
988
|
990
|
this.$test
|
989
|
|
.post(services.organization.EQUIPMENT_NOT_BIND, {})
|
990
|
|
.then((res) => {
|
991
|
|
console.log(res)
|
992
|
|
res.data.forEach(e => {
|
993
|
|
var url = ''
|
994
|
|
this.toolTypes.forEach(t => {
|
995
|
|
if (e.resourceToolType == t.resourceToolType) {
|
996
|
|
url = t.iconUrl
|
997
|
|
}
|
998
|
|
})
|
999
|
|
var point = Ai.Point([e.latitude, e.longitude], {
|
1000
|
|
icon: Ai.Icon({
|
1001
|
|
// 设置图标URL路径
|
1002
|
|
iconUrl: url,
|
1003
|
|
// 设置图标大小
|
1004
|
|
iconSize: [20, 20],
|
1005
|
|
// 设置点对象和图标的相对偏移量
|
1006
|
|
iconAnchor: [0, 0]
|
|
991
|
.post(services.organization.EQUIPMENT_NOT_BIND, {})
|
|
992
|
.then((res) => {
|
|
993
|
console.log(res)
|
|
994
|
res.data.forEach(e => {
|
|
995
|
var url = ''
|
|
996
|
this.toolTypes.forEach(t => {
|
|
997
|
if (e.resourceToolType == t.resourceToolType) {
|
|
998
|
url = t.iconUrl
|
|
999
|
}
|
|
1000
|
})
|
|
1001
|
var point = Ai.Point([e.latitude, e.longitude], {
|
|
1002
|
icon: Ai.Icon({
|
|
1003
|
// 设置图标URL路径
|
|
1004
|
iconUrl: url,
|
|
1005
|
// 设置图标大小
|
|
1006
|
iconSize: [20, 20],
|
|
1007
|
// 设置点对象和图标的相对偏移量
|
|
1008
|
iconAnchor: [0, 0]
|
|
1009
|
})
|
1007
|
1010
|
})
|
|
1011
|
this.trackMap.addLayer(point)
|
1008
|
1012
|
})
|
1009
|
|
this.trackMap.addLayer(point)
|
1010
|
1013
|
})
|
1011
|
|
})
|
1012
|
|
.catch((res) => {
|
1013
|
|
// 请求失败处理...
|
1014
|
|
})
|
|
1014
|
.catch((res) => {
|
|
1015
|
// 请求失败处理...
|
|
1016
|
})
|
1015
|
1017
|
},
|
1016
|
1018
|
onChangeDate() { // 轨迹时间选择
|
1017
|
1019
|
},
|
|
@ -1028,21 +1030,21 @@ export default {
|
1028
|
1030
|
alarmLogId: item.alarmLogId
|
1029
|
1031
|
}))
|
1030
|
1032
|
this.$test
|
1031
|
|
.post(services.rescue.CLOSE_RESCUE, params)
|
1032
|
|
.then((res) => {
|
1033
|
|
console.log(res.data.result)
|
1034
|
|
if (res.data.result) {
|
1035
|
|
this.layer.personLayer.eachLayer(layer => {
|
1036
|
|
if (layer.getAttributes().deviceId === item.deviceId) {
|
1037
|
|
item.locationStatus = '0'
|
1038
|
|
this.popupContent(item, layer)
|
1039
|
|
}
|
1040
|
|
})
|
1041
|
|
}
|
1042
|
|
})
|
1043
|
|
.catch((res) => {
|
|
1033
|
.post(services.rescue.CLOSE_RESCUE, params)
|
|
1034
|
.then((res) => {
|
|
1035
|
console.log(res.data.result)
|
|
1036
|
if (res.data.result) {
|
|
1037
|
this.layer.personLayer.eachLayer(layer => {
|
|
1038
|
if (layer.getAttributes().deviceId === item.deviceId) {
|
|
1039
|
item.locationStatus = '0'
|
|
1040
|
this.popupContent(item, layer)
|
|
1041
|
}
|
|
1042
|
})
|
|
1043
|
}
|
|
1044
|
})
|
|
1045
|
.catch((res) => {
|
1044
|
1046
|
|
1045
|
|
})
|
|
1047
|
})
|
1046
|
1048
|
},
|
1047
|
1049
|
cancel: () => {
|
1048
|
1050
|
console.log('点击了取消')
|
|
@ -1052,16 +1054,16 @@ export default {
|
1052
|
1054
|
appoint(item) { // 打开指派Modal
|
1053
|
1055
|
console.log(item)
|
1054
|
1056
|
this.$test
|
1055
|
|
.post(services.rescue.RESCUER_LIST, '')
|
1056
|
|
.then((res) => {
|
1057
|
|
this.rescueModal = true
|
1058
|
|
console.log(res)
|
1059
|
|
this.appointAlarmId = item.alarmLogId
|
1060
|
|
this.rescuer = res.data.dataList
|
1061
|
|
})
|
1062
|
|
.catch((res) => {
|
|
1057
|
.post(services.rescue.RESCUER_LIST, '')
|
|
1058
|
.then((res) => {
|
|
1059
|
this.rescueModal = true
|
|
1060
|
console.log(res)
|
|
1061
|
this.appointAlarmId = item.alarmLogId
|
|
1062
|
this.rescuer = res.data.dataList
|
|
1063
|
})
|
|
1064
|
.catch((res) => {
|
1063
|
1065
|
|
1064
|
|
})
|
|
1066
|
})
|
1065
|
1067
|
},
|
1066
|
1068
|
cancel() {
|
1067
|
1069
|
this.rescueModal = false
|
|
@ -1077,19 +1079,19 @@ export default {
|
1077
|
1079
|
rescuersId: this.formValidate.rescue
|
1078
|
1080
|
}))
|
1079
|
1081
|
this.$test
|
1080
|
|
.post(services.rescue.ASSIGN_RESCUER, params)
|
1081
|
|
.then((res) => {
|
1082
|
|
if (res.data.result) {
|
1083
|
|
this.$Message.success('指派成功!')
|
1084
|
|
this.rescueModal = false
|
1085
|
|
} else {
|
1086
|
|
this.$Message.danger('指派失败!')
|
1087
|
|
this.rescueModal = false
|
1088
|
|
}
|
1089
|
|
})
|
1090
|
|
.catch((res) => {
|
|
1082
|
.post(services.rescue.ASSIGN_RESCUER, params)
|
|
1083
|
.then((res) => {
|
|
1084
|
if (res.data.result) {
|
|
1085
|
this.$Message.success('指派成功!')
|
|
1086
|
this.rescueModal = false
|
|
1087
|
} else {
|
|
1088
|
this.$Message.danger('指派失败!')
|
|
1089
|
this.rescueModal = false
|
|
1090
|
}
|
|
1091
|
})
|
|
1092
|
.catch((res) => {
|
1091
|
1093
|
|
1092
|
|
})
|
|
1094
|
})
|
1093
|
1095
|
}
|
1094
|
1096
|
})
|
1095
|
1097
|
},
|
|
@ -1184,44 +1186,44 @@ export default {
|
1184
|
1186
|
}
|
1185
|
1187
|
if (this.trackTypeCondition.currentIndex == 0) {
|
1186
|
1188
|
this.$test
|
1187
|
|
.post(services.trackAnalysis.GET_SINGLE_TRACE, params)
|
1188
|
|
.then((res) => {
|
1189
|
|
this.timelineList = res.data.toolRecordList
|
1190
|
|
this.timelineList.forEach(e => {
|
1191
|
|
e.inTime = e.inTime.split(' ')[1]
|
1192
|
|
e.color = 'info'
|
1193
|
|
e.status = 'normal'
|
1194
|
|
})
|
1195
|
|
this.trackData = [res.data]
|
1196
|
|
var mapOfPerson = {}
|
1197
|
|
this.personList.forEach(e => {
|
1198
|
|
mapOfPerson[e.workEmployeeId] = e.workEmployeeName
|
|
1189
|
.post(services.trackAnalysis.GET_SINGLE_TRACE, params)
|
|
1190
|
.then((res) => {
|
|
1191
|
this.timelineList = res.data.toolRecordList
|
|
1192
|
this.timelineList.forEach(e => {
|
|
1193
|
e.inTime = e.inTime.split(' ')[1]
|
|
1194
|
e.color = 'info'
|
|
1195
|
e.status = 'normal'
|
|
1196
|
})
|
|
1197
|
this.trackData = [res.data]
|
|
1198
|
var mapOfPerson = {}
|
|
1199
|
this.personList.forEach(e => {
|
|
1200
|
mapOfPerson[e.workEmployeeId] = e.workEmployeeName
|
|
1201
|
})
|
|
1202
|
this.trackData.forEach(e => {
|
|
1203
|
e.entityName = mapOfPerson[e.entityId]
|
|
1204
|
})
|
|
1205
|
this.startPlayback()
|
1199
|
1206
|
})
|
1200
|
|
this.trackData.forEach(e => {
|
1201
|
|
e.entityName = mapOfPerson[e.entityId]
|
|
1207
|
.catch((res) => {
|
|
1208
|
// 请求失败处理...
|
1202
|
1209
|
})
|
1203
|
|
this.startPlayback()
|
1204
|
|
})
|
1205
|
|
.catch((res) => {
|
1206
|
|
// 请求失败处理...
|
1207
|
|
})
|
1208
|
1210
|
} else {
|
1209
|
1211
|
this.$test
|
1210
|
|
.post(services.trackAnalysis.GET_MORE_TRACE, params)
|
1211
|
|
.then((res) => {
|
1212
|
|
this.trackData = res.data
|
1213
|
|
var mapOfPerson = {}
|
1214
|
|
this.personList.forEach(e => {
|
1215
|
|
mapOfPerson[e.workEmployeeId] = e.workEmployeeName
|
|
1212
|
.post(services.trackAnalysis.GET_MORE_TRACE, params)
|
|
1213
|
.then((res) => {
|
|
1214
|
this.trackData = res.data
|
|
1215
|
var mapOfPerson = {}
|
|
1216
|
this.personList.forEach(e => {
|
|
1217
|
mapOfPerson[e.workEmployeeId] = e.workEmployeeName
|
|
1218
|
})
|
|
1219
|
this.trackData.forEach(e => {
|
|
1220
|
e.entityName = mapOfPerson[e.entityId]
|
|
1221
|
})
|
|
1222
|
this.startPlaybackMulti()
|
1216
|
1223
|
})
|
1217
|
|
this.trackData.forEach(e => {
|
1218
|
|
e.entityName = mapOfPerson[e.entityId]
|
|
1224
|
.catch((res) => {
|
|
1225
|
// 请求失败处理...
|
1219
|
1226
|
})
|
1220
|
|
this.startPlaybackMulti()
|
1221
|
|
})
|
1222
|
|
.catch((res) => {
|
1223
|
|
// 请求失败处理...
|
1224
|
|
})
|
1225
|
1227
|
}
|
1226
|
1228
|
},
|
1227
|
1229
|
startPlaybackMulti() {
|