From 52c375fc7de2d640e21ad9a78d65271e1c1d00af Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Wed, 22 Feb 2023 14:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=BC=A0=E6=A0=87=E6=BB=9A?= =?UTF-8?q?=E8=BD=AE=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 78 +++++++++++++++++-- .../FusionSettings/FourPointCalibration.vue | 60 +++++++++++++- .../FusionSettings/FusionLocale.vue | 14 +++- .../FusionSettings/SurfaceCorrection.vue | 61 ++++++++++++++- src/components/FusionSettingsDialog.vue | 12 ++- 5 files changed, 207 insertions(+), 18 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index a86aad8..d447fc6 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -63,10 +63,10 @@
-
-
@@ -90,10 +90,10 @@
-
-
@@ -893,6 +893,71 @@ export default defineComponent({ let tmp = now_v_h.value == "vertical" ? "v" : "h" add_control_points(Number(now_amount.value), tmp); } + + /** + * 滚轮切换 + * @param details + */ + const details_selsect_v=(details:any) => { + let spt=details.deltaY/100 + if(spt>0){ + if(options_model_v.value>=value_v_point.value.length-1){ + options_model_v.value=0 + }else{ + options_model_v.value++ + } + }else{ + if(options_model_v.value<=0){ + options_model_v.value=value_v_point.value.length-1 + }else{ + options_model_v.value-- + } + } + } + const details_selsect_h=(details:any) => { + let spt=details.deltaY/100 + if(spt>0){ + if(options_model_h.value>=value_h_point.value.length-1){ + options_model_h.value=0 + }else{ + options_model_h.value++ + } + }else{ + if(options_model_h.value<=0){ + options_model_h.value=value_h_point.value.length-1 + }else{ + options_model_h.value-- + } + } + } + + /** + * v数据 + */ + + const details_selsect_val = (details: any, type: string) => { + let spt = details.deltaY / 100 + switch (type) { + case 'v': + if (spt > 0) { + value_v.value[options_model_v.value].y++ + } else { + value_v.value[options_model_v.value].y-- + } + chang(options_model_v.value,value_v.value[options_model_v.value].y,"v") + break; + default: + if (spt > 0) { + value_h.value[options_model_h.value].x++ + } else { + value_h.value[options_model_h.value].x-- + } + chang(options_model_h.value,value_h.value[options_model_h.value].x,"h") + break; + } + + } + defineExpose({ now_v_h, options_model_v, @@ -930,7 +995,10 @@ export default defineComponent({ add_dialog, now_amount, set_cache, - resetall_all + resetall_all, + details_selsect_h, + details_selsect_v, + details_selsect_val } } }) diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 6cef96a..b993ef9 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -19,15 +19,15 @@
-
-
-
@@ -358,10 +358,61 @@ export default defineComponent({ } } + /** + * 滚轮切换 + * @param details + */ + const is_active=ref(false); + const details_selsect=(details:any) => { + if(is_active){ + let spt=details.deltaY/100 + if(spt>0){ + if(options_model.value>=value_point.value.length-1){ + options_model.value=0 + }else{ + options_model.value++ + } + }else{ + if(options_model.value<=1){ + options_model.value=value_point.value.length-1 + }else{ + options_model.value-- + } + + } + } + } + + /** + * 滚轮改变数据 + */ + const details_selsect_val = (details: any, type: string) => { + let spt = details.deltaY / 100 + switch (type) { + case 'x': + if (spt > 0) { + value.value[options_model.value].x++ + } else { + value.value[options_model.value].x-- + } + break; + default: + if (spt > 0) { + value.value[options_model.value].y++ + } else { + value.value[options_model.value].y-- + } + break; + } + chang(options_model.value,"","") + } + defineExpose({ options_model, }); return { + is_active, + details_selsect, resetall, div, max, @@ -374,7 +425,8 @@ export default defineComponent({ reset, value_point_amount, chang_point_amount, - options + options, + details_selsect_val } } }) diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index ad31408..7c4d431 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -257,6 +257,7 @@ export default defineComponent({ const save_set_cache = () => { set_cache.value[selectedprojector.value] = JSON.stringify(array); }; + let config = JSON.parse($store.state.fusion_configuration).projectors[0]; const configselsect = computed(() => { return $store.state.selected_projector; @@ -387,11 +388,18 @@ export default defineComponent({ } }; onMounted(() => { - ste_status.value = 1; - startconfig(); - setTimeout(() => { + set?.GetBlendingConfig("").then((res) => { + let tmp = JSON.parse(res ? res.config : ""); + config = tmp.projectors[0]; + ste_status.value = 1; + startconfig(); + setTimeout(() => { ste_status.value = 0; }, 100); + }) + + + }), onBeforeUnmount(() => { sessionStorage.FusionLocale = JSON.stringify(set_cache.value); diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index eb72f2f..c65fe3a 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -38,13 +38,13 @@
-
-
-
@@ -636,10 +636,62 @@ export default defineComponent({ value_point_amount.value = val ** 2 options_model.value = 1 } + + /** + * 滚轮切换 + * @param details + */ + const is_active=ref(false); + const details_selsect=(details:any) => { + if(is_active){ + let spt=details.deltaY/100 + if(spt>0){ + if(options_model.value>=value_point.value.length-1){ + options_model.value=0 + }else{ + options_model.value++ + } + }else{ + if(options_model.value<=1){ + options_model.value=value_point.value.length-1 + }else{ + options_model.value-- + } + + } + } + } + + /** + * 滚轮改变数据 + */ + const details_selsect_val = (details: any, type: string) => { + let spt = details.deltaY / 100 + switch (type) { + case 'x': + if (spt > 0) { + value.value[options_model.value].x++ + } else { + value.value[options_model.value].x-- + } + break; + default: + if (spt > 0) { + value.value[options_model.value].y++ + } else { + value.value[options_model.value].y-- + } + break; + } + chang(options_model.value,"","") + } + defineExpose({ options_model, }); return { + is_active, + details_selsect, resetall_all, resetall, div, @@ -661,7 +713,8 @@ export default defineComponent({ add_dialog, add, now_amount, - preview + preview, + details_selsect_val } } }) diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 709c472..687ea26 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -409,9 +409,11 @@ export default defineComponent({ break; case 'FourPointCalibration': tmp = '4' + set?.SetBlendingOption("blending_grids_control_point_count", `4`) break; case 'SurfaceCorrection': tmp = '9' + //set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`) set?.SetBlendingOption("blending_grids_select_point", `9:1`) break; case 'DensityCorrection': @@ -489,11 +491,14 @@ export default defineComponent({ config.value.col = tmp.col; config.value.row = tmp.row; $store.commit("setfusion_configuration", res?.config); + config.value.col=tmp.col + config.value.row=tmp.row allconfig = JSON.parse($store.state.fusion_configuration); if(allconfig.resolution){ for (let index = 0; index < allconfig.resolution.length; index++) { - if(allconfig.resolution.width==allconfig.projector_width&&allconfig.resolution.height==allconfig.projector_height){ + if(allconfig.resolution[index].width==allconfig.projector_width&&allconfig.resolution[index].height==allconfig.projector_height){ now_resolution.value=index + } } }else{ @@ -503,8 +508,11 @@ export default defineComponent({ }); get_scenes() set?.SetBlendingOption("blending_grids_select_ui", "blending") + + }, 100); + // setTimeout(() => { optionsstr.value = "FusionLocale"; - }, 1000); + // }, 1000); }); const save_cover_name = ref("") const plan_list = [