修复删除窗口错误删除

This commit is contained in:
miao 2023-03-09 17:41:57 +08:00
parent 4ddd39864e
commit 3d0925f444
1 changed files with 32 additions and 27 deletions

View File

@ -107,7 +107,7 @@
<q-card class="my-card" flat bordered> <q-card class="my-card" flat bordered>
<q-card-section horizontal> <q-card-section horizontal>
<q-card-section class="col-3" style=""> <q-card-section class="col-3" style="">
<div style="font-size: 1.2rem;">{{ $t("angle") }}</div> <div style="font-size: 1.2rem">{{ $t("angle") }}</div>
<q-separator /> <q-separator />
<br /> <br />
<div class="no-wrap items-center"> <div class="no-wrap items-center">
@ -162,13 +162,13 @@
</q-item> </q-item>
</div> </div>
<br /> <br />
<div style="font-size: 1.2rem;"> <div style="font-size: 1.2rem">
{{ $t("physical central location") }} {{ $t("physical central location") }}
</div> </div>
<q-separator /> <q-separator />
<br /> <br />
<div class=" no-wrap items-center"> <div class="no-wrap items-center">
<q-item class="row "> <q-item class="row">
<q-item-section avatar class="col-2"> <q-item-section avatar class="col-2">
<span class="q-mb-md">X:</span> <span class="q-mb-md">X:</span>
</q-item-section> </q-item-section>
@ -215,7 +215,7 @@
</div> </div>
<br /> <br />
<div > <div>
<q-item class="row"> <q-item class="row">
<q-item-section avatar class="col-2"> <q-item-section avatar class="col-2">
<span class="q-mb-md">Y:</span> <span class="q-mb-md">Y:</span>
@ -411,7 +411,7 @@
<q-item-section> <q-item-section>
<q-input <q-input
v-if="monitor_list_current_index > -1" v-if="monitor_list_current_index > -1"
type="text" type="number"
v-model="test_monitor_list[monitor_list_current_index].cmw" v-model="test_monitor_list[monitor_list_current_index].cmw"
@update:model-value="changewidth()" @update:model-value="changewidth()"
:rules="[ :rules="[
@ -452,7 +452,7 @@
<q-item-section> <q-item-section>
<q-input <q-input
v-if="monitor_list_current_index > -1" v-if="monitor_list_current_index > -1"
type="text" type="number"
v-model="test_monitor_list[monitor_list_current_index].cmh" v-model="test_monitor_list[monitor_list_current_index].cmh"
@update:model-value="changeHeight()" @update:model-value="changeHeight()"
:rules="[ :rules="[
@ -1000,7 +1000,7 @@ export default defineComponent({
const close_magic_switch = () => { const close_magic_switch = () => {
let client = GlobalData.getInstance().getCurrentClient(); let client = GlobalData.getInstance().getCurrentClient();
magic_switch.value = false; magic_switch.value = false;
if(client){ if (client) {
client.setMagicWallList( client.setMagicWallList(
JSON.parse(JSON.stringify(test_monitor_list.value)) JSON.parse(JSON.stringify(test_monitor_list.value))
); );
@ -1375,12 +1375,12 @@ export default defineComponent({
multiple.value = false; multiple.value = false;
loading.value = false; loading.value = false;
if (list_magic) { if (list_magic) {
JSON.parse(list_magic).forEach((element:any,index:number) => { JSON.parse(list_magic).forEach((element: any, index: number) => {
if(test_monitor_list.value[index].uuid==element.uuid){ if (test_monitor_list.value[index].uuid == element.uuid) {
test_monitor_list.value[index].cmw=element.cmw test_monitor_list.value[index].cmw = element.cmw;
test_monitor_list.value[index].cmh=element.cmh 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);
}; };
@ -2010,15 +2010,15 @@ export default defineComponent({
const wall_dom = wall.value; const wall_dom = wall.value;
item.isShow = true; item.isShow = true;
if (wall_dom) { if (wall_dom) {
if(item.cmw==1214){ if (item.cmw == 1214) {
item.w=wall_dom.offsetWidth*0.5 item.w = wall_dom.offsetWidth * 0.5;
}else{ } else {
item.w=(item.cmw/1214) *(wall_dom.offsetWidth*0.5) item.w = (item.cmw / 1214) * (wall_dom.offsetWidth * 0.5);
} }
if(item.cmh==684){ if (item.cmh == 684) {
item.h=wall_dom.offsetHeight*0.5 item.h = wall_dom.offsetHeight * 0.5;
}else{ } else {
item.h=(item.cmh/684) *(wall_dom.offsetHeight*0.5) item.h = (item.cmh / 684) * (wall_dom.offsetHeight * 0.5);
} }
item.InitialH = item.h; item.InitialH = item.h;
item.InitialW = item.w; item.InitialW = item.w;
@ -2095,11 +2095,16 @@ export default defineComponent({
); );
const temp_index = sort_index.value.indexOf(item.uuid); const temp_index = sort_index.value.indexOf(item.uuid);
sort_index.value.splice(temp_index, 1); sort_index.value.splice(temp_index, 1);
test_monitor_wall.value.forEach((ele, ind) => {
if (ele.uuid == item.uuid) {
test_monitor_wall.value.splice(ind, 1);
}
});
test_monitor_list.value[item.id].isHide = false; test_monitor_list.value[item.id].isHide = false;
test_monitor_wall.value[index].isShow = false; // test_monitor_wall.value[temp_index].isShow = false;
multiple_select.value = []; multiple_select.value = [];
test_monitor_wall.value.splice(temp_index, 1);
realtime_upload(); realtime_upload();
current_index.value = -1;
}, },
closeOtherWindows(item: test_monitor, index: number) { closeOtherWindows(item: test_monitor, index: number) {
current_index.value = index; current_index.value = index;