优霸工具栏拼接模式切换功能实现
This commit is contained in:
parent
64a86cc23e
commit
6393b8f370
|
@ -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<Protocol.RestoreOutputBoardResponseEntity>(
|
||||
|
|
|
@ -148,7 +148,12 @@
|
|||
</q-input>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item
|
||||
v-show="
|
||||
!$store.state.custom_defines.is_custom_isv ||
|
||||
$store.state.advanced_debug
|
||||
"
|
||||
>
|
||||
<q-card class="full-width" style="height: 25vh">
|
||||
<q-card-section
|
||||
><span>{{ $t("joint action equipment") }}</span>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<div>
|
||||
<q-toolbar style="background-color: #3e9acd" class="shadow-2 text-white">
|
||||
<q-btn-dropdown
|
||||
v-if="show_device_list"
|
||||
stretch
|
||||
no-caps
|
||||
flat
|
||||
|
@ -66,9 +65,9 @@
|
|||
flat
|
||||
stack
|
||||
:icon="/*settings*/ 'img:new_icon/system_setting.png'"
|
||||
:label="$t('splice on')"
|
||||
:label="$t('splice') + $t(' ') + $t(splicing_state ? 'off' : 'on')"
|
||||
class="q-mr-sm"
|
||||
@click="$refs.system_setting_dialog.showDialog()"
|
||||
@click="switchOutputBoardState"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
|
@ -445,6 +444,8 @@ export default defineComponent({
|
|||
|
||||
const window_rect_edit_dialog: Ref<any> = 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 (<any>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();
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue