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 @@
+
-
- +
+
-
-
+
-
-
+
-
-
+
- { @@ -182,8 +182,9 @@ export default defineComponent({ } } ste_status.value = 1; + config = JSON.parse(JSON.stringify(fortmp)) - //startconfig() + use_server_config() use_set_cache() setTimeout(() => { ste_status.value = 0; @@ -218,15 +219,24 @@ export default defineComponent({ }; const startconfig = () => { for (let index = 0; index < array.length; index++) { - array[index].gamma = config.params[index].gamma - array[index].alpha = config.params[index].alpha - array[index].p = config.params[index].power + array[index].gamma = config.params[index].gamma.toFixed(2) + array[index].alpha = config.params[index].alpha.toFixed(2) + array[index].p = config.params[index].power.toFixed(2) array[index].isshow = config.params[index].enable array[index].value = Number(config.params[index].size) } if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); use_set_cache() } + const use_server_config=()=>{ + for (let index = 0; index < array.length; index++) { + array[index].gamma = config.params[index].gamma.toFixed(2) + array[index].alpha = config.params[index].alpha.toFixed(2) + array[index].p = config.params[index].power.toFixed(2) + array[index].isshow = config.params[index].enable + array[index].value = Number(config.params[index].size) + } + } startconfig() onBeforeUnmount(() => { sessionStorage.FusionLocale = JSON.stringify(set_cache.value) @@ -236,9 +246,6 @@ export default defineComponent({ () => array[0], (newVal, oldVal) => { if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 1, array[0].isshow, Number(array[0].value)); - // if (!array[0].isshow) { - // array[0].value = 0 - // } save_set_cache() }, { deep: true } @@ -247,9 +254,6 @@ export default defineComponent({ () => array[1], (newVal, oldVal) => { if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 0, array[1].isshow, Number(array[1].value)); - // if (!array[1].isshow) { - // array[1].value = 0 - // } save_set_cache() }, { deep: true } @@ -258,9 +262,6 @@ export default defineComponent({ () => array[2], (newVal, oldVal) => { if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 2, array[2].isshow, Number(array[2].value)); - // if (!array[2].isshow) { - // array[2].value = 0 - // } save_set_cache() }, { deep: true } diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 014b05b..be4fa82 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -291,6 +291,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; @@ -365,6 +366,14 @@ export default defineComponent({ } syncpoint() } + const use_server_config=()=>{ + for (let index = 0; index < defaultninepostion.value.length; index++) { + defaultninepostion.value[index].x = ninepostion.value[index].x; + defaultninepostion.value[index].y = ninepostion.value[index].y; + defaultnine.value[index].x = nine[index].x + defaultnine.value[index].y = nine[index].y + } + } const reset = (index: number) => { ninepostion.value[index].x = defaultninepostion.value[index].x; ninepostion.value[index].y = defaultninepostion.value[index].y; diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index c59bb63..268fea6 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -15,7 +15,7 @@
- + {{ $t("close") }} @@ -26,7 +26,7 @@ - +

{{ $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,