diff --git a/config/dev.env.js b/config/dev.env.js index b62643c..cba3931 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -13,7 +13,9 @@ // BASE_API: '"https://yjaqjk.bda.gov.cn/smartwell"' // BASE_API: '"http://192.168.1.113:11302/smartwell"' // BASE_API: '"https://smartlog.work/smartwell"' - BASE_API: '"http://111.198.10.15:11302/smartwell"' + // BASE_API: '"http://111.198.10.15:11302/smartwell"' //在用 + BASE_API: '"http://192.168.43.120:11302"' + // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:14537"' }) diff --git a/config/dev.env.js b/config/dev.env.js index b62643c..cba3931 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -13,7 +13,9 @@ // BASE_API: '"https://yjaqjk.bda.gov.cn/smartwell"' // BASE_API: '"http://192.168.1.113:11302/smartwell"' // BASE_API: '"https://smartlog.work/smartwell"' - BASE_API: '"http://111.198.10.15:11302/smartwell"' + // BASE_API: '"http://111.198.10.15:11302/smartwell"' //在用 + BASE_API: '"http://192.168.43.120:11302"' + // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:14537"' }) diff --git a/src/api/overview.js b/src/api/overview.js index 8b15aeb..ffbb07c 100644 --- a/src/api/overview.js +++ b/src/api/overview.js @@ -3,13 +3,22 @@ */ import request from '@/utils/request' // 窨井查询 +// export function getWellList(params) { +// return request({ +// url: 'overview/wellList', +// method: 'get', +// params +// }) +// } +// 窨井查询 export function getWellList(params) { return request({ - url: 'overview/wellList', + url: 'overview/wellListDisplay', method: 'get', params }) } + // 获取窨井详情 export function getWellInfo(id) { return request({ diff --git a/config/dev.env.js b/config/dev.env.js index b62643c..cba3931 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -13,7 +13,9 @@ // BASE_API: '"https://yjaqjk.bda.gov.cn/smartwell"' // BASE_API: '"http://192.168.1.113:11302/smartwell"' // BASE_API: '"https://smartlog.work/smartwell"' - BASE_API: '"http://111.198.10.15:11302/smartwell"' + // BASE_API: '"http://111.198.10.15:11302/smartwell"' //在用 + BASE_API: '"http://192.168.43.120:11302"' + // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:14537"' }) diff --git a/src/api/overview.js b/src/api/overview.js index 8b15aeb..ffbb07c 100644 --- a/src/api/overview.js +++ b/src/api/overview.js @@ -3,13 +3,22 @@ */ import request from '@/utils/request' // 窨井查询 +// export function getWellList(params) { +// return request({ +// url: 'overview/wellList', +// method: 'get', +// params +// }) +// } +// 窨井查询 export function getWellList(params) { return request({ - url: 'overview/wellList', + url: 'overview/wellListDisplay', method: 'get', params }) } + // 获取窨井详情 export function getWellInfo(id) { return request({ diff --git a/src/components/leaftletMap/leafletMap.vue b/src/components/leaftletMap/leafletMap.vue index 1df7067..4dee899 100644 --- a/src/components/leaftletMap/leafletMap.vue +++ b/src/components/leaftletMap/leafletMap.vue @@ -26,7 +26,7 @@ }, // 图层地址列表 zoom: { // 缩放层级 type: Number, - default: 12 + default: 21 }, zooms: { type: Array, @@ -140,14 +140,6 @@ this.renderMarkers() } } - }, - // 是否显示报警 - showAlarm(val) { - if (this.showAll) { - this.renderNormalMarkers() // 画正常井 - } else { - this.renderMarkers() - } } }, mounted() { @@ -218,7 +210,7 @@ const icon = L.icon({ iconUrl: './static/images/map_images/alarm-well1.png', iconSize: size, - iconAnchor: anchor, + iconAnchor: [18, 15], popupAnchor: popupAnchor }) const opts = { @@ -230,15 +222,15 @@ // console.log('坐标', [item.position.lat, item.position.lng]) const marker = L.marker([item.position.lat, item.position.lng], opts) this.ciLayer.addLayer(marker) - map.setView(map.getCenter()) this.overlays.push(marker) } + map.setView(map.getCenter()) const that = this // 监听点击marker this.ciLayer.addOnClickListener(function(e, data) { - console.log('监听到点击告警信息') - console.log(e) - console.log(data[0].data.options) + // console.log('监听到点击告警信息') + // console.log(e) + // console.log(data[0].data.options) // 某井报警信息 getWellAlarms(data[0].data.options.wellId).then(response => { if (response.code === 200) { @@ -277,26 +269,20 @@ }, // 加载正常井markers renderNormalMarkers() { - console.log('渲染正常井图层') + // console.log('渲染正常井图层') const { map, normalMarkers, size, anchor, popupAnchor } = this if (!map) { return } - // if (this.ciLayer) { - // console.log('清理图层') - // map.removeLayer(this.ciLayer) - // } this.renderMarkers() // 正常图层 - // this.ciLayer = L.canvasIconLayer({}).addTo(map) - // this.overlays = [] // 遍历所有报警井信息 for (const item of normalMarkers) { console.log('画正常井图层') const icon = L.icon({ - iconUrl: './static/images/map_images/alarm-well.png', - iconSize: [25, 25], - iconAnchor: anchor, + iconUrl: './static/images/map_images/1.png', + iconSize: [12, 16], + iconAnchor: [6, 8], popupAnchor: popupAnchor }) const opts = { @@ -306,45 +292,8 @@ } const marker = L.marker([item.coordinateY, item.coordinateX], opts) this.ciLayer.addLayer(marker) - // map.setView(map.getCenter()) - // this.overlays.push(marker) } - const that = this - // 监听点击marker - this.ciLayer.addOnClickListener(function(e, data) { - console.log('监听到点击正常井信息') - console.log(e) - console.log(data[0].data.options) - getWellInfo(data[0].data.options.wellId).then(response => { - if (response.code === 200) { - const wellInfo = response.data - const normalInfo = { - wellCode: wellInfo.wellCode, - position: wellInfo.position, - wellTypeName: wellInfo.wellTypeName, - deptName: wellInfo.deptName, - bfztName: wellInfo.bfztName, - deep: wellInfo.deep - } - let dom = "