优霸工具栏拼接模式切换功能实现
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() {
|
public async restoreOutputBoard() {
|
||||||
try {
|
try {
|
||||||
return await this.doRpc<Protocol.RestoreOutputBoardResponseEntity>(
|
return await this.doRpc<Protocol.RestoreOutputBoardResponseEntity>(
|
||||||
|
|
|
@ -148,7 +148,12 @@
|
||||||
</q-input>
|
</q-input>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</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 class="full-width" style="height: 25vh">
|
||||||
<q-card-section
|
<q-card-section
|
||||||
><span>{{ $t("joint action equipment") }}</span>
|
><span>{{ $t("joint action equipment") }}</span>
|
||||||
|
|
|
@ -361,7 +361,6 @@ export default defineComponent({
|
||||||
video_wall_config.outputs[pos].rotation == 180
|
video_wall_config.outputs[pos].rotation == 180
|
||||||
) {
|
) {
|
||||||
splice_mode.value += " (180°)";
|
splice_mode.value += " (180°)";
|
||||||
console.log(splice_mode.value);
|
|
||||||
}
|
}
|
||||||
// preview_rotation.value = video_wall_config.outputs[pos].rotation;
|
// preview_rotation.value = video_wall_config.outputs[pos].rotation;
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,14 @@ export namespace Protocol {
|
||||||
return Commands.PROTOCOL_PREFIX + "RpcRestoreOutputBoard";
|
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() {
|
public static get kSetWindowVolume() {
|
||||||
return Commands.PROTOCOL_PREFIX + "SetWindowVolume";
|
return Commands.PROTOCOL_PREFIX + "SetWindowVolume";
|
||||||
}
|
}
|
||||||
|
@ -526,6 +534,7 @@ export namespace Protocol {
|
||||||
Commands.kRpcSetSystemOther,
|
Commands.kRpcSetSystemOther,
|
||||||
Commands.kRpcGetSupportResolutions,
|
Commands.kRpcGetSupportResolutions,
|
||||||
Commands.kRpcRestoreOutputBoard,
|
Commands.kRpcRestoreOutputBoard,
|
||||||
|
Commands.kOutputBoardSettingNotify,
|
||||||
Commands.kRpcSetOutputBoardSetting,
|
Commands.kRpcSetOutputBoardSetting,
|
||||||
Commands.kRpcGetOutputBoardSetting,
|
Commands.kRpcGetOutputBoardSetting,
|
||||||
Commands.kSetWindowVolume,
|
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 {
|
export class SetWindowVolumeRequestEntity extends Protocol.PacketEntity {
|
||||||
window_id: number;
|
window_id: number;
|
||||||
volume: number;
|
volume: number;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<div>
|
<div>
|
||||||
<q-toolbar style="background-color: #3e9acd" class="shadow-2 text-white">
|
<q-toolbar style="background-color: #3e9acd" class="shadow-2 text-white">
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
v-if="show_device_list"
|
|
||||||
stretch
|
stretch
|
||||||
no-caps
|
no-caps
|
||||||
flat
|
flat
|
||||||
|
@ -66,9 +65,9 @@
|
||||||
flat
|
flat
|
||||||
stack
|
stack
|
||||||
:icon="/*settings*/ 'img:new_icon/system_setting.png'"
|
: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"
|
class="q-mr-sm"
|
||||||
@click="$refs.system_setting_dialog.showDialog()"
|
@click="switchOutputBoardState"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
@ -445,6 +444,8 @@ export default defineComponent({
|
||||||
|
|
||||||
const window_rect_edit_dialog: Ref<any> = ref(null);
|
const window_rect_edit_dialog: Ref<any> = ref(null);
|
||||||
|
|
||||||
|
const splicing_state = ref(false);
|
||||||
|
|
||||||
const power_flag = ref(false);
|
const power_flag = ref(false);
|
||||||
watch(
|
watch(
|
||||||
() => power_flag.value,
|
() => power_flag.value,
|
||||||
|
@ -520,20 +521,35 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const show_device_list = ref(true);
|
EventBus.getInstance().on(EventNamesDefine.NotifyMessage, (notify) => {
|
||||||
onMounted(() => {
|
try {
|
||||||
show_device_list.value =
|
switch (notify.packet.command) {
|
||||||
typeof (<any>window).user_search?.hide_device_list == "undefined";
|
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 {
|
return {
|
||||||
show_advanced_menu,
|
show_advanced_menu,
|
||||||
plan_running,
|
plan_running,
|
||||||
edge_blending_dialog,
|
edge_blending_dialog,
|
||||||
register_dialog,
|
register_dialog,
|
||||||
window_rect_edit_dialog,
|
window_rect_edit_dialog,
|
||||||
show_device_list,
|
|
||||||
power_flag,
|
power_flag,
|
||||||
|
splicing_state,
|
||||||
|
|
||||||
async backupDB() {
|
async backupDB() {
|
||||||
let client = GlobalData.getInstance().getCurrentClient();
|
let client = GlobalData.getInstance().getCurrentClient();
|
||||||
|
@ -797,6 +813,11 @@ export default defineComponent({
|
||||||
?.windowFullScreen(window.window_id, false);
|
?.windowFullScreen(window.window_id, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
switchOutputBoardState() {
|
||||||
|
GlobalData.getInstance()
|
||||||
|
.getCurrentClient()
|
||||||
|
?.switchOutputBoardSplitState();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue