mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
各模块样式等布局优化,运行分析接口联调
This commit is contained in:
@@ -57,8 +57,8 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
center: [113.5, 33.875], // 默认中心点(河南)
|
||||
zoom: 10,
|
||||
center: [112.870000,34.180000], // 默认中心点(河南)
|
||||
zoom: 12,
|
||||
map: null,
|
||||
currentMarker: {},
|
||||
showCtrModal: false,
|
||||
@@ -72,12 +72,19 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initMap()
|
||||
this.$nextTick(()=>{
|
||||
this.initMap()
|
||||
})
|
||||
},
|
||||
beforeUnmount() {
|
||||
if(this.map){
|
||||
// this.map.destory()
|
||||
this.map=null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(map) {
|
||||
this.map = map
|
||||
this.center= [110.404, 40.915]
|
||||
this.getMarkList()
|
||||
},
|
||||
async getMarkList() {
|
||||
@@ -114,33 +121,27 @@ export default {
|
||||
|
||||
|
||||
|
||||
// 备用定位方案
|
||||
// setFallbackLocation() {
|
||||
// const fallbackCoords = [116.404, 39.915] // 北京坐标
|
||||
// this.center = fallbackCoords
|
||||
// if (this.map) {
|
||||
// this.map.setCenter(new T.LngLat(...fallbackCoords))
|
||||
// }
|
||||
// },
|
||||
|
||||
|
||||
async getSysConfig() {
|
||||
let sysConfig
|
||||
try {
|
||||
const query = {}
|
||||
const res = await getReq('/', query)
|
||||
if (res.errcode === 0) {
|
||||
sysConfig = res.data.value
|
||||
} else {
|
||||
throw res
|
||||
}
|
||||
} catch (error) {
|
||||
sysConfig = this.targetKey
|
||||
}
|
||||
let sysConfig=this.targetKey
|
||||
// try {
|
||||
// const query = {}
|
||||
// const res = await getReq('/', query)
|
||||
// if (res.errcode === 0) {
|
||||
// sysConfig = res.data.value
|
||||
// } else {
|
||||
// throw res
|
||||
// }
|
||||
// } catch (error) {
|
||||
// sysConfig = this.targetKey
|
||||
// }
|
||||
return sysConfig
|
||||
},
|
||||
|
||||
async clickArrayMarker(currentVal) {
|
||||
this.changeStationId = currentVal.station_id
|
||||
this.testVal.name=currentVal.name
|
||||
this.showCtrModal = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user