魔墙:增加翻译,修复虚拟窗口选中,修改角度坐标会乱选中窗口,添加魔墙的显示器列表宽高信息,增加恢复时恢复显示器列表信息
This commit is contained in:
parent
0e55d165cf
commit
6f636315b6
|
@ -710,6 +710,17 @@ export default class ClientConnection {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
public setMagicWallList(list:any) {
|
||||||
|
this.ws?.send(
|
||||||
|
JSON.stringify(
|
||||||
|
new Protocol.SetApplicationConfigRequestEntity(
|
||||||
|
0,
|
||||||
|
"magic_list",
|
||||||
|
typeof (list) == 'string' ? list : JSON.stringify(list)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public setConfigure(k: string, v: string) {
|
public setConfigure(k: string, v: string) {
|
||||||
this.ws?.send(
|
this.ws?.send(
|
||||||
|
|
|
@ -124,9 +124,22 @@
|
||||||
min="0"
|
min="0"
|
||||||
v-model="test_monitor_wall[current_index].angle"
|
v-model="test_monitor_wall[current_index].angle"
|
||||||
@keydown="testLog($event)"
|
@keydown="testLog($event)"
|
||||||
oninput="if(value<0)value=0;if(value>360)value=360;"
|
|
||||||
hint=""
|
hint=""
|
||||||
@update:model-value="changeAngle()"
|
@update:model-value="changeAngle()"
|
||||||
|
:rules="[
|
||||||
|
(val) =>
|
||||||
|
(val != null &&
|
||||||
|
val != undefined &&
|
||||||
|
val.toString().length > 0) ||
|
||||||
|
$t('Please type something'),
|
||||||
|
(val) =>
|
||||||
|
parseInt(val) >= 0 ||
|
||||||
|
$t('the number must be greater than 0'),
|
||||||
|
(val) =>
|
||||||
|
parseInt(val) <= 360 ||
|
||||||
|
$t('the number must be greater than 360'),
|
||||||
|
]"
|
||||||
|
lazy-rules
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<span class="input_append">°</span>
|
<span class="input_append">°</span>
|
||||||
|
@ -921,7 +934,7 @@ export default defineComponent({
|
||||||
),
|
),
|
||||||
h: element.h / wall_dom.offsetHeight,
|
h: element.h / wall_dom.offsetHeight,
|
||||||
w: element.w / wall_dom.offsetWidth,
|
w: element.w / wall_dom.offsetWidth,
|
||||||
angle: parseInt(element.angle.toString()),
|
angle: Number(element.angle.toString()) ?? 0,
|
||||||
initial_h: element.InitialH,
|
initial_h: element.InitialH,
|
||||||
initial_w: element.InitialW,
|
initial_w: element.InitialW,
|
||||||
percenter: per,
|
percenter: per,
|
||||||
|
@ -943,7 +956,7 @@ export default defineComponent({
|
||||||
currenty: element.currenty / wall_dom.offsetHeight,
|
currenty: element.currenty / wall_dom.offsetHeight,
|
||||||
h: element.h / wall_dom.offsetHeight,
|
h: element.h / wall_dom.offsetHeight,
|
||||||
w: element.w / wall_dom.offsetWidth,
|
w: element.w / wall_dom.offsetWidth,
|
||||||
angle: parseInt(element.angle.toString()),
|
angle: Number(element.angle.toString()) ?? 0,
|
||||||
centerx: element.centerx / 3840,
|
centerx: element.centerx / 3840,
|
||||||
centery: element.centery / 2160,
|
centery: element.centery / 2160,
|
||||||
});
|
});
|
||||||
|
@ -1250,6 +1263,11 @@ export default defineComponent({
|
||||||
const moveMonitor = (item: test_monitor, rect: show__Rect) => {
|
const moveMonitor = (item: test_monitor, rect: show__Rect) => {
|
||||||
//计算是否超出,然后放回
|
//计算是否超出,然后放回
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
|
const temp_index = sort_index.value.findIndex((v: any) => v == item.uuid);
|
||||||
|
if (temp_index != -1) {
|
||||||
|
sort_index.value.splice(temp_index, 1);
|
||||||
|
sort_index.value.push(item.uuid);
|
||||||
|
}
|
||||||
if (item.angle != 0) {
|
if (item.angle != 0) {
|
||||||
exceedrange(item);
|
exceedrange(item);
|
||||||
} else if (wall_dom) {
|
} else if (wall_dom) {
|
||||||
|
@ -1274,7 +1292,9 @@ export default defineComponent({
|
||||||
((item.currenty + item.h / 2) / wall_dom?.offsetHeight) * 2160
|
((item.currenty + item.h / 2) / wall_dom?.offsetHeight) * 2160
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
test_monitor_wall.value=ordination(JSON.parse(JSON.stringify(test_monitor_wall.value)))
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
|
item.active=true
|
||||||
};
|
};
|
||||||
const exceedrange = (item: test_monitor) => {
|
const exceedrange = (item: test_monitor) => {
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
|
@ -1342,15 +1362,7 @@ export default defineComponent({
|
||||||
multiple_select.value = [];
|
multiple_select.value = [];
|
||||||
multiple.value = false;
|
multiple.value = false;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
// test_monitor_list.value.forEach((element) => {
|
test_monitor_list.value = JSON.parse(list_magic);
|
||||||
// element.isHide = false;
|
|
||||||
// element.isactive=false;
|
|
||||||
// });
|
|
||||||
// last_wall.value.forEach((element) => {
|
|
||||||
// element.isShow = true;
|
|
||||||
// test_monitor_wall.value.push(JSON.parse(JSON.stringify(element)));
|
|
||||||
// test_monitor_list.value[element.id].isHide = true;
|
|
||||||
// });
|
|
||||||
realtime_upload(last_wall.value, last_percenter.value, 2);
|
realtime_upload(last_wall.value, last_percenter.value, 2);
|
||||||
};
|
};
|
||||||
let sort_index: any = ref([]);
|
let sort_index: any = ref([]);
|
||||||
|
@ -1358,11 +1370,11 @@ export default defineComponent({
|
||||||
|
|
||||||
const ordination = (wall_list: any, sort: any = sort_index.value) => {
|
const ordination = (wall_list: any, sort: any = sort_index.value) => {
|
||||||
let temp_list: test_monitor[] = [];
|
let temp_list: test_monitor[] = [];
|
||||||
|
|
||||||
wall_list.forEach((ele: any, index: number) => {
|
wall_list.forEach((ele: any, index: number) => {
|
||||||
let i = sort.indexOf(ele.uuid);
|
let i = sort.indexOf(ele.uuid);
|
||||||
temp_list[i] = wall_list[index];
|
temp_list[i] = wall_list[index];
|
||||||
});
|
});
|
||||||
|
current_index.value = wall_list.length - 1;
|
||||||
return temp_list;
|
return temp_list;
|
||||||
};
|
};
|
||||||
const refresh_resize = (a: number) => {
|
const refresh_resize = (a: number) => {
|
||||||
|
@ -1470,6 +1482,7 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
item.angle = element.angle;
|
item.angle = element.angle;
|
||||||
item.isShow = true;
|
item.isShow = true;
|
||||||
|
item.active=false;
|
||||||
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
|
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
|
||||||
|
|
||||||
sort_index.value.push(test_monitor_list.value[element.index].uuid);
|
sort_index.value.push(test_monitor_list.value[element.index].uuid);
|
||||||
|
@ -1616,6 +1629,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
};
|
};
|
||||||
|
let list_magic: any = [];
|
||||||
EventBus.getInstance().on(
|
EventBus.getInstance().on(
|
||||||
EventNamesDefine.NotifyMessage,
|
EventNamesDefine.NotifyMessage,
|
||||||
(notify: NotifyMessage) => {
|
(notify: NotifyMessage) => {
|
||||||
|
@ -1704,11 +1718,17 @@ export default defineComponent({
|
||||||
const settings = await GlobalData.getInstance()
|
const settings = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.getOutputBoardSetting();
|
?.getOutputBoardSetting();
|
||||||
|
|
||||||
const response = await client.getMagicWallConfig();
|
const response = await client.getMagicWallConfig();
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
const SetMagicWallGridState = await client.setMagicWallGridState(
|
const SetMagicWallGridState = await client.setMagicWallGridState(
|
||||||
magic_switch.value
|
magic_switch.value
|
||||||
);
|
);
|
||||||
|
list_magic = (await client.getApplicationSettins())?.config
|
||||||
|
?.magic_list;
|
||||||
|
if (list_magic) {
|
||||||
|
test_monitor_list.value = JSON.parse(list_magic);
|
||||||
|
}
|
||||||
if (wall_dom) {
|
if (wall_dom) {
|
||||||
offsetHeight.value = wall_dom.offsetHeight;
|
offsetHeight.value = wall_dom.offsetHeight;
|
||||||
offsetWidth.value = wall_dom.offsetWidth;
|
offsetWidth.value = wall_dom.offsetWidth;
|
||||||
|
@ -1771,6 +1791,7 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
item.angle = element.angle;
|
item.angle = element.angle;
|
||||||
item.isShow = true;
|
item.isShow = true;
|
||||||
|
item.active=false
|
||||||
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
|
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
|
||||||
last_wall.value.push(JSON.parse(JSON.stringify(item)));
|
last_wall.value.push(JSON.parse(JSON.stringify(item)));
|
||||||
sort_index.value.push(
|
sort_index.value.push(
|
||||||
|
@ -1779,11 +1800,7 @@ export default defineComponent({
|
||||||
old_sort_index.push(
|
old_sort_index.push(
|
||||||
test_monitor_list.value[element.index].uuid
|
test_monitor_list.value[element.index].uuid
|
||||||
);
|
);
|
||||||
test_monitor_list.value.forEach((ele) => {
|
test_monitor_list.value[element.index].isHide = true;
|
||||||
if (element.index == ele.id) {
|
|
||||||
ele.isHide = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
if (a.length == 1) {
|
if (a.length == 1) {
|
||||||
current_index.value = 0;
|
current_index.value = 0;
|
||||||
|
@ -1833,7 +1850,7 @@ export default defineComponent({
|
||||||
),
|
),
|
||||||
h: element.h / wall_dom.offsetHeight,
|
h: element.h / wall_dom.offsetHeight,
|
||||||
w: element.w / wall_dom.offsetWidth,
|
w: element.w / wall_dom.offsetWidth,
|
||||||
angle: parseInt(element.angle.toString()),
|
angle: Number(element.angle.toString()) ?? 0,
|
||||||
initial_h: element.InitialH,
|
initial_h: element.InitialH,
|
||||||
initial_w: element.InitialW,
|
initial_w: element.InitialW,
|
||||||
percenter: percenter.value,
|
percenter: percenter.value,
|
||||||
|
@ -1843,7 +1860,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const setMagic = await client.setMagicWallConfig(cloud_monitor_list);
|
const setMagic = await client.setMagicWallConfig(cloud_monitor_list);
|
||||||
|
client.setMagicWallList(
|
||||||
|
JSON.parse(JSON.stringify(test_monitor_list.value))
|
||||||
|
);
|
||||||
if (setMagic?.success) {
|
if (setMagic?.success) {
|
||||||
let monitorList: any = [];
|
let monitorList: any = [];
|
||||||
test_monitor_wall.value.forEach((element, index) => {
|
test_monitor_wall.value.forEach((element, index) => {
|
||||||
|
@ -1854,7 +1873,7 @@ export default defineComponent({
|
||||||
currenty: element.currenty / wall_dom.offsetHeight,
|
currenty: element.currenty / wall_dom.offsetHeight,
|
||||||
h: element.h / wall_dom.offsetHeight,
|
h: element.h / wall_dom.offsetHeight,
|
||||||
w: element.w / wall_dom.offsetWidth,
|
w: element.w / wall_dom.offsetWidth,
|
||||||
angle: parseInt(element.angle.toString()),
|
angle: Number(element.angle.toString()) ?? 0,
|
||||||
centerx: element.centerx / 3840,
|
centerx: element.centerx / 3840,
|
||||||
centery: element.centery / 2160,
|
centery: element.centery / 2160,
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,4 +45,5 @@ export default class ApplicationConfigEntity {
|
||||||
cloud_server_verify_key = "";
|
cloud_server_verify_key = "";
|
||||||
cloud_server_use_wss = "0";
|
cloud_server_use_wss = "0";
|
||||||
cloud_server_enable = "0";
|
cloud_server_enable = "0";
|
||||||
|
magic_list:any=[]
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,10 @@ export default {
|
||||||
Accept: "Accept",
|
Accept: "Accept",
|
||||||
"move speed": "Move Speed",
|
"move speed": "Move Speed",
|
||||||
"y offset": "Y Offset",
|
"y offset": "Y Offset",
|
||||||
"the number must be greater than 0": "the number must be greater than 0",
|
"the number must be greater than 0": "The Number Must Be Greater Than 0",
|
||||||
|
"the number must be less than 2160":"The Number Must Be Less Than 2160",
|
||||||
|
"the number must be less than 3840":"The Number Must Be Less Than 3840",
|
||||||
|
"the number must be greater than 360":"The Number Must Be Less Than 360",
|
||||||
"pos x": "X Position",
|
"pos x": "X Position",
|
||||||
"pos y": "Y Position",
|
"pos y": "Y Position",
|
||||||
width: "Width",
|
width: "Width",
|
||||||
|
|
|
@ -489,7 +489,11 @@ export default {
|
||||||
"full screen window": "全屏",
|
"full screen window": "全屏",
|
||||||
"restore window size": "恢复",
|
"restore window size": "恢复",
|
||||||
"the number must be greater than 0": "数字必须大于0",
|
"the number must be greater than 0": "数字必须大于0",
|
||||||
|
"the number must be less than 2160":"数字必须小于等于2160",
|
||||||
|
"the number must be less than 3840":"数字必须小于等于3840",
|
||||||
"the number must be greater than 1": "数字必须大于1",
|
"the number must be greater than 1": "数字必须大于1",
|
||||||
|
"the number must be greater than 360":"数字必须小于等于360",
|
||||||
|
|
||||||
X: "X坐标",
|
X: "X坐标",
|
||||||
Y: "Y坐标",
|
Y: "Y坐标",
|
||||||
"edit window rect": "窗口大小调整",
|
"edit window rect": "窗口大小调整",
|
||||||
|
|
Loading…
Reference in New Issue