From aa0e83045b3284e9ec4d8ea9a6d169131b91ce9d Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 09:42:13 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B2=E9=9D=A2?= =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E4=B8=8D=E5=8F=91=E9=80=81=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=82=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettingsDialog.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 6a0efdc..815d705 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -425,8 +425,14 @@ export default defineComponent({ 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`) + /** + * 延迟发送不然获取不到值 + */ + setTimeout(() => { + set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`) + set?.SetBlendingOption("blending_grids_select_point", `${child.value!.value_point_amount}:1`) + }, 100); + break; case 'DensityCorrection': tmp = 'hor_density' From 5027ba52330f3a258de9d63a2b02e828c016f452 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 14:00:14 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 7 +- .../FusionSettings/FourPointCalibration.vue | 69 +++++++++++++++++-- .../FusionSettings/FusionLocale.vue | 3 +- .../FusionSettings/GridSettings.vue | 2 +- .../FusionSettings/SurfaceCorrection.vue | 15 ++-- src/components/FusionSettingsDialog.vue | 14 ++-- 6 files changed, 85 insertions(+), 25 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index a1e9511..7f98319 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -557,7 +557,8 @@ export default defineComponent({ let tmp = JSON.parse($store.state.fusion_configuration).options; auxiliary_line.value = tmp.blending_grids_density_assistant_lines == "1" now_v_h.value = "level" - start_point(5, 'all') + start_point(Number(options_value_h_point_amount.value[0]), 'h') + start_point(Number(options_value_v_point_amount.value[0]), 'v') if ( sessionStorage.DensityCorrection && sessionStorage.DensityCorrection.length > 0 @@ -931,7 +932,7 @@ export default defineComponent({ */ const details_selsect_v = (details: any) => { let spt = details.deltaY / 100 - if (spt < 0) { + if (spt > 0) { if (options_model_v.value >= value_v_point.value.length - 1) { options_model_v.value = 0 } else { @@ -947,7 +948,7 @@ export default defineComponent({ } const details_selsect_h = (details: any) => { let spt = details.deltaY / 100 - if (spt < 0) { + if (spt > 0) { if (options_model_h.value >= value_h_point.value.length - 1) { options_model_h.value = 0 } else { diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index b8a2593..7e2a752 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -62,7 +62,9 @@ import { watch, nextTick, onBeforeUnmount, - defineExpose + defineExpose, +toRefs, +inject } from "vue"; import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; @@ -83,7 +85,15 @@ export default defineComponent({ components: { Vue3DraggableResizable }, - setup() { + props: { + col: { + type: String, + }, + row: { + type: String, + } + }, + setup(props) { let set = GlobalData.getInstance().getCurrentClient(); let $store = useStore(); let $t = useI18n(); @@ -227,12 +237,38 @@ export default defineComponent({ let tmp = coordinate_transformation_xy_to_value(obj_x, obj_y) value.value[index].x = Math.round(tmp.x) value.value[index].y = Math.round(tmp.y) - send_value(index, Math.round(tmp.x), Math.round(tmp.y)) + /** + * 判断摄像机 + */ + if(now_selsect_projector?.value=='0-0'){ + + if(index==1||index==3){ + value.value[index].x = Math.round(tmp.x)>allconfig.projector_width?allconfig.projector_width:Math.round(tmp.x) + } + } + if(now_selsect_projector?.value=='0-1'){ + if(index==0||index==2){ + value.value[index].x = Math.round(tmp.x)<0?0:Math.round(tmp.x) + } + } + + send_value(index, value.value[index].x , value.value[index].y) save_set_cache() } const chang = (index: number, $event: any, type: string) => { index = Number(index) + if (now_selsect_projector?.value == '0-0') { + + if (index == 1 || index == 3) { + value.value[index].x > allconfig.projector_width ? value.value[index].x =allconfig.projector_width : value.value[index].x + } + } + if (now_selsect_projector?.value == '0-1') { + if (index == 0 || index == 2) { + value.value[index].x < 0 ? value.value[index].x= 0 : value.value[index].x + } + } let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y) value_point.value[index].y = Math.round(tmp.y) value_point.value[index].x = Math.round(tmp.x) @@ -365,7 +401,7 @@ export default defineComponent({ */ const details_selsect=(details:any) => { let spt=details.deltaY/100 - if(spt<0){ + if(spt>0){ if(options_model.value>=value_point.value.length-1){ options_model.value=0 }else{ @@ -389,9 +425,28 @@ export default defineComponent({ switch (type) { case 'x': if (spt < 0) { - value.value[options_model.value].x++ + if(now_selsect_projector?.value=='0-0'&&props.col=='2'){ + + if(options_model.value==1||options_model.value==3){ + value.value[options_model.value].x>allconfig.projector_width?value.value[options_model.value].x = allconfig.projector_width:value.value[options_model.value].x++ + }else{ + value.value[options_model.value].x++ + } + }else{ + value.value[options_model.value].x++ + } } else { - value.value[options_model.value].x-- + + if(now_selsect_projector?.value=='0-1'&&props.col=='2'){ + if(options_model.value==0||options_model.value==2){ + value.value[options_model.value].x <0?value.value[options_model.value].x = 0:value.value[options_model.value].x -- + }else{ + value.value[options_model.value].x-- + } + }else{ + value.value[options_model.value].x -- + } + } break; default: @@ -408,7 +463,9 @@ export default defineComponent({ defineExpose({ options_model, }); + const now_selsect_projector:any = inject("now_selsect_projector"); return { + now_selsect_projector, details_selsect, resetall, div, diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index 8516039..7bbb5d4 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -184,6 +184,7 @@ import { onBeforeUnmount, reactive, onMounted, +toRefs, } from "vue"; import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; @@ -207,7 +208,7 @@ export default defineComponent({ { alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 }, { alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 }, ]); - const auto_sync = ref(false) + const auto_sync = ref(true) const auxiliary_line = ref(false) const send_auxiliary_line = (val: boolean) => { set?.SetBlendingOption("blending_grids_assistant_lines", val ? "1" : "0"); diff --git a/src/components/FusionSettings/GridSettings.vue b/src/components/FusionSettings/GridSettings.vue index bc3aa3c..6660458 100644 --- a/src/components/FusionSettings/GridSettings.vue +++ b/src/components/FusionSettings/GridSettings.vue @@ -130,7 +130,7 @@ export default defineComponent({ const index = ref(0); const color = reactive(["#ffffff", "#CCCCCC", "#000", "#000"]); let model = reactive([20, 40, 20]); - let options = ref([10, 20, 30, 40, 50]); + let options = ref([10, 20, 30, 40, 50, 60 ,80]); let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]); const submit = () => { switch (index.value) { diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 4bbf3c2..595c3ba 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -183,8 +183,8 @@ export default defineComponent({ }; const use_server_config = () => { - value_point_amount.value = 9 - let a = 9 + value_point_amount.value = Number(Object.keys(config.multi_curved_surface)[0]) + let a = value_point_amount.value value.value = [] value_point.value = [] for (let index = 0; index < config.multi_curved_surface[a].length; index++) { @@ -372,7 +372,7 @@ export default defineComponent({ onMounted(() => { Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w) Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h) - start_point(9) + start() use_server_config() if ( @@ -383,6 +383,7 @@ export default defineComponent({ use_set_cache(); } options_value_point_amount.value = Object.keys(config.multi_curved_surface) + start_point(Number(options_value_point_amount.value[0])) window.onresize = () => { return (() => { if (div != null) { @@ -536,9 +537,9 @@ export default defineComponent({ for (let key in tmpconfig.multi_curved_surface) { options_value_point_amount.value.push(key) } - value_point_amount.value = 9 - amount = 9 - now_amount.value = 9 + value_point_amount.value = Number(options_value_point_amount.value[0]) + amount = Number(options_value_point_amount.value[0]) + now_amount.value = Number(options_value_point_amount.value[0]) $store.commit("setfusion_configuration", res?.config); value.value = [] value_point.value = [] @@ -642,7 +643,7 @@ export default defineComponent({ */ const details_selsect=(details:any) => { let spt=details.deltaY/100 - if(spt<0){ + if(spt>0){ if(options_model.value>=value_point.value.length-1){ options_model.value=0 }else{ diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 815d705..1920cb5 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -71,7 +71,7 @@ ]" />
- +
@@ -203,6 +203,7 @@ import { computed, onMounted, onBeforeMount, +provide, } from "vue"; import { useStore } from "src/store"; import { useQuasar, copyToClipboard } from "quasar"; @@ -422,6 +423,7 @@ export default defineComponent({ case 'FourPointCalibration': tmp = '4' set?.SetBlendingOption("blending_grids_control_point_count", `4`) + set?.SetBlendingOption("blending_grids_select_point", `4:1`) break; case 'SurfaceCorrection': tmp = '9' @@ -515,12 +517,7 @@ export default defineComponent({ config.value.col = tmp.col; config.value.row = tmp.row; $store.commit("setfusion_configuration", res?.config); - - if(config.value.col==1&&config.value.row==1){ - optionsstr.value = "FourPointCalibration" - }else{ - optionsstr.value = "FusionLocale"; - } + optionsstr.value = "FourPointCalibration"; allconfig = JSON.parse($store.state.fusion_configuration); if(allconfig.resolution){ for (let index = 0; index < allconfig.resolution.length; index++) { @@ -624,7 +621,9 @@ export default defineComponent({ const currently_selected_projector = (value: string) => { set?.SetBlendingOption('blending_grids_select_projector', value); now_selsect_projector.value=value + } + provide("now_selsect_projector",now_selsect_projector); /** * 设置投影机布局 @@ -703,6 +702,7 @@ export default defineComponent({ } } return { + now_selsect_projector, re_match_data, trigger_dialog, confirm, From 2f645fa71c9c58807b336efbb16031db52942f8d Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 14:08:42 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9B=9B=E7=82=B9?= =?UTF-8?q?=E6=A0=A1=E6=AD=A3=20=E9=99=90=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettings/FourPointCalibration.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 7e2a752..8e14140 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -258,13 +258,13 @@ export default defineComponent({ const chang = (index: number, $event: any, type: string) => { index = Number(index) - if (now_selsect_projector?.value == '0-0') { + if (now_selsect_projector?.value == '0-0'&&props.col=='2') { if (index == 1 || index == 3) { value.value[index].x > allconfig.projector_width ? value.value[index].x =allconfig.projector_width : value.value[index].x } } - if (now_selsect_projector?.value == '0-1') { + if (now_selsect_projector?.value == '0-1'&&props.col=='2') { if (index == 0 || index == 2) { value.value[index].x < 0 ? value.value[index].x= 0 : value.value[index].x } @@ -426,7 +426,6 @@ export default defineComponent({ case 'x': if (spt < 0) { if(now_selsect_projector?.value=='0-0'&&props.col=='2'){ - if(options_model.value==1||options_model.value==3){ value.value[options_model.value].x>allconfig.projector_width?value.value[options_model.value].x = allconfig.projector_width:value.value[options_model.value].x++ }else{ From d71124dfc424343d441c69602316c074e14faa68 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 14:33:10 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=8E=92=E5=88=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettingsDialog.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 1920cb5..a657b47 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -640,6 +640,12 @@ export default defineComponent({ message: 'Loading please wait' }) $store.commit("setfusion_configuration", res?.config); + for (let index = 0; index < projectorlayout.length; index++) { + let arr = projectorlayout[index].label.split('x'); + if(tmpp.col==Number(arr[0])&&tmpp.row==Number(arr[1])){ + now_select_projectorlayout.value=index + } + } let tmp = options.value options.value = "" $store.commit("setSelectedProjector", "0/0"); From efb6f0437ab432c6d6ac794382aa54b4c1a5e2b7 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 15:06:37 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 13 +++++++------ .../FusionSettings/FourPointCalibration.vue | 6 +++--- src/components/FusionSettings/FusionLocale.vue | 4 ++-- .../FusionSettings/SurfaceCorrection.vue | 15 ++++++++++----- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index 7f98319..1b223d6 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -222,7 +222,7 @@ export default defineComponent({ let $store = useStore(); let $t = useI18n(); const ste_status = ref(0); - let config = JSON.parse($store.state.fusion_configuration).projectors[0]; + const configselsect = computed(() => { return $store.state.selected_projector; }); @@ -236,9 +236,10 @@ export default defineComponent({ $store.getters.GetTheCurrentlySelectedCamera[1] ); }); + let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value]; const now_v_h = ref("") - const value_h_point_amount = ref(5) - const value_v_point_amount = ref(5) + const value_h_point_amount = ref(Number(Object.keys(config.multi_hor_density)[0])) + const value_v_point_amount = ref(Number(Object.keys(config.multi_ver_density)[0])) const add_dialog = ref(false) const now_amount = ref(0) @@ -256,9 +257,9 @@ export default defineComponent({ }; const use_server_config = () => { - value_h_point_amount.value = 5 - value_v_point_amount.value = 5 - let a = 5 + value_h_point_amount.value = Number(Object.keys(config.multi_hor_density)[0]) + value_v_point_amount.value = Number(Object.keys(config.multi_ver_density)[0]) + let a = Number(Object.keys(config.multi_hor_density)[0]) value_h.value = [] value_h_point.value = [] for (let index = 0; index < config.multi_hor_density[a].length; index++) { diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 8e14140..eb4a8bc 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -94,12 +94,13 @@ export default defineComponent({ } }, setup(props) { + const now_selsect_projector:any = inject("now_selsect_projector"); let set = GlobalData.getInstance().getCurrentClient(); let $store = useStore(); let $t = useI18n(); const ste_status = ref(0); let allconfig = JSON.parse($store.state.fusion_configuration); - let config = JSON.parse($store.state.fusion_configuration).projectors[0]; + const configselsect = computed(() => { return $store.state.selected_projector; }); @@ -114,7 +115,7 @@ export default defineComponent({ $store.getters.GetTheCurrentlySelectedCamera[1] ); }); - + let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value]; const value_point_amount = ref(5) @@ -462,7 +463,6 @@ export default defineComponent({ defineExpose({ options_model, }); - const now_selsect_projector:any = inject("now_selsect_projector"); return { now_selsect_projector, details_selsect, diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index 7bbb5d4..0300021 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -259,7 +259,7 @@ export default defineComponent({ set_cache.value[selectedprojector.value] = JSON.stringify(array); }; - let config = JSON.parse($store.state.fusion_configuration).projectors[0]; + let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value]; const configselsect = computed(() => { return $store.state.selected_projector; }); @@ -391,7 +391,7 @@ export default defineComponent({ onMounted(() => { set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); - config = tmp.projectors[0]; + config = tmp.projectors[selectedprojector.value]; ste_status.value = 1; startconfig(); setTimeout(() => { diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 595c3ba..161ad4c 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -26,7 +26,7 @@
-
@@ -150,7 +150,7 @@ export default defineComponent({ let $t = useI18n(); const ste_status = ref(0); let allconfig = JSON.parse($store.state.fusion_configuration); - let config = JSON.parse($store.state.fusion_configuration).projectors[0]; + const configselsect = computed(() => { return $store.state.selected_projector; }); @@ -163,7 +163,7 @@ export default defineComponent({ $store.getters.GetTheCurrentlySelectedCamera[1] ); }); - + let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value]; const value_point_amount = ref(9) const del_dialog = ref(false) const add_dialog = ref(false) @@ -360,6 +360,7 @@ export default defineComponent({ } value_point.value.push(tmp_point) } + save_set_cache() } @@ -375,6 +376,8 @@ export default defineComponent({ start() use_server_config() + options_value_point_amount.value = Object.keys(config.multi_curved_surface) + start_point(Number(options_value_point_amount.value[0])) if ( sessionStorage.SurfaceCorrection && sessionStorage.SurfaceCorrection.length > 0 @@ -382,8 +385,6 @@ export default defineComponent({ set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection); use_set_cache(); } - options_value_point_amount.value = Object.keys(config.multi_curved_surface) - start_point(Number(options_value_point_amount.value[0])) window.onresize = () => { return (() => { if (div != null) { @@ -507,6 +508,7 @@ export default defineComponent({ value_point.value.push(tmp_point) } }); + save_set_cache() } const del_control_points = (amount: number) => { let tmp = amount @@ -559,6 +561,7 @@ export default defineComponent({ } }); + save_set_cache() } const add = () => { let tmpconfig: any = null @@ -606,6 +609,7 @@ export default defineComponent({ } }); set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`) + save_set_cache() } const preview = (val: number) => { val = Number(val) @@ -635,6 +639,7 @@ export default defineComponent({ now_amount.value = val ** 2 value_point_amount.value = val ** 2 options_model.value = 1 + save_set_cache() } /** From 5ce15fcb80fdfeb97a2cb346937404c2230a37d4 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 15:33:14 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=8A=95=E5=BD=B1=E6=9C=BA=E5=B8=83=E5=B1=80=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettingsDialog.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index a657b47..e26acd3 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -693,7 +693,7 @@ export default defineComponent({ dialog_data.fun(dialog_data.parameter) } const re_match_data=()=>{ - let tmp=allconfig + let tmp = JSON.parse($store.state.fusion_configuration); for (let index = 0; index < options_resolution.value.length; index++) { let arr = options_resolution.value[index].label.split('*'); if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){ @@ -702,12 +702,14 @@ export default defineComponent({ } for (let index = 0; index < projectorlayout.length; index++) { let arr = projectorlayout[index].label.split('x'); + if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){ now_select_projectorlayout.value=index } } } return { + allconfig, now_selsect_projector, re_match_data, trigger_dialog, From 5998be5c1cfd6da0cb5f0a228b7abb54ffc770d6 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 16:04:13 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=8A=95=E5=BD=B1?= =?UTF-8?q?=E6=9C=BA=E4=B8=8B=E5=8F=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettings/FourPointCalibration.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index eb4a8bc..a70a2dc 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -333,6 +333,9 @@ export default defineComponent({ onMounted(() => { Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w) Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h) + set?.GetBlendingConfig("").then((res) => { + allconfig=JSON.parse(res?.config??"") + }) start_point() start() use_server_config() From 4738681294689ed7a0b609f951d12a919057ffb2 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 24 Feb 2023 16:47:46 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9ui=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 4 +-- .../FusionSettings/SurfaceCorrection.vue | 4 +-- src/components/FusionSettingsDialog.vue | 27 ++++++++++++------- src/i18n/en-US/index.ts | 4 ++- src/i18n/zh-CN/index.ts | 4 ++- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index 1b223d6..72712db 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -120,7 +120,7 @@ - +
{{ $t('confirm delete') }}
@@ -149,7 +149,7 @@
--> - +
{{ $t('Whether to add control points') }}
diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 161ad4c..5edf7f7 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -61,7 +61,7 @@
- +
{{ $t('confirm delete') }}
@@ -78,7 +78,7 @@ - +
{{ $t('Whether to add control points') }}
diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index e26acd3..e8d614a 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -50,10 +50,10 @@
@@ -93,7 +93,7 @@ + @click="$store.commit('setSelectedProjector', '0/0');clear()" /> @@ -167,12 +167,12 @@ - +
{{ $t('Do you confirm the modification') }}
- {{ $t('Do you confirm the modification') }} + {{ dialog_data.type=='resolution'?$t('Whether to modify the resolution to') + options_resolution[dialog_data.parameter].label:$t('Whether to change the projector layout to') + projectorlayout[dialog_data.parameter].label }} @@ -480,6 +480,7 @@ export default defineComponent({ } else { optionsstr.value = "FourPointCalibration"; } + now_selsect_projector.value="0-0" }; /** @@ -623,8 +624,10 @@ export default defineComponent({ now_selsect_projector.value=value } + /** + * 依赖注入 + */ provide("now_selsect_projector",now_selsect_projector); - /** * 设置投影机布局 */ @@ -684,13 +687,18 @@ export default defineComponent({ * 浅拷贝 */ const confirm=ref(false) - let dialog_data:any=null - const dialog=(parameter:any,fun:any)=>{ + let dialog_data:any={parameter:"",fun:"",type:""} + const dialog=(parameter:any,fun:any,type:string)=>{ confirm.value=true - dialog_data={parameter,fun} + dialog_data.parameter=parameter + dialog_data.fun=fun + dialog_data.type=type + console.log("🚀 ~ file: FusionSettingsDialog.vue:696 ~ dialog ~ type:", type) + //dialog_data={parameter,fun,type} } const trigger_dialog=()=>{ dialog_data.fun(dialog_data.parameter) + console.log(dialog_data.fun) } const re_match_data=()=>{ let tmp = JSON.parse($store.state.fusion_configuration); @@ -709,6 +717,7 @@ export default defineComponent({ } } return { + dialog_data, allconfig, now_selsect_projector, re_match_data, diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 4941719..46e9989 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -500,5 +500,7 @@ export default { "Please enter the square number": "Please enter the square number", "Change projector layout": "Change projector layout", "reset all":"reset all", - "Do you confirm the modification":"Do you confirm the modification" + "Do you confirm the modification":"Do you confirm the modification", + "Whether to modify the resolution to":"Whether to modify the resolution to", + "Whether to change the projector layout to":"Whether to change the projector layout to" }; diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index 634f544..3a77806 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -767,5 +767,7 @@ export default { "Please enter the square number":"请输入平方数", "Change projector layout":"更改投影机布局", "reset all":"重置所有", - "Do you confirm the modification":"是否确认修改" + "Do you confirm the modification":"是否确认修改", + "Whether to modify the resolution to":"是否将分辨率修改到", + "Whether to change the projector layout to":"是否更改投影机布局为" };