修复多次点击恢复显示器列表全部出现

This commit is contained in:
miao 2023-03-09 15:46:15 +08:00
parent 70d7a7010e
commit d7104f33fd
1 changed files with 12 additions and 4 deletions

View File

@ -998,7 +998,13 @@ export default defineComponent({
} }
}; };
const close_magic_switch = () => { const close_magic_switch = () => {
let client = GlobalData.getInstance().getCurrentClient();
magic_switch.value = false; magic_switch.value = false;
if(client){
client.setMagicWallList(
JSON.parse(JSON.stringify(test_monitor_list.value))
);
}
upload_magic_switch(); upload_magic_switch();
}; };
const radians = (item: test_monitor) => { const radians = (item: test_monitor) => {
@ -1369,7 +1375,12 @@ export default defineComponent({
multiple.value = false; multiple.value = false;
loading.value = false; loading.value = false;
if (list_magic) { if (list_magic) {
test_monitor_list.value = JSON.parse(list_magic); JSON.parse(list_magic).forEach((element:any,index:number) => {
if(test_monitor_list.value[index].uuid==element.uuid){
test_monitor_list.value[index].cmw=element.cmw
test_monitor_list.value[index].cmh=element.cmh
}
});;
} }
realtime_upload(last_wall.value, last_percenter.value, 2); realtime_upload(last_wall.value, last_percenter.value, 2);
}; };
@ -1505,9 +1516,6 @@ export default defineComponent({
}); });
} }
if (a.length == 0) { if (a.length == 0) {
test_monitor_list.value.forEach((ele) => {
ele.isHide = false;
});
test_monitor_wall.value = []; test_monitor_wall.value = [];
} }
}; };