From c2268af8428043b9b7a4f0dfcf681529404f69c5 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Thu, 3 Mar 2022 16:36:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/ClientConnection.ts | 6 ++-- src/components/ModeTree.vue | 2 +- src/components/PlanTree.vue | 2 +- src/components/PollingTree.vue | 2 +- src/components/SignalSourceTree.vue | 4 +-- src/entities/WSProtocol.ts | 14 ++++----- src/i18n/zh-CN/index.ts | 3 ++ src/pages/TopToolBar.vue | 45 ++++++++++++++++++++++------- src/pages/WallPage.vue | 2 +- src/store/index.ts | 11 ++++++- 10 files changed, 63 insertions(+), 28 deletions(-) diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index f03e1f0..4dc7f38 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -768,13 +768,13 @@ export default class ClientConnection { ); } - public async setPollingData( + public async setWindowPollingData( window_id: number, name: string, datas?: StringKeyValueEntity[] ) { - return await this.doRpc( - new Protocol.SetPollingDataRequestEntity(window_id, name, datas) + return await this.doRpc( + new Protocol.SetWindowPollingDataRequestEntity(window_id, name, datas) ); } diff --git a/src/components/ModeTree.vue b/src/components/ModeTree.vue index ef7e319..b0924d0 100644 --- a/src/components/ModeTree.vue +++ b/src/components/ModeTree.vue @@ -182,7 +182,7 @@ export default defineComponent({ const tree: any | null = ref(null); onMounted(async () => { - while (!tree.value.nodes.length) { + while (!tree.value?.nodes?.length) { await Common.waitFor(100); } tree.value?.setExpanded("", true); diff --git a/src/components/PlanTree.vue b/src/components/PlanTree.vue index 1dbc665..e3b9821 100644 --- a/src/components/PlanTree.vue +++ b/src/components/PlanTree.vue @@ -203,7 +203,7 @@ export default defineComponent({ const tree: any | null = ref(null); onMounted(async () => { - while (!tree.value.nodes.length) { + while (!tree.value?.nodes?.length) { await Common.waitFor(100); } tree.value?.setExpanded("", true); diff --git a/src/components/PollingTree.vue b/src/components/PollingTree.vue index 0ac2086..b8302a3 100644 --- a/src/components/PollingTree.vue +++ b/src/components/PollingTree.vue @@ -148,7 +148,7 @@ export default defineComponent({ const polling_setting_dialog: Ref = ref(null); onMounted(async () => { - while (!tree.value.nodes.length) { + while (!tree.value?.nodes?.length) { await Common.waitFor(100); } tree.value?.setExpanded("", true); diff --git a/src/components/SignalSourceTree.vue b/src/components/SignalSourceTree.vue index 192bb10..bb3792b 100644 --- a/src/components/SignalSourceTree.vue +++ b/src/components/SignalSourceTree.vue @@ -5,7 +5,7 @@ - + + + {{ $store.state.fan_temp.toFixed(1) }} ℃ @@ -238,6 +238,22 @@ + +