diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 64bd31b..2301931 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -876,6 +876,16 @@ export default class ClientConnection { } } + public async switchOutputBoardSplitState() { + try { + this.ws?.send( + JSON.stringify(new Protocol.SwitchOutputBoardSplitStateRequestEntity()) + ); + } catch (e) { + console.error(e); + } + } + public async restoreOutputBoard() { try { return await this.doRpc( diff --git a/src/components/ModeDialog.vue b/src/components/ModeDialog.vue index bc1ac43..d218726 100644 --- a/src/components/ModeDialog.vue +++ b/src/components/ModeDialog.vue @@ -148,7 +148,12 @@ - + {{ $t("joint action equipment") }} diff --git a/src/components/custom/ISVVideoWallDialog.vue b/src/components/custom/ISVVideoWallDialog.vue index 0727b6c..0eacd3a 100644 --- a/src/components/custom/ISVVideoWallDialog.vue +++ b/src/components/custom/ISVVideoWallDialog.vue @@ -361,7 +361,6 @@ export default defineComponent({ video_wall_config.outputs[pos].rotation == 180 ) { splice_mode.value += " (180°)"; - console.log(splice_mode.value); } // preview_rotation.value = video_wall_config.outputs[pos].rotation; diff --git a/src/entities/WSProtocol.ts b/src/entities/WSProtocol.ts index a7e897f..f3baac6 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -287,6 +287,14 @@ export namespace Protocol { return Commands.PROTOCOL_PREFIX + "RpcRestoreOutputBoard"; } + public static get kOutputBoardSettingNotify() { + return Commands.PROTOCOL_PREFIX + "OutputBoardSettingNotify"; + } + + public static get kSwitchOutputBoardSplitState() { + return Commands.PROTOCOL_PREFIX + "SwitchOutputBoardSplitState"; + } + public static get kSetWindowVolume() { return Commands.PROTOCOL_PREFIX + "SetWindowVolume"; } @@ -526,6 +534,7 @@ export namespace Protocol { Commands.kRpcSetSystemOther, Commands.kRpcGetSupportResolutions, Commands.kRpcRestoreOutputBoard, + Commands.kOutputBoardSettingNotify, Commands.kRpcSetOutputBoardSetting, Commands.kRpcGetOutputBoardSetting, Commands.kSetWindowVolume, @@ -1948,6 +1957,28 @@ export namespace Protocol { } } + export class OutputBoardSettingNotify extends Protocol.PacketEntity { + splicing = false; + wall_rows = 2; + wall_cols = 2; + + constructor() { + super(); + this.command = Protocol.Commands.kOutputBoardSettingNotify; + super.flag = PacketEntity.FLAG_NOTIFY; + } + } + + export class SwitchOutputBoardSplitStateRequestEntity extends Protocol.PacketEntity { + timestamp = Date.now(); + + constructor(rcp_id?: number) { + super(); + this.rpc_id = rcp_id ?? 0; + this.command = Protocol.Commands.kSwitchOutputBoardSplitState; + } + } + export class SetWindowVolumeRequestEntity extends Protocol.PacketEntity { window_id: number; volume: number; diff --git a/src/pages/custom/ISVTopToolBar.vue b/src/pages/custom/ISVTopToolBar.vue index 2cd95fc..08c7709 100644 --- a/src/pages/custom/ISVTopToolBar.vue +++ b/src/pages/custom/ISVTopToolBar.vue @@ -2,7 +2,6 @@
= ref(null); + const splicing_state = ref(false); + const power_flag = ref(false); watch( () => power_flag.value, @@ -520,20 +521,35 @@ export default defineComponent({ } ); - const show_device_list = ref(true); - onMounted(() => { - show_device_list.value = - typeof (window).user_search?.hide_device_list == "undefined"; + EventBus.getInstance().on(EventNamesDefine.NotifyMessage, (notify) => { + try { + switch (notify.packet.command) { + case Protocol.Commands.kOutputBoardSettingNotify: { + let temp = JSON.parse( + notify.data + ) as Protocol.OutputBoardSettingNotify; + splicing_state.value = temp?.splicing ?? false; + } + } + } catch (e) { + console.error(e); + } }); + GlobalData.getInstance() + .getCurrentClient() + ?.getOutputBoardSetting() + ?.then((response) => { + splicing_state.value = response?.splicing ?? false; + }); return { show_advanced_menu, plan_running, edge_blending_dialog, register_dialog, window_rect_edit_dialog, - show_device_list, power_flag, + splicing_state, async backupDB() { let client = GlobalData.getInstance().getCurrentClient(); @@ -797,6 +813,11 @@ export default defineComponent({ ?.windowFullScreen(window.window_id, false); } }, + switchOutputBoardState() { + GlobalData.getInstance() + .getCurrentClient() + ?.switchOutputBoardSplitState(); + }, }; }, });