魔墙:加开窗避免显示为空

This commit is contained in:
miao 2023-03-08 14:14:58 +08:00
parent 8583f77627
commit 1f1a26de65
1 changed files with 18 additions and 10 deletions

View File

@ -1292,9 +1292,11 @@ 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))) test_monitor_wall.value = ordination(
JSON.parse(JSON.stringify(test_monitor_wall.value))
);
realtime_upload(); realtime_upload();
item.active=true item.active = true;
}; };
const exceedrange = (item: test_monitor) => { const exceedrange = (item: test_monitor) => {
const wall_dom = wall.value; const wall_dom = wall.value;
@ -1482,7 +1484,7 @@ export default defineComponent({
); );
item.angle = element.angle; item.angle = element.angle;
item.isShow = true; item.isShow = true;
item.active=false; 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);
@ -1493,11 +1495,11 @@ export default defineComponent({
}); });
}); });
} }
if(a.length==0){ if (a.length == 0) {
test_monitor_list.value.forEach((ele) => { test_monitor_list.value.forEach((ele) => {
ele.isHide = false; ele.isHide = false;
}) });
test_monitor_wall.value=[] test_monitor_wall.value = [];
} }
}; };
const sub_x = () => { const sub_x = () => {
@ -1719,7 +1721,7 @@ export default defineComponent({
sort_index.value = []; sort_index.value = [];
old_sort_index = []; old_sort_index = [];
last_wall.value = []; last_wall.value = [];
last_percenter.value=1 last_percenter.value = 1;
let client = GlobalData.getInstance().getCurrentClient(); let client = GlobalData.getInstance().getCurrentClient();
if (client) { if (client) {
const settings = await GlobalData.getInstance() const settings = await GlobalData.getInstance()
@ -1774,7 +1776,7 @@ export default defineComponent({
}); });
$store.commit("setShowMonitorList", []); $store.commit("setShowMonitorList", []);
loading.value = false; loading.value = false;
} else if (a && wall_dom) { } else if (a && wall_dom) {
a.forEach((element) => { a.forEach((element) => {
let item: test_monitor = new test_monitor(0, "0", 0, 0, 0); let item: test_monitor = new test_monitor(0, "0", 0, 0, 0);
extend(true, item, test_monitor_list.value[element.index]); extend(true, item, test_monitor_list.value[element.index]);
@ -1798,7 +1800,7 @@ export default defineComponent({
); );
item.angle = element.angle; item.angle = element.angle;
item.isShow = true; item.isShow = true;
item.active=false 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(
@ -1815,6 +1817,13 @@ export default defineComponent({
current_index.value = -1; current_index.value = -1;
} }
} }
if (a.length == 0) {
test_monitor_list.value.forEach((ele) => {
ele.isHide = false;
});
sort_index.value = [];
test_monitor_wall.value = [];
}
} }
} }
}, },
@ -2017,7 +2026,6 @@ export default defineComponent({
} }
} }
} }
}, },
onDragEnter(e: DragEvent, index: string) { onDragEnter(e: DragEvent, index: string) {