diff --git a/src/views/emergen_cyrescue/emergency_map/components/dialog.vue b/src/views/emergen_cyrescue/emergency_map/components/dialog.vue index e523318..77d62ab 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/dialog.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/dialog.vue @@ -6,17 +6,26 @@ :title="title" :width="width" append-to-body - custom-class="bi_enterprise_dialog" top="5vh" @close="handlerClose"> - - + + - - + + - + + + + + + + + + + + @@ -27,9 +36,14 @@ import XfPoint from '../../../map/dialog/xfPoint.vue' import weatherstation from '../../../map/dialog/weatherstation.vue' import windspeedstation from '../../../map/dialog/weatherstation.vue' import videoPlayPlat from '../../../map/dialog/video_play_plat.vue' +import WuZi from '../dialog/wuZi.vue' +import BiNanSuo from '../dialog/biNanSuo.vue' +import PaiShuiJing from '../dialog/paiShuiJing.vue' +import FengBiKaKou from '../dialog/fengBiKaKou.vue' +import BaoJing from '../dialog/baoJing.vue' export default { - components: { videoPlayPlat, windspeedstation, weatherstation, XfPoint, XfControl }, + components: { 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 013fbe1..0d68cc1 100644 --- a/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue +++ b/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue @@ -75,6 +75,7 @@ export default { title: '' }, activeIndex: 0, + range: 20, rangeList: [20, 50, 100, 500, 1000, 5000], mapIco: [ { @@ -296,9 +297,10 @@ export default { }, mounted() { /** 调用地图初始化方法 */ - this.mapInit() + this.firstInitPoint() + /** 调用初始化点位绘制方法 */ - this.initPoints() + // this.initPoints() /** 初始化选中首个二级坐标点位分类 */ this.currSubControlPoint = this.subControlPoint['0'] }, @@ -307,31 +309,30 @@ export default { this.FIRERESERVEPLAN_ID = this.$route.query.FIRERESERVEPLAN_ID this.initInfo() this.initWebsocket() + this.initPoint({ code: 0, REPORT_ID: this.REPORT_ID, range: this.range }) }, beforeDestroy() { if (this.webSocket) { - console.log('关闭websocket') this.webSocket.close() } if (this.heartbeat) { - console.log('清除定时器') clearInterval(this.heartbeat) } }, methods: { /** 地图初始化 */ - mapInit() { + mapInit(e) { mapInstance = new window.BMapGL.Map('map') // 创建地图实例 - mapInstance.centerAndZoom(new window.BMapGL.Point('119.645516', '39.934547'), 15) // 创建点坐标 + mapInstance.centerAndZoom(new window.BMapGL.Point(e.y, e.x), 15) // 创建点坐标 mapInstance.enableScrollWheelZoom(true) // 开启鼠标滚轮缩放能力 }, setActive(item, index) { // 设置被选中项的索引 this.activeIndex = index + this.range = item }, /** 扎点方法 */ addPoint(anchor) { - console.log(anchor) if (!anchor.icon) throw new Error('请传入图标') if (!anchor.y) throw new Error('请传入经度') if (!anchor.x) throw new Error('请传入纬度') @@ -343,7 +344,6 @@ export default { this.infoDialog.visible = true this.infoDialog.info = anchor this.infoDialog.title = anchor.typeName - console.log(anchor) }) mapInstance.addOverlay(marker) // 将标注添加到地图中 }, @@ -508,7 +508,6 @@ export default { } var _this = this this.webSocket.onmessage = function(message) { - console.log(message) _this.initInfo() } // 新建心跳,持续监听链接是否存活 @@ -532,7 +531,9 @@ export default { requestFN( '/bi/emergency/getPoint', { - code: row.code + code: row.code, + reportId: this.REPORT_ID, + range: this.range } ).then((data) => { if (data.result === 'success') { @@ -545,6 +546,25 @@ export default { console.log(e) loading.close() }) + }, + firstInitPoint() { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + requestFN( + '/bi/emergency/firstPoint', { code: 0, reportId: this.REPORT_ID, range: this.range } + ).then((data) => { + if (data.result === 'success') { + this.mapInit(data.firstPoint) + } + loading.close() + }).catch((e) => { + console.log(e) + loading.close() + }) } } } diff --git a/src/views/emergen_cyrescue/emergency_map/dialog/baoJing.vue b/src/views/emergen_cyrescue/emergency_map/dialog/baoJing.vue new file mode 100644 index 0000000..0854d50 --- /dev/null +++ b/src/views/emergen_cyrescue/emergency_map/dialog/baoJing.vue @@ -0,0 +1,105 @@ + + + + diff --git a/src/views/emergen_cyrescue/emergency_map/dialog/biNanSuo.vue b/src/views/emergen_cyrescue/emergency_map/dialog/biNanSuo.vue new file mode 100644 index 0000000..ad790fc --- /dev/null +++ b/src/views/emergen_cyrescue/emergency_map/dialog/biNanSuo.vue @@ -0,0 +1,104 @@ + + + + diff --git a/src/views/emergen_cyrescue/emergency_map/dialog/fengBiKaKou.vue b/src/views/emergen_cyrescue/emergency_map/dialog/fengBiKaKou.vue new file mode 100644 index 0000000..45e0a47 --- /dev/null +++ b/src/views/emergen_cyrescue/emergency_map/dialog/fengBiKaKou.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/views/emergen_cyrescue/emergency_map/dialog/paiShuiJing.vue b/src/views/emergen_cyrescue/emergency_map/dialog/paiShuiJing.vue new file mode 100644 index 0000000..ba5353b --- /dev/null +++ b/src/views/emergen_cyrescue/emergency_map/dialog/paiShuiJing.vue @@ -0,0 +1,79 @@ + + + + diff --git a/src/views/emergen_cyrescue/emergency_map/dialog/wuZi.vue b/src/views/emergen_cyrescue/emergency_map/dialog/wuZi.vue new file mode 100644 index 0000000..c3ab74b --- /dev/null +++ b/src/views/emergen_cyrescue/emergency_map/dialog/wuZi.vue @@ -0,0 +1,68 @@ + + + +