From 901f26088fa713b4c2824f5ad8c720f90ff0f4e7 Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 14 Jan 2025 18:17:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?267=E5=85=AC=E5=8F=B8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/dialog/index.vue | 24 +++++++- src/views/map/index.vue | 107 ++++++++++++++++++++++++--------- 2 files changed, 100 insertions(+), 31 deletions(-) diff --git a/src/views/map/dialog/index.vue b/src/views/map/dialog/index.vue index 11687b4..ac8b6ca 100644 --- a/src/views/map/dialog/index.vue +++ b/src/views/map/dialog/index.vue @@ -62,8 +62,28 @@ - - + + diff --git a/src/views/map/index.vue b/src/views/map/index.vue index d30f9f2..0d91fb9 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -23,7 +23,9 @@ - + { }) @@ -1484,7 +1487,19 @@ export default { this.bubble(id) } if (this.gangkouActive === '00002' && point_type === 'peoplePositionCzks') { - const { label, point_type, id, corpInfoId, name, infoname, personPhoto, RyDeptName, RyPostName, RyRealName, personTypeName } = pick.id._monitoItems.data + const { + label, + point_type, + id, + corpInfoId, + name, + infoname, + personPhoto, + RyDeptName, + RyPostName, + RyRealName, + personTypeName + } = pick.id._monitoItems.data this.dialog.visible = true this.dialog.title = label this.dialog.type = point_type @@ -1536,7 +1551,17 @@ export default { return } if (point_type.indexOf('标记点') !== -1) { - const { label, point_type, data_id, corpInfoId, dialog_width, infoname, code, video_type, name } = pick.id._monitoItems.data + const { + label, + point_type, + data_id, + corpInfoId, + dialog_width, + infoname, + code, + video_type, + name + } = pick.id._monitoItems.data this.dialog.visible = true this.dialog.title = label this.dialog.name = name @@ -2247,7 +2272,12 @@ 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' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f' || this.CORP_INFO_ID === '') && urlType === 'peoplePosition') { + } else if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || + this.CORP_INFO_ID === '17973964c87346e7a4a737cf252557d9' || + this.CORP_INFO_ID === '97b87eba9f9c49a0a917c1f412016fb1' || + this.CORP_INFO_ID === '286dcae730aa43ba82c97a676f9d8ee2' || + this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f' || + this.CORP_INFO_ID === '') && urlType === 'peoplePosition') { // websocket实时获取人员定位 this.initRYDWWebsocket(this.CORP_INFO_ID) } else { @@ -2965,7 +2995,7 @@ export default { const index = ninePerLoc.findIndex(item1 => { return item1.id.toString() === item.cardId.toString() }) - this.isPointWithinTheArea(this.pointBox, ) + this.isPointWithinTheArea(this.pointBox,) if (index !== -1) { ninePerLoc[index].x = item.longitude ninePerLoc[index].y = item.latitude @@ -3070,13 +3100,15 @@ export default { // console.info(decodedStr) if (decodedStr) { // const perTrack = JSON.parse(decodedStr) - const perTrack = { 'msg': '000', 'data': [ - '8905,118.50022313549867,38.92716921306408,-88.96163116878053,0.15,8905,测试工单', - '8001,118.5044033058593,38.926660124965956,-88.96163116878053,0.15,8001,张悦', - '8002,118.48886198164132,38.916885738277635,-88.96163116878053,0.15,8002,齐津铖', - '8003,118.50289308906841,38.92012841170512,-88.96163116878053,0.15,8003,白伟', - '8004,118.48820877892216,38.91690951376236,-88.96163116878053,0.15,8004,孙海官' - ] } + const perTrack = { + 'msg': '000', 'data': [ + '8905,118.50022313549867,38.92716921306408,-88.96163116878053,0.15,8905,测试工单', + '8001,118.5044033058593,38.926660124965956,-88.96163116878053,0.15,8001,张悦', + '8002,118.48886198164132,38.916885738277635,-88.96163116878053,0.15,8002,齐津铖', + '8003,118.50289308906841,38.92012841170512,-88.96163116878053,0.15,8003,白伟', + '8004,118.48820877892216,38.91690951376236,-88.96163116878053,0.15,8004,孙海官' + ] + } if (perTrack.msg === '000' && perTrack.data && perTrack.data.length > 0) { perTrack.data.forEach(item => { const newPos = item.split(',') @@ -3122,7 +3154,9 @@ export default { // Convert binary string to character-number array - var charData = strData.split('').map(function(x) { return x.charCodeAt(0) }) + var charData = strData.split('').map(function(x) { + return x.charCodeAt(0) + }) // Turn number array into byte-array @@ -3239,11 +3273,17 @@ export default { _this.perLocArr.forEach((item, index) => { // 判断是否存在于四色区域内 const redFiled = [] - _this.pointBoxCfd.redList.forEach(item => { redFiled.push(...item['position']) }) + _this.pointBoxCfd.redList.forEach(item => { + redFiled.push(...item['position']) + }) const orangeFiled = [] - _this.pointBoxCfd.orangeList.forEach(item => { orangeFiled.push(...item['position']) }) + _this.pointBoxCfd.orangeList.forEach(item => { + orangeFiled.push(...item['position']) + }) const yellowFiled = [] - _this.pointBoxCfd.yellowList.forEach(item => { yellowFiled.push(...item['position']) }) + _this.pointBoxCfd.yellowList.forEach(item => { + yellowFiled.push(...item['position']) + }) if (this.redList.indexOf(item.cardNo) > -1) { _this.$set(_this.perLocArr[index], 'color', 'red') } else if (redFiled !== [] && _this.forEachIsPointInPolygon(_this.pointBoxCfd.redList, item.position.x, item.position.y)) { @@ -3489,7 +3529,7 @@ export default { background-size: 100% 100%; background-repeat: no-repeat; width: 100px; - height:30px; + height: 30px; position: absolute; top: 0; left: 0; @@ -3648,7 +3688,7 @@ export default { text-align: center; .suspension_img { - width:60px; + width: 60px; height: 60px; cursor: pointer; @@ -3747,19 +3787,22 @@ export default { transform: translateY(0); } } -.people_trajectory{ + +.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{ + + .search_btn { background-color: #1563e3; color: #fff; border-color: #1563e3; } - .reset_btn{ + + .reset_btn { background-color: #558be5; color: #fff; border-color: #558be5; @@ -3770,27 +3813,33 @@ export default { .cesium-viewer-toolbar, .cesium-viewer-fullscreenContainer, .cesium-infoBox-visible { display: none !important; } -.people_trajectory .el-input__inner{ + +.people_trajectory .el-input__inner { background-color: #100693 !important; border-color: #100693 !important; color: #fff !important; } -.people_trajectory_select{ + +.people_trajectory_select { background-color: #100693 !important; border-color: #100693 !important; } -.people_trajectory_select .el-select-dropdown__item{ + +.people_trajectory_select .el-select-dropdown__item { color: #fff !important; } -.people_trajectory_select .el-select-dropdown__item.hover{ + +.people_trajectory_select .el-select-dropdown__item.hover { background-color: #2111ec !important; color: #fff !important; } -.people_trajectory_select .popper__arrow{ + +.people_trajectory_select .popper__arrow { border-top-color: #100693 !important; border-bottom-color: #100693 !important; } -.people_trajectory_select .popper__arrow::after{ + +.people_trajectory_select .popper__arrow::after { border-top-color: #100693 !important; border-bottom-color: #100693 !important; } From 90ae203db22cddece7d90f7b52dad243db2c5434 Mon Sep 17 00:00:00 2001 From: LiuJiaNan Date: Tue, 25 Feb 2025 10:53:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=B7=B3=E8=BD=AC=E8=80=81=E7=B3=BB=E7=BB=9F=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/asyncRouter.js | 6 +++++- src/views/map/index.vue | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/asyncRouter.js b/src/asyncRouter.js index 7750987..d6ba197 100644 --- a/src/asyncRouter.js +++ b/src/asyncRouter.js @@ -48,7 +48,11 @@ router.beforeEach((to, from, next) => { if (to.path == `/login` || to.path == '/apiBI' || to.path == '/apivideomanager') { next() } else { - next(`/login`) + if (to.path == '/map' && to.query.userId) { + next() + } else { + next(`/login`) + } } } }) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 0d91fb9..7afe3d0 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -1259,6 +1259,7 @@ export default { } }, mounted() { + this.initUser() this.initMap() this.pointBoxCfd = loadMapBoxCfd() this.pointBoxCmt = loadCmtMapBox() @@ -1362,6 +1363,23 @@ export default { // }) // }) // }, + initUser() { + const { userId } = this.$route.query + if (!userId) return + requestFN( + '/admin/v2/login', + { userId } + ).then((res) => { + console.log(res) + if (res.result !== 'success') { + alert('登录失败') + window.close() + } + }).catch((e) => { + alert('登录失败') + window.close() + }) + }, initMap() { viewer = new Cesium.Viewer('cesiumContainer', { // terrainProvider: Cesium.createWorldTerrain() @@ -1425,6 +1443,13 @@ export default { // } // } // }, 1000) + const { id, longitude, latitude, CORP_INFO_ID, type } = this.$route.query + + if (type === 'newToOld') { + setTimeout(() => { + this.clickPort({ id, longitude, latitude, height: 10000, CORP_INFO_ID }) + }, 1000) + } }, loadTilesetHandler() { @@ -1962,6 +1987,10 @@ export default { handleClickRightTools(index) { if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check if (index === 0) { + if (this.$route.query.userId) { + window.close() + return + } if (this.gangkouActive === '00004') { // if (this.fwebsocket) { // this.fwebsocket.close()