From d78f822d64534c3aee55d43a64df5c3f6df29825 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Fri, 17 Dec 2021 16:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=AE=9A=E6=97=B6=E9=A2=84?= =?UTF-8?q?=E6=A1=88=E7=95=8C=E9=9D=A2,=E6=B7=BB=E5=8A=A0=E5=BC=80?= =?UTF-8?q?=E6=9C=BA=E9=A2=84=E6=A1=88=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/ClientConnection.ts | 10 +- src/common/Initializer.ts | 4 + src/common/RemoteDataExangeProcesser.ts | 4 + src/components/GridSettingDialog.vue | 2 +- src/components/PlanDialog.vue | 199 +++++++++++++++++++++++- src/components/PlanTree.vue | 46 ++++++ src/entities/ApplicationConfigEntity.ts | 1 + src/entities/PlanEntity.ts | 3 + src/i18n/zh-CN/index.ts | 13 ++ src/store/index.ts | 5 + 10 files changed, 280 insertions(+), 7 deletions(-) diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 5da4fef..5ba6cc6 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -534,7 +534,7 @@ export default class ClientConnection { ); } - public setApplicationConfig(wall_row: number, wall_col: number) { + public setWallRowCol(wall_row: number, wall_col: number) { this.ws?.send( JSON.stringify( new Protocol.SetApplicationConfigRequestEntity( @@ -555,6 +555,14 @@ export default class ClientConnection { ); } + public setPowerOnPlan(uuid: string) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity(0, "power_on_plan", uuid) + ) + ); + } + public windowFitGrid(window_id: number) { this.ws?.send( JSON.stringify( diff --git a/src/common/Initializer.ts b/src/common/Initializer.ts index d9983e4..5567bbd 100644 --- a/src/common/Initializer.ts +++ b/src/common/Initializer.ts @@ -99,6 +99,10 @@ export default class Initializer { "setDeviceScreenHeight", global_data.applicationConfig.screen_height ); + $store.commit( + "setPowerOnPlan", + global_data.applicationConfig.power_on_plan + ); } } diff --git a/src/common/RemoteDataExangeProcesser.ts b/src/common/RemoteDataExangeProcesser.ts index 35d2037..f299e83 100644 --- a/src/common/RemoteDataExangeProcesser.ts +++ b/src/common/RemoteDataExangeProcesser.ts @@ -57,6 +57,10 @@ export default class RemoteDataExangeProcesser { "setDeviceScreenHeight", global_data.applicationConfig.screen_height ); + $store.commit( + "setPowerOnPlan", + global_data.applicationConfig.power_on_plan + ); } } } diff --git a/src/components/GridSettingDialog.vue b/src/components/GridSettingDialog.vue index c0a1de8..6ab61cd 100644 --- a/src/components/GridSettingDialog.vue +++ b/src/components/GridSettingDialog.vue @@ -123,7 +123,7 @@ export default defineComponent({ try { GlobalData.getInstance() .getCurrentClient() - ?.setApplicationConfig(rows.value, cols.value); + ?.setWallRowCol(rows.value, cols.value); show_dialog.value = false; } catch {} loading.value = false; diff --git a/src/components/PlanDialog.vue b/src/components/PlanDialog.vue index 2049813..6339ca3 100644 --- a/src/components/PlanDialog.vue +++ b/src/components/PlanDialog.vue @@ -1,6 +1,6 @@