diff --git a/src/views/layout/components/BlogBox.vue b/src/views/layout/components/BlogBox.vue index 4a67d6c..e182f71 100644 --- a/src/views/layout/components/BlogBox.vue +++ b/src/views/layout/components/BlogBox.vue @@ -19,7 +19,7 @@ + :timestamp="activity.timestamp | parseTime('{h}:{i}:{s}')"> {{ activity.content }} @@ -53,6 +53,11 @@ export default { this.drawer = true } }, + watch: { + newLog (val) { + console.error(`提交日志${val.content}`) + } + }, created () { }, destroyed () { diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 8ad1d4d..53d4283 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -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] // 按订阅信息 刷新飞机状态 }