【类 型】:fix 订阅到飞机文本信息 直接打印到日志

【原  因】:不存在飞机状态里面  从这里取消耗资源大
【过  程】:
【影  响】:
This commit is contained in:
tk 2024-08-09 20:14:46 +08:00
parent 0faf494aff
commit e273ba9951
2 changed files with 9 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<el-timeline :reverse="true" class="p-l-50 p-r-50">
<el-timeline-item v-for="(activity, index) in log" :key="index" :icon="activity.icon" :type="activity.type"
:color="activity.color" :size="activity.size"
:timestamp="activity.timestamp | parseTime('{y}-{m}-{d} {h}:{i}:{s}')">
:timestamp="activity.timestamp | parseTime('{h}:{i}:{s}')">
{{ activity.content }}
</el-timeline-item>
</el-timeline>
@ -53,6 +53,11 @@ export default {
this.drawer = true
}
},
watch: {
newLog (val) {
console.error(`提交日志${val.content}`)
}
},
created () {
},
destroyed () {

View File

@ -102,6 +102,9 @@ export default {
if (plane.planeState.position.length > 1000) {
plane.planeState.position.shift() //
}
} else if (key === 'statusText') {
/* 飞控信息 插入日志 */
this.$store.dispatch('fetchLog', { content: jsonData[key], color: '#f57c00' })
} else {
plane.planeState[key] = jsonData[key] //
}