From a8d7c0dccfdb661d1a3fbb343c7983b33748b65a Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 8 Aug 2024 18:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E6=80=A5=E6=95=91=E6=8F=B4=E6=8C=87?= =?UTF-8?q?=E6=8C=A5=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emergency_map/components/baseTable.vue | 53 ++-- .../emergency_map/components/mapAssembly.vue | 273 +++++++----------- .../emergency_map/components/sysChat.vue | 29 +- .../incident_report/components/list.vue | 7 +- .../process_management/components/list.vue | 9 +- 5 files changed, 159 insertions(+), 212 deletions(-) diff --git a/src/views/emergen_cyrescue/emergency_map/components/baseTable.vue b/src/views/emergen_cyrescue/emergency_map/components/baseTable.vue index 222062f..3505066 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/baseTable.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/baseTable.vue @@ -1,41 +1,56 @@ @@ -59,99 +62,12 @@ export default { components: { baseTable, sysChat, DialogIndex }, data() { return { - info: {}, - infomations: { - dutyInfoData: [ - { - job: '值班领导', - name: '张三', - phone: '12939029382' - }, - { - job: '值班员', - name: '李四', - phone: '14939029382' - }, - { - job: '值班司机', - name: '玩股份', - phone: '10939029382' - }, - { - job: '值班领导', - name: '张三', - phone: '12939029382' - }, - { - job: '值班员', - name: '李四', - phone: '14939029382' - }, - { - job: '值班司机', - name: '玩股份', - phone: '10939029382' - }, - { - job: '值班领导', - name: '张三', - phone: '12939029382' - }, - { - job: '值班员', - name: '李四', - phone: '14939029382' - }, - { - job: '值班司机', - name: '玩股份', - phone: '10939029382' - } - ], - reservePlan: { - 应急预案名称: '项目突发事件处理应急预案', - 预案编号: '24590823424', - 适用领域: '医疗行业', - 预案类别: '自然灾害应急预案', - 预案级别: '三级预案', - 编制单位: '秦皇岛卓云科技', - 编制人: '藏下午', - 发布日期: '1722576942074', - 发布文号: '234235423' - }, - addressBook: [ - { - job: '总经理', - name: '张三', - phone: '12939029382' - }, - { - job: '总经理', - name: '李四', - phone: '14939029382' - }, - { - job: '总经理', - name: '玩股份', - phone: '10939029382' - }, - { - job: '总经理', - name: '张三', - phone: '12939029382' - }, - { - job: '总经理', - name: '李四', - phone: '14939029382' - }, - { - job: '总经理', - name: '玩股份', - phone: '10939029382' - } - ] + info: { + dutyInfoData: [], + reservePlan: {}, + addressBook: [] }, + chatData: [], infoDialog: { visible: false, id: '' @@ -159,19 +75,58 @@ export default { activeIndex: 0, rangeList: [20, 50, 100, 500, 1000, 5000], mapIco: [ - { id: 'e1899a925eb7478653007a9e7d17d588', ico: require('../../../../assets/map/emergency_rescue/point/img1.png') }, - { id: 'ea3555185c6498b2d3d07023de723806', ico: require('../../../../assets/map/emergency_rescue/point/img2.png') }, - { id: '52ddb251b528987c58c4d84fe0d83952', ico: require('../../../../assets/map/emergency_rescue/point/img3.png') }, - { id: '7f3d41464cdf450422ffe385c3aa870e', ico: require('../../../../assets/map/emergency_rescue/point/img4.png') }, - { id: '2ef8327624adad89b2dbf6b2e03ac6ef', ico: require('../../../../assets/map/emergency_rescue/point/img5.png') }, - { id: 'e1899a925eb7478653007a9e7d17d588', ico: require('../../../../assets/map/emergency_rescue/point/img6.png') }, - { id: '122abe9858feaecae1c80d2d851fcd57', ico: require('../../../../assets/map/emergency_rescue/point/img7.png') }, - { id: '637b70684bddcfbee0421db1443a972a', ico: require('../../../../assets/map/emergency_rescue/point/img8.png') }, - { id: '950700c9cd80c5e1b22a6c6cdf63a61d', ico: require('../../../../assets/map/emergency_rescue/point/img9.png') }, - { id: '1edb69abc25785c02e2e475162d65b17', ico: require('../../../../assets/map/emergency_rescue/point/img10.png') }, - { id: 'd25f2cae07902e373b72e74757e7a6ea', ico: require('../../../../assets/map/emergency_rescue/point/img11.png') }, - { id: 'be31acea122c423a9dbb431cc66a1351', ico: require('../../../../assets/map/emergency_rescue/point/img12.png') }, - { id: '759d323be34eae4bd83289b36af9ea47', ico: require('../../../../assets/map/emergency_rescue/point/img13.png') } + { + id: 'e1899a925eb7478653007a9e7d17d588', + ico: require('../../../../assets/map/emergency_rescue/point/img1.png') + }, + { + id: 'ea3555185c6498b2d3d07023de723806', + ico: require('../../../../assets/map/emergency_rescue/point/img2.png') + }, + { + id: '52ddb251b528987c58c4d84fe0d83952', + ico: require('../../../../assets/map/emergency_rescue/point/img3.png') + }, + { + id: '7f3d41464cdf450422ffe385c3aa870e', + ico: require('../../../../assets/map/emergency_rescue/point/img4.png') + }, + { + id: '2ef8327624adad89b2dbf6b2e03ac6ef', + ico: require('../../../../assets/map/emergency_rescue/point/img5.png') + }, + { + id: 'e1899a925eb7478653007a9e7d17d588', + ico: require('../../../../assets/map/emergency_rescue/point/img6.png') + }, + { + id: '122abe9858feaecae1c80d2d851fcd57', + ico: require('../../../../assets/map/emergency_rescue/point/img7.png') + }, + { + id: '637b70684bddcfbee0421db1443a972a', + ico: require('../../../../assets/map/emergency_rescue/point/img8.png') + }, + { + id: '950700c9cd80c5e1b22a6c6cdf63a61d', + ico: require('../../../../assets/map/emergency_rescue/point/img9.png') + }, + { + id: '1edb69abc25785c02e2e475162d65b17', + ico: require('../../../../assets/map/emergency_rescue/point/img10.png') + }, + { + id: 'd25f2cae07902e373b72e74757e7a6ea', + ico: require('../../../../assets/map/emergency_rescue/point/img11.png') + }, + { + id: 'be31acea122c423a9dbb431cc66a1351', + ico: require('../../../../assets/map/emergency_rescue/point/img12.png') + }, + { + id: '759d323be34eae4bd83289b36af9ea47', + ico: require('../../../../assets/map/emergency_rescue/point/img13.png') + } ], controlPoint: [ { @@ -317,56 +272,8 @@ export default { // 当前点击后选择的二级坐标点位分类集合 currSubControlPoint: [], subControlPointIndex: 0, - chatData: [ - [ - { - title: '刘大拿0', - content: '7月29日晚,清华毕业生马翔宇发出消息称:“感谢大家转发,目前我仍然是安全的。”并披露了部分录音', - isRead: true, - answers: [ - { - personnal: '王晋升', - content: '上班第一天,没有红包怎么开启工作模式?', - isReady: false - }, - { - personnal: '六大少', - content: '新年快乐,龙年大吉', - isReady: true - }, - { - personnal: '王紧生', - content: '和张云雷送辅助喝', - isReady: false - } - ] - } - ], - [ - { - title: '李彬', - content: '7月29日晚,清华毕业生马翔宇发出消息称:“感谢大家转发,目前我仍然是安全的。”并披露了部分录音', - isRead: true, - answers: [ - { - personnal: '张晓武', - content: '上班第一天,没有红包怎么开启工作模式?', - isReady: false - }, - { - personnal: '里核心', - content: '新年快乐,龙年大吉', - isReady: true - }, - { - personnal: '干呼气', - content: '和张云雷送辅助喝', - isReady: true - } - ] - } - ] - ] + webSocket: {}, + REPORT_ID: '1' } }, mounted() { @@ -378,7 +285,9 @@ export default { this.currSubControlPoint = this.subControlPoint['0'] }, created() { + this.REPORT_ID = this.$route.query.REPORT_ID this.initInfo() + this.initWebsocket() }, methods: { /** 地图初始化 */ @@ -402,16 +311,6 @@ export default { const icon = new window.BMapGL.Icon(config.fileUrl + anchor.iconUrl, imageSize, { imageSize }) const point = new window.BMapGL.Point(anchor.longitude, anchor.latitude) const marker = new window.BMapGL.Marker(point, { icon }) // 创建标注 - // const anchorOpts = { - // width: 90, - // height: 70, - // title: '资源信息' - // } - // const infoWindow = new window.BMapGL.InfoWindow(`资源名称: ${anchor.name || '无'}

`, anchorOpts) - // marker.addEventListener('mouseover', () => { - // mapInstance.openInfoWindow(infoWindow, point) - // }) - marker.addEventListener('click', async() => { this.infoDialog.visible = true }) @@ -504,7 +403,8 @@ export default { requestFN('/major/comprehensive/accidentList') .then((data) => { resolve(data) - }).catch((e) => { }) + }).catch((e) => { + }) }) }, // 一级坐标点位点击事件 @@ -552,11 +452,36 @@ export default { } ).then((data) => { console.log(data) + if (data.result === 'success') { + // 值班列表 + this.info.dutyInfoData = data.dutyList + // 预案信息 + this.info.reservePlan = data.planInfo + this.info.addressBook = data.addressBookList + this.chatData = data.instructList + console.log(data.instructList) + } loading.close() }).catch((e) => { console.log(e) loading.close() }) + }, + initWebsocket() { + const wsUrl = config.YjSysUrl + '/yjMessage/' + this.REPORT_ID + this.webSocket = new WebSocket(encodeURI(wsUrl)) + this.webSocket.onopen = () => { + console.info('指挥调度的webSocket链接成功') + } + this.webSocket.onerror = function() { + console.info('指挥调度的webSocket连接失败') + this.$message.error('消息链接失败!') + } + var _this = this + this.webSocket.onmessage = function(message) { + console.log(message) + _this.initInfo() + } } } } diff --git a/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue b/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue index 67e2344..734ec8f 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue @@ -1,16 +1,14 @@