From e273ba995109ae65d787d6e52111f6955d1a4336 Mon Sep 17 00:00:00 2001 From: tk Date: Fri, 9 Aug 2024 20:14:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E8=AE=A2=E9=98=85=E5=88=B0=E9=A3=9E=E6=9C=BA?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=BF=A1=E6=81=AF=20=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=88=B0=E6=97=A5=E5=BF=97=20=E3=80=90?= =?UTF-8?q?=E5=8E=9F=20=20=E5=9B=A0=E3=80=91=EF=BC=9A=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E9=A3=9E=E6=9C=BA=E7=8A=B6=E6=80=81=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=20=20=E4=BB=8E=E8=BF=99=E9=87=8C=E5=8F=96=E6=B6=88=E8=80=97?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=A4=A7=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B?= =?UTF-8?q?=E3=80=91=EF=BC=9A=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/components/BlogBox.vue | 7 ++++++- src/views/layout/index.vue | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) 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] // 按订阅信息 刷新飞机状态 }