修复 是否同步操作不保存状态

This commit is contained in:
shefengchun 2023-02-23 17:31:41 +08:00
parent ae87589a45
commit 361bcb7719
2 changed files with 8 additions and 3 deletions

View File

@ -62,7 +62,7 @@
]" />
</div>
<div class="col-3"><span>{{ $t('Whether to operate synchronously') }}</span><q-checkbox
v-model="auto_sync" /></div>
v-model="auto_sync" @update:model-value="()=>{}" /></div>
</div>
</div>
</div>
@ -397,12 +397,15 @@ export default defineComponent({
ste_status.value = 0;
}, 100);
})
if(sessionStorage.FusionLocale_async)auto_sync.value=sessionStorage.FusionLocale_async=='true'
console.log("🚀 ~ file: FusionLocale.vue:401 ~ onMounted ~ sessionStorage.FusionLocale_async:", sessionStorage.FusionLocale_async)
}),
onBeforeUnmount(() => {
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
sessionStorage.FusionLocale_async=auto_sync.value
});
watch(
@ -550,7 +553,7 @@ export default defineComponent({
let tmpobjall = JSON.parse($store.state.fusion_configuration)
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0) {
let tmp = set_cache.value[1] == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]);
let tmp = set_cache.value[1].array == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]).array;
let set_cache_tmp: any = []
if (tmp[1].hasOwnProperty("power")) {
for (let index = 0; index < 4; index++) {
@ -609,7 +612,8 @@ export default defineComponent({
auxiliary_line,
reset,
auto_sync,
config
config,
save_set_cache
};
},
});

View File

@ -354,6 +354,7 @@ export default defineComponent({
sessionStorage.removeItem("FourPointCalibration");
sessionStorage.removeItem("GridSettings");
sessionStorage.removeItem("Debugging");
sessionStorage.removeItem("FusionLocale_async");
}
const config = ref({ col: 0, row: 0 });