diff --git a/src/assets/map/gangkou_index/buttom/ico29.png b/src/assets/map/gangkou_index/buttom/ico29.png new file mode 100644 index 0000000..090a8af Binary files /dev/null and b/src/assets/map/gangkou_index/buttom/ico29.png differ diff --git a/src/assets/map/gangkou_index/buttom/ico29_on.png b/src/assets/map/gangkou_index/buttom/ico29_on.png new file mode 100644 index 0000000..23c82f5 Binary files /dev/null and b/src/assets/map/gangkou_index/buttom/ico29_on.png differ diff --git a/src/views/map/components/renyuan.vue b/src/views/map/components/renyuan.vue index 3a1e6e9..4205302 100644 --- a/src/views/map/components/renyuan.vue +++ b/src/views/map/components/renyuan.vue @@ -55,7 +55,7 @@ -
+
@@ -72,6 +72,25 @@
+
+ +
+
+
+
报警类型
+
报警时间
+
触发人
+
报警地点
+
+
+
{{ item.alarmName }}
+
{{ item.alarmTime }}
+
{{ item.foulUserName }}
+
{{ item.place }}
+
+
+
+
@@ -173,37 +192,59 @@ export default { }, getData() { requestFN( - '/map/getAllDwMessage', - { corpId: this.corpInfoId } + '/map/getAllDwMessage', { corpId: this.corpInfoId } ).then((data) => { - this.block4List = data.alarmList.list - this.block1OptionsList = [ - { - title: '在线设备数', - img: require('../../../assets/map/renyuan/ico1.png'), - count: data.orthermessage.onlineDeviceNum - }, - { - title: '在线人员', - img: require('../../../assets/map/renyuan/img1ico1.png'), - count: data.orthermessage.infoList.UwbBQ.num - }, - { - title: '在线基站数', - img: require('../../../assets/map/renyuan/ico3.png'), - count: data.orthermessage.infoList.UwbJiZhan.num - }, - { - title: '在线摄像头数', - img: require('../../../assets/map/renyuan/ico4.png'), - count: data.orthermessage.infoList.HKcamera.num - }, - { - title: '在线报警设备数', - img: require('../../../assets/map/renyuan/ico5.png'), - count: data.orthermessage.infoList.tklyr.num - } - ] + // 一公司人员定位系统(我知道这里写的拉但是没办法,一天要把功能改完,后续有缘人在重构吧) + if (this.corpInfoId === '035958e685cf4850bc40151c5e0617a6') { + this.block4List = data.alarmList.list + this.block1OptionsList = [ + { + title: '在线设备数', + img: require('../../../assets/map/renyuan/ico1.png'), + count: data.orthermessage.onlineDeviceNum + }, + { + title: '在线人员', + img: require('../../../assets/map/renyuan/img1ico1.png'), + count: data.orthermessage.infoList.UwbBQ.num + }, + { + title: '在线基站数', + img: require('../../../assets/map/renyuan/ico3.png'), + count: data.orthermessage.infoList.UwbJiZhan.num + }, + { + title: '在线摄像头数', + img: require('../../../assets/map/renyuan/ico4.png'), + count: data.orthermessage.infoList.HKcamera.num + }, + { + title: '在线报警设备数', + img: require('../../../assets/map/renyuan/ico5.png'), + count: data.orthermessage.infoList.tklyr.num + } + ] + } + if (this.corpInfoId === '21590a00ea5e462e9ee44dd332dddc26') { + this.block1OptionsList = [ + { + title: '总设备数', + img: require('../../../assets/map/renyuan/img1ico1.png'), + count: data.orthermessage.onlineDeviceNum + }, + { + title: '在线人员数', + img: require('../../../assets/map/renyuan/img1ico1.png'), + count: data.orthermessage.lockNum + }, + { + title: '离线人数', + img: require('../../../assets/map/renyuan/img1ico1.png'), + count: data.orthermessage.unLockNum + } + ] + this.block4List = data.orthermessage.alarmList + } }).catch((e) => { this.$message.error(e) }) diff --git a/src/views/map/dialog/peoplePositionYGS.vue b/src/views/map/dialog/peoplePositionYGS.vue index 10191ed..c954e60 100644 --- a/src/views/map/dialog/peoplePositionYGS.vue +++ b/src/views/map/dialog/peoplePositionYGS.vue @@ -1,5 +1,5 @@ diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 3948f59..83b6f05 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -182,6 +182,18 @@ + +
+ + + + 搜索 + 重置 +
+
@@ -656,26 +668,17 @@ export default { checkImg: require('../../assets/map/gangkou_index/buttom/ico21_on.png'), containAuthorization: [], eliminateAuthorization: [] + }, + { + label: '人员轨迹', + dialog_width: '1200px', + check: false, + type: 'peopleTrajectory', + img: require('../../assets/map/gangkou_index/buttom/ico29.png'), + checkImg: require('../../assets/map/gangkou_index/buttom/ico29_on.png'), + containAuthorization: [], + eliminateAuthorization: [] } - // { - // label: '摄像头', - // dialog_width: '1200px', - // check: false, - // type: 'platcamera', - // img: require('../../assets/map/gangkou_index/buttom/ico26.png'), - // checkImg: require('../../assets/map/gangkou_index/buttom/ico26_on.png'), - // containAuthorization: [], - // eliminateAuthorization: [] - // } - // { - // label: '车辆定位', - // dialog_width: '1200px', - // check: false, - // img: require('../../assets/map/gangkou_index/buttom/ico22.png'), - // checkImg: require('../../assets/map/gangkou_index/buttom/ico22_on.png'), - // containAuthorization: [], - // eliminateAuthorization: [] - // } ] }, { @@ -1091,7 +1094,9 @@ export default { longitude: '', latitude: '' }, - trajectoryEntityCollection: {} + trajectoryEntityCollection: {}, + isPeopleTrajectory: false, + peopleTrajectoryValue: '' } }, mounted() { @@ -1226,12 +1231,13 @@ export default { } }, Cesium.ScreenSpaceEventType.RIGHT_CLICK) }, - addTrajectory(point_id, corpInfoId) { + addTrajectory() { + this.removeTrajectory() requestFN( '/map/getPersonTrace', { - id: point_id, - corpId: corpInfoId + id: this.peopleTrajectoryValue, + corpId: this.CORP_INFO_ID } ).then((data) => { if (data.list) { @@ -1671,6 +1677,7 @@ export default { this.bottomOptionsList[i].list[j].check = false } } + this.isPeopleTrajectory = false } }, clearAllBottomOptionsItemsEntityCollection() { @@ -1757,10 +1764,22 @@ export default { } this.carLocArr = [] } + if (urlType === 'peopleTrajectory') { + this.isPeopleTrajectory = false + } if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') { this.doUnSubscribe() this.clearMqttPoint('+/UwbBQ/') this.removeTrajectory() + for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) { + if (this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory') { + if (this.bottomOptionsList[pindex].list[i].check) { + this.bottomOptionsList[pindex].list[i].check = false + this.isPeopleTrajectory = false + break + } + } + } } if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') { this.clearRYDWPoint('+/UwbBQ/') @@ -1778,6 +1797,23 @@ export default { } }) } else { + if (urlType === 'peopleTrajectory') { + let flag = false + for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) { + if (this.bottomOptionsList[pindex].list[i].type === 'peoplePosition') { + if (!this.bottomOptionsList[pindex].list[i].check) { + flag = true + break + } + } + } + if (flag) { + this.$message.warning('请先选择人员定位!!!') + return + } else { + this.isPeopleTrajectory = true + } + } this.bottomOptionsList[pindex].list[index].check = true if (this.gangkouActive === '00004') { this.cfdBottomOptionsList[pindex].list[index].check = true @@ -2341,10 +2377,10 @@ export default { _this.fwebsocket = new WebSocket(encodeURI(wsUrl)) _this.fwebsocket.onmessage = function(message) { console.info('接收消息') - const peopleList = JSON.parse(message.data).data.data + const peopleList = JSON.parse(message.data) for (let i = 0; i < peopleList.length; i++) { const item = peopleList[i] - if ((!item) || (item.ts === 1)) continue + if ((!item)) continue // 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点 const index = _this.onePerLocArr.findIndex(item1 => { return item1.id.toString() === item.id.toString() @@ -2360,6 +2396,7 @@ export default { } else { const perLoc = { id: item.id, + name: item.name, x: x, y: y, icon_type: 'img4_0' + pointColor, @@ -3099,9 +3136,52 @@ export default { transform: translateY(0); } } +.people_trajectory{ + position: absolute; + top: -60px; + left: 0; + width: 400px; + padding: 10px; + background-image: linear-gradient(to right, rgb(31 62 129 / 57%) 0%, rgb(17 93 255 / 40%) 50%, rgb(31 62 129 / 57%) 100%); + .search_btn{ + background-color: #1563e3; + color: #fff; + border-color: #1563e3; + } + .reset_btn{ + background-color: #558be5; + color: #fff; + border-color: #558be5; + } +} diff --git a/src/views/map/js/ry_dragentity.js b/src/views/map/js/ry_dragentity.js index 4472aad..82c02e8 100644 --- a/src/views/map/js/ry_dragentity.js +++ b/src/views/map/js/ry_dragentity.js @@ -30,6 +30,16 @@ export default class DragEntity { heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, disableDepthTestDistance: Number.POSITIVE_INFINITY }, + label: { + text: point.name ? point.name : point.id, + font: '13px sans-serif', + pixelOffset: new Cesium.Cartesian2(0, -55), + showBackground: true, + // eslint-disable-next-line new-cap + backgroundColor: new Cesium.Color.fromCssColorString('rgba(20, 58, 142, 1)'), + backgroundPadding: new Cesium.Cartesian2(7, 5), + disableDepthTestDistance: Number.POSITIVE_INFINITY + }, orientation: new Cesium.VelocityOrientationProperty(point.property), monitoItems: { @@ -43,7 +53,9 @@ export default class DragEntity { this.viewer.clock.clockRange = Cesium.ClockRange.CLAMPED this.viewer.clock.shouldAnimate = false } - + delEntity(point) { + this.viewer.entities.remove(point) + } getPosition(point) { if (this.viewer.clock.shouldAnimate === false) { this.viewer.clock.shouldAnimate = true