Browse Source

fix-更新一下

wangqin
IAMHERE 11 months ago
parent
commit
68bee86d8f
  1. 6
      ruoyi-ui/src/views/index.vue
  2. 29
      ruoyi-ui/src/views/map/index.vue

6
ruoyi-ui/src/views/index.vue

@ -240,9 +240,9 @@ export default {
boardEmitItem: {}, //
activeName: 'first',
dialogTit: '门架式可变信息标志YK16+270',
dialogInfoLeft: false,
dialogInfoLeft: true,
dialogInfoRight: false,
dialogInfoCamera: false,
dialogInfoCamera: true,
mapDialogTop: '0px',
mapDialogLeft: '0px',
keyMonitoringList: [
@ -331,7 +331,7 @@ export default {
this.getTemplateHeaderFn()
// this.getTemplateFn()
},
//
// //
// watch: {
// data: {
// // ,使handler

29
ruoyi-ui/src/views/map/index.vue

@ -47,22 +47,35 @@ export default {
]
}
},
// created() {
// this.getEnergyBoardFn()
// },
mounted() {
created() {
this.getEnergyBoardFn()
// this.initAMap()
},
mounted() {
this.initAMap()
},
unmounted() {
this.map?.destroy()
},
//
watch: {
markBoardDataList: {
// ,使handler
handler(newVal, oldVal) {
this.initAMap()
// console.log(newVal);
// console.log(oldVal);
},
// true(immediatefalse)
immediate: true
// true
// deep: true
}
},
methods: {
getEnergyBoardFn() {
getEnergyBoardAPi().then(res => {
console.log('地图首页情报板点位', res)
this.markBoardDataList = res
this.initAMap()
})
},
initAMap() {
@ -351,7 +364,7 @@ export default {
// Marker
let marker = new AMap.Marker({
position: new AMap.LngLat(...item.lnp.split(',')), // [116.39, 39.9]
offset: new AMap.Pixel(0, 0),
offset: new AMap.Pixel(-25, -50),
title: item.deviceName,
map: this.map,
extData: item,
@ -364,7 +377,7 @@ export default {
})
})
marker.setLabel({
offset: new AMap.Pixel(0, 10), //
offset: new AMap.Pixel(0, 0), //
content: '', //
// content: "<div style='padding:1vh 1vw;background-color:rgba(0,0,0,0);border:0;font-size:19px;color:rgba(188, 218, 250, 1);'>" + item.tit + '</div>', //
direction: 'top' //

Loading…
Cancel
Save