fix 1打印日之前面加上飞机名字 2menu缩进按钮后加上延迟半秒更新地图组件大小

This commit is contained in:
oldHome 2025-06-28 15:17:22 +08:00
parent 0d5d99fe39
commit 9cca19f31c
7 changed files with 56 additions and 13 deletions

View File

@ -23,7 +23,7 @@
<!-- 账号id显示 -->
<el-dropdown-item command="go-adminEdit">
<i class="el-icon-user-solid m-r-10"></i>
<font class="brandFontColor">{{ this.$store.state.user.name }}</font>
<font class="brandFontColor">{{ $store.state.user.name }}</font>
</el-dropdown-item>
<!-- 自定义语言设置为右侧弹出 -->
<el-dropdown-item>

View File

@ -43,7 +43,7 @@ export default {
methods: {
downloadApk () {
const link = document.createElement('a')
link.href = 'https://szdot.top/app-release.apk'
link.href = 'https://szdot.top/lz-app-release.apk'
link.target = '_blank'
link.download = 'KPT-SP_v1.01.apk'
document.body.appendChild(link)

View File

@ -130,10 +130,19 @@ export default {
deep: true
},
/**
* @description: 侧边栏显隐
* @description: 侧边栏缩进有变化时 地图重新自适应
*/
isCollapse () {
return this.$store.state.app.isCollapse
isCollapse: {
handler (val) {
if (val) {
setTimeout(() => {
this.$nextTick(() => {
this.$refs.mapbox.handleResize()
})
}, 500)
}
},
deep: true
}
},
destroyed () {

View File

@ -290,11 +290,14 @@ export default {
isCollapse: {
handler (val) {
if (val) {
this.$nextTick(() => {
this.$refs.mapbox.handleResize()
})
setTimeout(() => {
this.$nextTick(() => {
this.$refs.mapbox.handleResize()
})
}, 500)
}
}
},
deep: true
}
}
}

View File

@ -307,10 +307,19 @@ export default {
deep: true
},
/**
* @description: 侧边栏显隐
* @description: 侧边栏缩进有变化时 地图重新自适应
*/
isCollapse () {
return this.$store.state.app.isCollapse
isCollapse: {
handler (val) {
if (val) {
setTimeout(() => {
this.$nextTick(() => {
this.$refs.mapbox.handleResize()
})
}, 500)
}
},
deep: true
}
}
}

View File

@ -80,6 +80,12 @@ export default {
*/
routeList () {
return this.$store.state.routeList
},
/**
* @description: 侧边栏显隐
*/
isCollapse () {
return this.$store.state.app.isCollapse
}
},
methods: {
@ -169,6 +175,21 @@ export default {
watch: {
routeList () {
this.initPage()//
},
/**
* @description: 侧边栏缩进有变化时 地图重新自适应
*/
isCollapse: {
handler (val) {
if (val) {
setTimeout(() => {
this.$nextTick(() => {
this.$refs.mapbox.handleResize()
})
}, 500)
}
},
deep: true
}
},
created () {

View File

@ -134,6 +134,7 @@ export default {
* @param {*} res 飞机列表
*/
airList (res) {
console.log(res)
/* mqtt */
mqtt.mqttConf()// mqtt
//
@ -220,7 +221,7 @@ export default {
plane.planeState[key] = homePosition
} else if (key === 'statusText') {
/* 飞控信息 插入日志 */
this.$store.dispatch('fetchLog', { content: jsonData[key], color: '#f57c00' })
this.$store.dispatch('fetchLog', { content: `${plane.name}--${jsonData[key]}`, color: '#f57c00' })
} else {
plane.planeState[key] = jsonData[key] //
}