From 0e56d36d7fe1d5a27b61c41c540bd573c2c8203d Mon Sep 17 00:00:00 2001 From: liujun Date: Wed, 15 May 2024 19:42:36 +0800 Subject: [PATCH 1/6] =?UTF-8?q?1=E3=80=81=E7=9B=B8=E5=85=B3=E6=96=B9?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E8=87=AA=E5=8A=A8=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xgf/flow/components/sendUtil.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/xgf/flow/components/sendUtil.vue b/src/views/xgf/flow/components/sendUtil.vue index 8bef0a8..914808c 100644 --- a/src/views/xgf/flow/components/sendUtil.vue +++ b/src/views/xgf/flow/components/sendUtil.vue @@ -17,6 +17,7 @@ :options="departmentTree" :normalizer="normalizer" v-model="form.APPOINT_DEPARTMENT_ID" + :default-expand-level="3" placeholder="请选择部门" no-options-text="暂无数据" no-children-text="暂无数据" From da01631b41b0b4e44c0a794887dd4c34db50ee23 Mon Sep 17 00:00:00 2001 From: limingyu Date: Mon, 20 May 2024 13:44:46 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=B8=80=E5=85=AC=E5=8F=B8=E7=9B=91?= =?UTF-8?q?=E7=AE=A1=E7=AB=AF=E5=9C=B0=E5=9B=BE=E9=97=A8=E5=8F=A3=E9=97=A8?= =?UTF-8?q?=E7=A6=81=E5=B1=95=E7=A4=BA=E6=94=B9=E4=B8=BA=E5=92=8C=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=AB=AF=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/dialog/index.vue | 2 +- src/views/map/dialog/mkGateMachine.vue | 9 ++++++++- src/views/map/index.vue | 10 ++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/map/dialog/index.vue b/src/views/map/dialog/index.vue index 69bd9b9..7f20057 100644 --- a/src/views/map/dialog/index.vue +++ b/src/views/map/dialog/index.vue @@ -11,7 +11,7 @@ - + diff --git a/src/views/map/dialog/mkGateMachine.vue b/src/views/map/dialog/mkGateMachine.vue index 33d8cbd..2d30780 100644 --- a/src/views/map/dialog/mkGateMachine.vue +++ b/src/views/map/dialog/mkGateMachine.vue @@ -79,6 +79,12 @@ export default { gangkou: { type: String, default: '' + }, + corpId: { + type: String, + default() { + return '' + } } }, data() { @@ -107,7 +113,8 @@ export default { { GATE_AREA_ID: this.id, TYPE: this.type, - GANGKOU: this.gangkou + GANGKOU: this.gangkou, + CORPINFO_ID: this.corpId } ).then((data) => { Object.assign(this.info, data.pd) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 4f6f9fd..c052698 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -459,6 +459,16 @@ export default { containAuthorization: [], eliminateAuthorization: [], list: [ + { + label: '人员', + dialog_width: '800px', + check: false, + img: require('../../assets/map/gangkou_index/buttom/ico1.png'), + checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'), + type: 'PERSON', + containAuthorization: [], + eliminateAuthorization: [] + }, { label: '车辆', dialog_width: '600px', From ece26192aac36f242ad65c7511ebf3bf7276a630 Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 20 May 2024 13:51:32 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=B9=9D=E5=85=AC=E5=8F=B8=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/dialog/index.vue | 5 +- src/views/map/dialog/peoplePositionYGS.vue | 2 +- src/views/map/index.vue | 70 ++++++++++++++++++++-- 3 files changed, 68 insertions(+), 9 deletions(-) diff --git a/src/views/map/dialog/index.vue b/src/views/map/dialog/index.vue index 69bd9b9..bdc983e 100644 --- a/src/views/map/dialog/index.vue +++ b/src/views/map/dialog/index.vue @@ -53,8 +53,8 @@ - - + + @@ -111,7 +111,6 @@ import outSourceVideoInfo from './outSourceVideoInfo.vue' import AlarmDevice from './alarmDevice' import meteorologicalMonitoring from './meteorologicalMonitoring.vue' - export default { components: { AlarmDevice, diff --git a/src/views/map/dialog/peoplePositionYGS.vue b/src/views/map/dialog/peoplePositionYGS.vue index 71c5673..552186d 100644 --- a/src/views/map/dialog/peoplePositionYGS.vue +++ b/src/views/map/dialog/peoplePositionYGS.vue @@ -41,7 +41,7 @@ 定位卡电量 - {{ info?otherInfo.data[3].currentValBody.val:'' }} + {{ info?(otherInfo?otherInfo.data[3].currentValBody.val:'*'):'' }} 部门 diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 4f6f9fd..0f5d6fd 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -1346,15 +1346,14 @@ export default { url: '/mapapi/ware/upload/qhdgysh/merge_tile.json' }) viewer.scene.primitives.add(qhdgysh) - var czkszhmt = new Cesium.Cesium3DTileset({ //沧州矿石 杂货码头 + var czkszhmt = new Cesium.Cesium3DTileset({ // 沧州矿石 杂货码头 url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/merge_tile.json' }) viewer.scene.primitives.add(czkszhmt) - var czksksmt = new Cesium.Cesium3DTileset({//沧州矿石 矿石码头 + var czksksmt = new Cesium.Cesium3DTileset({// 沧州矿石 矿石码头 url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/merge_tile.json' }) viewer.scene.primitives.add(czksksmt) - }, leftDownAction() { @@ -2050,6 +2049,10 @@ export default { this.clearMqttPoint('+/UwbBQ/') this.removeTrajectory() } + if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') { + this.clearRYDWPoint('+/UwbBQ/') + this.removeTrajectory() + } this.bottomOptionsList[pindex].list[index].check = false if (this.gangkouActive === '00004') { this.cfdBottomOptionsList[pindex].list[index].check = false @@ -2078,6 +2081,9 @@ export default { } if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') { !this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe() + } else if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') { + // websocket实时获取人员定位 + this.initRYDWWebsocket('21590a00ea5e462e9ee44dd332dddc26') } else { requestFN( pointUrl, @@ -2344,7 +2350,7 @@ export default { }, // 查询当前点位是否在区域内 - isPointxyWithinTheArea(pointBox, x, y) { + isPointxyWithinTheArea(pointBox = {}, x, y) { if (this.forEachIsPointInPolygon(pointBox.redList, x, y)) { return '_1' } else if (this.forEachIsPointInPolygon(pointBox.orangeList, x, y)) { @@ -2635,6 +2641,15 @@ export default { delete this.mqttPoint[key] } }, + clearRYDWPoint(prefix) { + this.fwebsocket.close() + for (const mqttPointKey in this.mqttPoint) { + const key = prefix ? prefix + this.mqttPoint[mqttPointKey] : mqttPointKey + viewer.entities.removeById(this.mqttPoint[key]) + this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== this.mqttPoint[key]) + delete this.mqttPoint[key] + } + }, // 删除人员定位点 clearCmtMqttPoint(prefix) { for (const mqttPointKey in this.allOrientationPoint) { @@ -2806,6 +2821,51 @@ export default { } } }, + // 九公司人员定位websocket + initRYDWWebsocket(CORP_INFO_ID) { + // eslint-disable-next-line no-unused-vars + const _this = this + if (window.WebSocket) { + const wsUrl = config.noDwSysUrl + '/ltLocation/DW_' + new Date().getTime() + '_98' + _this.fwebsocket = new WebSocket(encodeURI(wsUrl)) + _this.fwebsocket.onmessage = function(message) { + console.info('接收消息') + const peopleList = JSON.parse(message.data).data.data + console.log(peopleList) + for (let i = 0; i < peopleList.length; i++) { + const item = peopleList[i] + if ((!item) || (item.ts === 1)) continue + // 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点 + const index = _this.onePerLocArr.findIndex(item1 => { + return item1.id.toString() === item.id.toString() + }) + const x = item.lon + const y = item.lat + const pointColor = _this.isPointxyWithinTheArea(this.pointBox, x, y) + if (index !== -1) { + _this.onePerLocArr[index].x = x + _this.onePerLocArr[index].y = y + _this.onePerLocArr[index].icon_type = 'img4_0' + pointColor + ry_drag.getPosition(_this.onePerLocArr[index]) + } else { + const perLoc = { + id: item.id, + x: x, + y: y, + icon_type: 'img4_0' + pointColor, + data_id: item.id, + point_type: '标记点peoplePositionOne', + label: '人员定位', + corpInfoId: CORP_INFO_ID + } + _this.onePerLocArr.push(perLoc) + ry_drag.addEntity(perLoc) + _this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id + } + } + } + } + }, radomPer(mockData) { for (const item of mockData.data) { item.longitude += 0.0003 * Math.random() @@ -3042,7 +3102,7 @@ export default { }, // 循环判断某个点是否在某些区域内。只要在任意一个区域内。则返回true - forEachIsPointInPolygon(polygonList, lng, lat) { + forEachIsPointInPolygon(polygonList = [], lng, lat) { return polygonList.some(item => { return this.isPointInPolygon(item.position, lng, lat) }) From 93ffe2b5af8d6580818874048a4019612cb8c51a Mon Sep 17 00:00:00 2001 From: limingyu Date: Mon, 20 May 2024 14:46:11 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=B8=80=E5=85=AC=E5=8F=B8=E9=97=A8?= =?UTF-8?q?=E5=8F=A3=E9=97=A8=E7=A6=81=E5=9C=B0=E5=9B=BE=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=82=B9=E4=BD=8D=E8=AF=A6=E6=83=85=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/dialog/mkGateMachine.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/map/dialog/mkGateMachine.vue b/src/views/map/dialog/mkGateMachine.vue index 2d30780..aa3ba24 100644 --- a/src/views/map/dialog/mkGateMachine.vue +++ b/src/views/map/dialog/mkGateMachine.vue @@ -34,8 +34,8 @@ {{ item.USERNAME }} {{ item.TIME }} - 进入 - 出去 + 进入 + 出去 @@ -150,7 +150,8 @@ export default { { GATE_AREA_ID: this.id, TYPE: this.type, - GANGKOU: this.gangkou + GANGKOU: this.gangkou, + CORPINFO_ID: this.corpId } ).then((data) => { this.recordAllList = data.recordAllList From 80df79c653020b866b6b097d6ca3806591f2636e Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 20 May 2024 16:08:39 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=95=B0bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 0f5d6fd..8c138e9 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -2834,7 +2834,7 @@ export default { console.log(peopleList) 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() From 83a324ee44d282d202d74103063b6c51f7101955 Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 20 May 2024 18:05:34 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=9B=9E=E6=BB=9A?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/index.vue | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 6c4aa93..8c138e9 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -459,16 +459,6 @@ export default { containAuthorization: [], eliminateAuthorization: [], list: [ - { - label: '人员', - dialog_width: '800px', - check: false, - img: require('../../assets/map/gangkou_index/buttom/ico1.png'), - checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'), - type: 'PERSON', - containAuthorization: [], - eliminateAuthorization: [] - }, { label: '车辆', dialog_width: '600px',