special_video的layout设置增加旋转参数

This commit is contained in:
fangxiang 2022-09-14 15:13:00 +08:00
parent 5f832e9963
commit 3fed0db3eb
4 changed files with 51 additions and 1 deletions

View File

@ -696,6 +696,18 @@ export default class ClientConnection {
); );
} }
public setSpecialVideoLayoutRotation(rotation: string) {
this.ws?.send(
JSON.stringify(
new Protocol.SetApplicationConfigRequestEntity(
0,
"special_video_layout_rotation",
rotation
)
)
);
}
public setWebsocketPort(port: number) { public setWebsocketPort(port: number) {
this.ws?.send( this.ws?.send(
JSON.stringify( JSON.stringify(

View File

@ -51,6 +51,16 @@
</q-select> </q-select>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item>
<q-item-section>
<q-select
:label="$t('rotation')"
:options="rotation_options"
v-model="rotation"
>
</q-select>
</q-item-section>
</q-item>
</q-list> </q-list>
</q-card-section> </q-card-section>
@ -104,12 +114,21 @@ export default defineComponent({
const select_options = ["1X3", "1X4", "3X1", "4X1"]; const select_options = ["1X3", "1X4", "3X1", "4X1"];
const row_values = [1, 1, 3, 4]; const row_values = [1, 1, 3, 4];
const col_values = [3, 4, 1, 1]; const col_values = [3, 4, 1, 1];
const rotation_options = ref(["0", "90", "180"]);
const rotation = ref("0");
rotation.value =
GlobalData.getInstance()?.applicationConfig
?.special_video_layout_rotation ?? "0";
return { return {
show_dialog, show_dialog,
loading, loading,
layout, layout,
select_options, select_options,
rotation_options,
rotation,
showDialog() { showDialog() {
show_dialog.value = true; show_dialog.value = true;
@ -134,6 +153,10 @@ export default defineComponent({
if (!v) { if (!v) {
layout.value = "1X4"; layout.value = "1X4";
} }
rotation.value =
GlobalData.getInstance()?.applicationConfig
?.special_video_layout_rotation ?? "0";
}, },
resetData() { resetData() {
loading.value = false; loading.value = false;
@ -148,6 +171,20 @@ export default defineComponent({
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
?.setWallRowCol(row_values[index], col_values[index]); ?.setWallRowCol(row_values[index], col_values[index]);
switch (rotation.value) {
case "0":
case "90":
case "180":
GlobalData.getInstance()
.getCurrentClient()
?.setSpecialVideoLayoutRotation(rotation.value ?? "0");
break;
default:
GlobalData.getInstance()
.getCurrentClient()
?.setSpecialVideoLayoutRotation("0");
break;
}
} }
show_dialog.value = false; show_dialog.value = false;

View File

@ -35,4 +35,5 @@ export default class ApplicationConfigEntity {
device_hdmi_output_count = 1; device_hdmi_output_count = 1;
video_suffix_filter: string | null = ""; video_suffix_filter: string | null = "";
image_suffix_filter: string | null = ""; image_suffix_filter: string | null = "";
special_video_layout_rotation: string | undefined = "0";
} }

View File

@ -598,7 +598,7 @@ export default {
"主机名只能由数字、字母和_-组成", "主机名只能由数字、字母和_-组成",
"Custom ISV": "优霸定制", "Custom ISV": "优霸定制",
"are you sure power off device": "确定关机吗", "are you sure power off device": "确定关机吗",
"are you sure to change the http port": "确定重启吗", "are you sure to change the http port": "确定修改HTTP端口吗",
"the new http port takes effect after the software is restarted": "the new http port takes effect after the software is restarted":
"新的Http端口将在重启软件后生效", "新的Http端口将在重启软件后生效",
"are you sure to change the control port": "确定要修改控制端口吗", "are you sure to change the control port": "确定要修改控制端口吗",