From 2a74a78e99cb0b10404e8d7b489a4287b641e31a Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Thu, 12 Jan 2023 16:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=BB=E8=BE=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 12 +++++ .../FusionSettings/FourPointCalibration.vue | 12 +++++ .../FusionSettings/FusionLocale.vue | 47 ++++++++++--------- .../FusionSettings/SurfaceCorrection.vue | 9 ++++ src/components/FusionSettingsDialog.vue | 19 +++++++- 5 files changed, 74 insertions(+), 25 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index 2c73544..249c38d 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -213,6 +213,7 @@ export default defineComponent({ } ste_status.value=1; config = JSON.parse(JSON.stringify(fortmp)) + use_server_config() use_set_cache() setTimeout(() => { ste_status.value=0; @@ -301,6 +302,17 @@ export default defineComponent({ save_set_cache() } + const use_server_config=()=>{ + for (let index = 0; index < config.hor_density.length; index++) { + value[index].x = config.ver_density[index].x + value[index].y = config.ver_density[index].y + value[index].number = config.ver_density[index].number + value[index + 5].x = config.hor_density[index].x + value[index + 5].y = config.hor_density[index].y + value[index+5].number = config.hor_density[index].number + } + } + onMounted(() => { initialization() diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 99e4bcf..7367a77 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -154,6 +154,17 @@ export default defineComponent({ }, 100); }) + const use_server_config=()=>{ + for (let index = 0; index < fourpostion.value.length; index++) { + defaultfourpostion.value[index].x = fourpostion.value[index].x; + defaultfourpostion.value[index].y = fourpostion.value[index].y; + defaultfour.value[index].x = config.point4[index].def_x + defaultfour.value[index].y = config.point4[index].def_y + four[index].x = config.point4[index].x + four[index].y = config.point4[index].y + } + } + const setpoa = () => { points[0].x = 0 @@ -279,6 +290,7 @@ export default defineComponent({ ste_status.value=1; config = JSON.parse(JSON.stringify(fortmp)) //setpoa(); + use_server_config() use_set_cache() setTimeout(() => { ste_status.value=0; diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index c1839d4..c2e8d87 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -2,16 +2,17 @@
{{ $t("Projector") }}
@@ -165,7 +165,21 @@ export default defineComponent({ const save = () => { set?.SaveBlendingConfig("") show_dialog.value = false + clear() + set?.GetBlendingConfig("").then((res)=>{let tmp=JSON.parse(res?res.config:"");EnableBlending.value=tmp.enable;$store.commit("setEnablefusion", tmp.enable);config.value.col=tmp.col;config.value.row=tmp.row;$store.commit("setfusion_configuration", res?.config);}) } + const clear=()=>{ + + sessionStorage.removeItem('DensityCorrection') + sessionStorage.removeItem('FourPointCalibration') + + sessionStorage.removeItem('SurfaceCorrection') + + setTimeout(()=>{ + sessionStorage.removeItem('FusionLocale') + },500) + } + onBeforeMount(() => { setTimeout(() => { try { @@ -181,6 +195,7 @@ export default defineComponent({ }, 500); }) return { + clear, show_dialog, options, copyToClipboard,