From 598695df6f2caad6f0ae1289bbfc185fcdf8ae89 Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 12 Aug 2024 15:10:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8D=8A=E5=BE=84bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emergency_map/components/dialog.vue | 4 +- .../emergency_map/components/mapAssembly.vue | 43 ++++++++++++++- .../emergency_map/components/sysChat.vue | 2 +- .../emergency_map/dialog/sendMessage.vue | 53 +++++++++++++++++++ 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 src/views/emergen_cyrescue/emergency_map/dialog/sendMessage.vue diff --git a/src/views/emergen_cyrescue/emergency_map/components/dialog.vue b/src/views/emergen_cyrescue/emergency_map/components/dialog.vue index 77d62ab..29d6bd5 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/dialog.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/dialog.vue @@ -26,6 +26,7 @@ + @@ -41,9 +42,10 @@ import BiNanSuo from '../dialog/biNanSuo.vue' import PaiShuiJing from '../dialog/paiShuiJing.vue' import FengBiKaKou from '../dialog/fengBiKaKou.vue' import BaoJing from '../dialog/baoJing.vue' +import SendMessage from '../dialog/sendMessage.vue' export default { - components: { WuZi, BiNanSuo, PaiShuiJing, FengBiKaKou, BaoJing, videoPlayPlat, windspeedstation, weatherstation, XfPoint, XfControl }, + components: { SendMessage, WuZi, BiNanSuo, PaiShuiJing, FengBiKaKou, BaoJing, videoPlayPlat, windspeedstation, weatherstation, XfPoint, XfControl }, props: { visible: { type: Boolean, diff --git a/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue b/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue index 064ef3e..54e49c9 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue @@ -293,7 +293,11 @@ export default { REPORT_ID: null, FIRERESERVEPLAN_ID: null, CODE: null, - CORPIFNO_ID: JSON.parse(sessionStorage.getItem('user')).CORPIFNO_ID + CORPIFNO_ID: JSON.parse(sessionStorage.getItem('user')).CORPIFNO_ID, + firstPoint: { + x: null, + y: null + } } }, mounted() { @@ -322,15 +326,39 @@ export default { methods: { /** 地图初始化 */ mapInit(e) { + this.firstPoint.x = e.x + this.firstPoint.y = e.y mapInstance = new window.BMapGL.Map('map') // 创建地图实例 mapInstance.centerAndZoom(new window.BMapGL.Point(e.y, e.x), 15) // 创建点坐标 mapInstance.enableScrollWheelZoom(true) // 开启鼠标滚轮缩放能力 + var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) // 设置中心点坐标(例如北京天安门) + mapInstance.centerAndZoom(point, 15) // 设置中心点和缩放级别 + mapInstance.enableScrollWheelZoom(true) + var circle = new window.BMapGL.Circle(point, this.range, { + strokeColor: 'blue', + strokeWeight: 2, + strokeOpacity: 0.5, + fillColor: 'blue', + fillOpacity: 0.2 + }) + mapInstance.addOverlay(circle) }, setActive(item, index) { // 设置被选中项的索引 this.activeIndex = index this.range = item mapInstance.clearOverlays() + var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) // 设置中心点坐标(例如北京天安门) + mapInstance.centerAndZoom(point, 15) // 设置中心点和缩放级别 + mapInstance.enableScrollWheelZoom(true) + var circle = new window.BMapGL.Circle(point, item, { // 2000米半径 + strokeColor: 'blue', + strokeWeight: 2, + strokeOpacity: 0.5, + fillColor: 'blue', + fillOpacity: 0.2 + }) + mapInstance.addOverlay(circle) this.initPoint({ code: this.CODE, reportId: this.REPORT_ID, range: this.range }) }, /** 扎点方法 */ @@ -454,6 +482,17 @@ export default { // 二级坐标点位点击事件 subToggleCheck(sos, ind) { mapInstance.clearOverlays() + var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) // 设置中心点坐标(例如北京天安门) + mapInstance.centerAndZoom(point, 15) // 设置中心点和缩放级别 + mapInstance.enableScrollWheelZoom(true) + var circle = new window.BMapGL.Circle(point, this.range, { // 2000米半径 + strokeColor: 'blue', + strokeWeight: 2, + strokeOpacity: 0.5, + fillColor: 'blue', + fillOpacity: 0.2 + }) + mapInstance.addOverlay(circle) this.initPoint(sos) this.currSubControlPoint.forEach((item, idx) => { if (idx === ind) { @@ -466,6 +505,8 @@ export default { // 接收子组件传递出来的指令发送的事件 handlerOrderMessage() { this.infoDialog.visible = true + this.infoDialog.info = {} + this.infoDialog.title = '指令信息' }, initInfo() { const loading = this.$loading({ diff --git a/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue b/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue index c608187..9bbb8a4 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/sysChat.vue @@ -36,7 +36,7 @@ export default { }, methods: { sendOrderBtn() { - this.$emit('orderMessage') + this.$emit('orderMessage', '') }, confirmReceipt(answer) { requestFN('/bi/emergency/readInstruct', { ID: answer.ID }) diff --git a/src/views/emergen_cyrescue/emergency_map/dialog/sendMessage.vue b/src/views/emergen_cyrescue/emergency_map/dialog/sendMessage.vue new file mode 100644 index 0000000..555894c --- /dev/null +++ b/src/views/emergen_cyrescue/emergency_map/dialog/sendMessage.vue @@ -0,0 +1,53 @@ + + + +