From 652a051a2d847099ae235e8b22bbeff656fc0a84 Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 5 Sep 2024 10:19:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=B1=E5=85=AC=E5=8F=B8=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E7=B3=BB=E7=BB=9F=E5=8A=9F=E8=83=BD=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/components/renyuan.vue | 103 ++++++++++++++------- src/views/map/dialog/peoplePositionYGS.vue | 31 ++++++- src/views/map/index.vue | 40 ++++---- src/views/map/js/ry_dragentity.js | 2 +- 4 files changed, 120 insertions(+), 56 deletions(-) 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 552186d..c954e60 100644 --- a/src/views/map/dialog/peoplePositionYGS.vue +++ b/src/views/map/dialog/peoplePositionYGS.vue @@ -29,12 +29,12 @@ {{ otherInfo?otherInfo.postName:'' }} - + +
- @@ -48,6 +48,25 @@
姓名 {{ info?info.userName:'' }}
定位卡号: {{ info?info.id:'' }}{{ info?info.departmentName:'' }}
+ + + + + + + + + + + + + + + + + + +
姓名{{ (info && info.name) ? info.name : '未绑定人员' }}
定位卡号:{{ info?info.id:'' }}
定位卡电量{{ info?info.battery:'' }}
公司{{ info?info.corpName:'' }}
@@ -94,8 +113,12 @@ export default { corpId: this.corpId } ).then((data) => { - this.info = data.userInfo - this.otherInfo = data.statusInfo + if (data.code === 9999) { + this.$message.success(data.msg) + } else { + this.info = data.userInfo + this.otherInfo = data.statusInfo + } }).catch((e) => { }) } diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 5f017d6..efbc8b6 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -226,13 +226,13 @@ enter-active-class="animate__animated animate__fadeInDown" leave-active-class="animate__animated animate__fadeOutUp" > -
- - - - 搜索 - 重置 -
+
+ + + + 搜索 + 重置 +
@@ -925,7 +925,7 @@ export default { RyPostName: '', RyRealName: '', personTypeName: '', - GATE_VIDEO_ID:'' + GATE_VIDEO_ID: '' }, /* 曹妃甸使用参数开始*/ // 人员定位 @@ -1215,8 +1215,8 @@ export default { VIIDPort: '8088' }, trajectoryEntityCollection: {}, - isPeopleTrajectory:false, - peopleTrajectoryValue:'' + isPeopleTrajectory: false, + peopleTrajectoryValue: '' } }, mounted() { @@ -2121,7 +2121,7 @@ export default { } this.carLocArr = [] } - if(urlType === 'peopleTrajectory'){ + if (urlType === 'peopleTrajectory'){ this.isPeopleTrajectory = false } if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') { @@ -2129,8 +2129,8 @@ export default { 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){ + 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 @@ -2154,7 +2154,7 @@ export default { } }) } else { - if(urlType === 'peopleTrajectory'){ + 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'){ @@ -2164,10 +2164,10 @@ export default { } } } - if(flag){ + if (flag) { this.$message.warning('请先选择人员定位!!!') return - }else{ + } else { this.isPeopleTrajectory = true } } @@ -2652,8 +2652,7 @@ export default { personTypeName: item.personTypeName, data_id: item.cardId + '', point_type: 'peoplePositionCzks', - label: item.realName, - + label: item.realName } czksPerLoc.push(perLoc) ry_drag.addEntity(perLoc) @@ -2942,14 +2941,14 @@ 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) console.log(peopleList) for (let i = 0; i < peopleList.length; i++) { const item = peopleList[i] if ((!item)) continue // 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点 const index = _this.onePerLocArr.findIndex(item1 => { - return item1.id.toString() === item.id.toString() + return item1.id === item.id }) const x = item.lon const y = item.lat @@ -2962,6 +2961,7 @@ export default { } else { const perLoc = { id: item.id, + name: item.name, x: x, y: y, icon_type: 'img4_0' + pointColor, diff --git a/src/views/map/js/ry_dragentity.js b/src/views/map/js/ry_dragentity.js index 3a65fbb..82c02e8 100644 --- a/src/views/map/js/ry_dragentity.js +++ b/src/views/map/js/ry_dragentity.js @@ -31,7 +31,7 @@ export default class DragEntity { disableDepthTestDistance: Number.POSITIVE_INFINITY }, label: { - text: point.id, + text: point.name ? point.name : point.id, font: '13px sans-serif', pixelOffset: new Cesium.Cartesian2(0, -55), showBackground: true,