|
@ -321,14 +321,14 @@ export default {
|
321
|
321
|
}
|
322
|
322
|
},
|
323
|
323
|
mounted() {
|
324
|
|
this.getGisToken().then(() => {
|
|
324
|
this.getGisToken().then(() => { // 获取gistoken后加载地图
|
325
|
325
|
this.initMap()
|
326
|
326
|
this.initTrackMap()
|
327
|
327
|
})
|
328
|
328
|
setInterval(() => {
|
329
|
329
|
this.nowDate = new Date()
|
330
|
330
|
}, 1000)
|
331
|
|
EventBus.$on('person', (msg) => {
|
|
331
|
EventBus.$on('person', (msg) => { // 获取镜屏推送消息
|
332
|
332
|
this.changeLocation(msg)
|
333
|
333
|
})
|
334
|
334
|
},
|
|
@ -343,7 +343,7 @@ export default {
|
343
|
343
|
// 请求失败处理...
|
344
|
344
|
})
|
345
|
345
|
},
|
346
|
|
changeLocation(msg) {
|
|
346
|
changeLocation(msg) { // 修改人员信息状态等
|
347
|
347
|
var obj = JSON.parse(msg.body)
|
348
|
348
|
this.layer.personLayer.eachLayer((e) => {
|
349
|
349
|
if (e.getAttributes().deviceId == obj.deviceId) {
|
|
@ -352,8 +352,9 @@ export default {
|
352
|
352
|
}
|
353
|
353
|
})
|
354
|
354
|
},
|
355
|
|
popupContent(e, point) {
|
|
355
|
popupContent(e, point) { // 修改点的信息
|
356
|
356
|
console.log(e, point)
|
|
357
|
window.Vue = this
|
357
|
358
|
var icon, tips
|
358
|
359
|
var callHelp = ''
|
359
|
360
|
var other = ''
|
|
@ -376,6 +377,10 @@ export default {
|
376
|
377
|
} else if (e.locationStatus == '1') {
|
377
|
378
|
icon = '/static/images/offlineworker.png'
|
378
|
379
|
tips = '<div class="offline">离线</div>'
|
|
380
|
callHelp = '<div style="display:flex;">' +
|
|
381
|
'<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
|
|
382
|
'<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
|
|
383
|
'</div>'
|
379
|
384
|
if (attributes.locationStatus !== e.locationStatus) {
|
380
|
385
|
if (attributes.locationStatus == '0') {
|
381
|
386
|
this.personStatistics.offLine++
|
|
@ -394,7 +399,7 @@ export default {
|
394
|
399
|
if (e.locationStatus == '2') {
|
395
|
400
|
other = '<div class="row outline">' +
|
396
|
401
|
'<div>定点停留超时</div>' +
|
397
|
|
'<div>' + e.fixedLong + '</div>' +
|
|
402
|
'<div>' + e.fixedLong + 'min</div>' +
|
398
|
403
|
'</div>'
|
399
|
404
|
} else {
|
400
|
405
|
other = '<div class="row outline">' +
|
|
@ -421,7 +426,7 @@ export default {
|
421
|
426
|
'<div>' + e.alarmDate + '</div>' +
|
422
|
427
|
'</div>' + '<div class="row sos">' +
|
423
|
428
|
'<div>求救时长</div>' +
|
424
|
|
'<div>' + e.alarmLong + '</div>' +
|
|
429
|
'<div>' + e.alarmLong + 'min</div>' +
|
425
|
430
|
'</div>'
|
426
|
431
|
tips = '<div class="sos">SOS</div>'
|
427
|
432
|
callHelp = '<div style="display:flex;">' +
|
|
@ -481,7 +486,7 @@ export default {
|
481
|
486
|
.openOn(this.map)
|
482
|
487
|
})
|
483
|
488
|
},
|
484
|
|
initMap() {
|
|
489
|
initMap() { // 加载主屏地图
|
485
|
490
|
if (this.map != null && this.map != '') {
|
486
|
491
|
this.map.remove()
|
487
|
492
|
}
|
|
@ -506,18 +511,6 @@ export default {
|
506
|
511
|
this.loadEquipment()
|
507
|
512
|
this.loadPerson()
|
508
|
513
|
},
|
509
|
|
polyline() {
|
510
|
|
var polylineLayer = new Ai.FeatureGroup()
|
511
|
|
// 线绘制
|
512
|
|
var lineWktStr = 'LINESTRING ( ' + this.polylinearr + ')'
|
513
|
|
var polyline = new Ai.Polyline(lineWktStr, {
|
514
|
|
color: 'green',
|
515
|
|
opacity: 1.0
|
516
|
|
})
|
517
|
|
// this.polylinearr.arr(polyline);
|
518
|
|
polylineLayer.addLayer(polyline)
|
519
|
|
this.map.addLayer(polylineLayer)
|
520
|
|
},
|
521
|
514
|
polygon() { // 加载地图围栏
|
522
|
515
|
var params = new FormData()
|
523
|
516
|
this.$test
|
|
@ -553,9 +546,6 @@ export default {
|
553
|
546
|
// 请求失败处理...
|
554
|
547
|
})
|
555
|
548
|
},
|
556
|
|
showSlip() {
|
557
|
|
this.visible = true
|
558
|
|
},
|
559
|
549
|
loadEquipment() { // 加载地图设备
|
560
|
550
|
var params = new FormData()
|
561
|
551
|
this.$test
|
|
@ -594,6 +584,7 @@ export default {
|
594
|
584
|
})
|
595
|
585
|
},
|
596
|
586
|
loadPerson() { // 加载地图人员
|
|
587
|
window.Vue = this
|
597
|
588
|
this.personStatistics = {
|
598
|
589
|
all: 0,
|
599
|
590
|
offLine: 0,
|
|
@ -619,6 +610,10 @@ export default {
|
619
|
610
|
icon = '/static/images/offlineworker.png'
|
620
|
611
|
layer = this.layer.offLineLayer
|
621
|
612
|
tips = '<div class="offline">离线</div>'
|
|
613
|
callHelp = '<div style="display:flex;">' +
|
|
614
|
'<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
|
|
615
|
'<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
|
|
616
|
'</div>'
|
622
|
617
|
this.personStatistics.offLine++
|
623
|
618
|
} else if (e.locationStatus === '2' || e.locationStatus === '3') {
|
624
|
619
|
icon = '/static/images/outlineworker.png'
|
|
@ -689,7 +684,7 @@ export default {
|
689
|
684
|
// 请求失败处理...
|
690
|
685
|
})
|
691
|
686
|
},
|
692
|
|
showOrHide(layer, type, arr) {
|
|
687
|
showOrHide(layer, type, arr) { // 地图设备人员围栏显示和隐藏
|
693
|
688
|
layer.eachLayer((e) => {
|
694
|
689
|
if (arr.indexOf(e.getAttributes().locationStatus) != -1 || arr.indexOf(e.getAttributes().FACILITY_TYPE) != -1 || arr.indexOf(e.getAttributes().MAP_TAG_TYPE) != -1) {
|
695
|
690
|
if (this.map.hasLayer(e)) {
|
|
@ -701,18 +696,11 @@ export default {
|
701
|
696
|
}
|
702
|
697
|
}
|
703
|
698
|
})
|
704
|
|
// if (this.map.hasLayer(layer)) {
|
705
|
|
// this.map.removeLayer(layer)
|
706
|
|
// this.mapShow[type] = false
|
707
|
|
// } else {
|
708
|
|
// this.map.addLayer(layer)
|
709
|
|
// this.mapShow[type] = true
|
710
|
|
// }
|
711
|
699
|
},
|
712
|
|
changeTrackTime(index) {
|
|
700
|
changeTrackTime(index) { // 速度选择
|
713
|
701
|
this.trackQueryCondition.currentIndex = index
|
714
|
702
|
},
|
715
|
|
initTrackMap() {
|
|
703
|
initTrackMap() { // 加载轨迹地图
|
716
|
704
|
if (this.trackMap != null && this.trackMap != '') {
|
717
|
705
|
this.trackMap.remove()
|
718
|
706
|
}
|
|
@ -729,9 +717,11 @@ export default {
|
729
|
717
|
Ai.Scale({position: 'bottomright'}).addTo(this.trackMap)
|
730
|
718
|
Ai.Zoom({type: 'small'}).addTo(this.trackMap)
|
731
|
719
|
},
|
732
|
|
onChangeDate() {},
|
733
|
|
toExport() {},
|
734
|
|
close(item) {
|
|
720
|
onChangeDate() { // 轨迹时间选择
|
|
721
|
},
|
|
722
|
toExport() { // 轨迹导出
|
|
723
|
},
|
|
724
|
close(item) { // 人员报警关闭
|
735
|
725
|
this.$Confirm.confirm({
|
736
|
726
|
title: '确认要关闭张三落水报警吗?',
|
737
|
727
|
content: '关闭后将不再进行报警显示',
|
|
@ -745,6 +735,8 @@ export default {
|
745
|
735
|
},
|
746
|
736
|
cancel() {
|
747
|
737
|
this.rescueModal = false
|
|
738
|
},
|
|
739
|
appoint() { // 指派
|
748
|
740
|
}
|
749
|
741
|
}
|
750
|
742
|
}
|