diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index d447fc6..581746f 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -894,13 +894,13 @@ export default defineComponent({ 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(spt<0){ if(options_model_v.value>=value_v_point.value.length-1){ options_model_v.value=0 }else{ @@ -916,7 +916,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{ @@ -939,7 +939,7 @@ export default defineComponent({ let spt = details.deltaY / 100 switch (type) { case 'v': - if (spt > 0) { + if (spt < 0) { value_v.value[options_model_v.value].y++ } else { value_v.value[options_model_v.value].y-- @@ -947,7 +947,7 @@ export default defineComponent({ chang(options_model_v.value,value_v.value[options_model_v.value].y,"v") break; default: - if (spt > 0) { + if (spt < 0) { value_h.value[options_model_h.value].x++ } else { value_h.value[options_model_h.value].x-- diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index a8630de..ff94ea7 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -364,7 +364,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{ @@ -387,14 +387,14 @@ export default defineComponent({ let spt = details.deltaY / 100 switch (type) { case 'x': - if (spt > 0) { + if (spt < 0) { value.value[options_model.value].x++ } else { value.value[options_model.value].x-- } break; default: - if (spt > 0) { + if (spt < 0) { value.value[options_model.value].y++ } else { value.value[options_model.value].y-- diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index e7706ad..e953083 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -637,13 +637,13 @@ export default defineComponent({ options_model.value = 1 } - /** + /** * 滚轮切换 - * @param details + * @param details 鼠标返回对象 */ 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{ @@ -666,14 +666,14 @@ export default defineComponent({ let spt = details.deltaY / 100 switch (type) { case 'x': - if (spt > 0) { + if (spt < 0) { value.value[options_model.value].x++ } else { value.value[options_model.value].x-- } break; default: - if (spt > 0) { + if (spt < 0) { value.value[options_model.value].y++ } else { value.value[options_model.value].y-- diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 3db669a..8d7242b 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -33,15 +33,25 @@

{{ $t("Projector") }}

-
+ + +
- - - +
+ +
{{ $t("Enable projection mode") @@ -57,22 +67,7 @@
+ :options="btn_options" /> @@ -98,7 +93,7 @@
+ @click="select_configuration = true;select_configuration_name=''; get_scenes()" /> @@ -210,6 +205,7 @@ import GridSettings from "src/components/FusionSettings/GridSettings.vue"; import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue"; import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue"; import Debugging from "src/components/FusionSettings/Debugging.vue"; +import { number } from "yargs"; export default defineComponent({ name: "ComponentFusionSettingsDialog", @@ -234,6 +230,7 @@ export default defineComponent({ }; const select_configuration = ref(false) const del_dialog = ref(false) + const config_projectors=ref(null) const select_configuration_name = ref("") const send_disable_blending_params = () => { set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0"); @@ -430,6 +427,7 @@ export default defineComponent({ const save = () => { medium.value = true + save_cover_name.value='' //读取场景 get_scenes() }; @@ -474,6 +472,7 @@ export default defineComponent({ setTimeout(() => { set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); + config_projectors.value=tmp let local_options = [ [disable_blending_params_id, disable_blending_params], [show_blending_grids_id, show_blending_grids] @@ -505,14 +504,17 @@ export default defineComponent({ allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]}; now_resolution.value=0 } + for (let index = 0; index < projectorlayout.length; index++) { + let arr = projectorlayout[index].label.split('x'); + if(tmp.col==Number(arr[0])&&tmp.row==Number(arr[1])){ + now_select_projectorlayout.value=index + } + } }); get_scenes() set?.SetBlendingOption("blending_grids_select_ui", "blending") optionsstr.value = "FusionLocale"; }, 1000); - // setTimeout(() => { - - // }, 1000); }); const save_cover_name = ref("") const plan_list = [ @@ -529,6 +531,19 @@ export default defineComponent({ config.value.col = tmp.col; config.value.row = tmp.row; $store.commit("setfusion_configuration", res?.config); + allconfig = tmp + 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])){ + now_resolution.value=index + } + } + 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 + } + } }); let tmp = options.value @@ -574,6 +589,8 @@ export default defineComponent({ const dialog_del_scenes = () => { set?.DeleteBlendingScene(name_to_be_deleted.value); plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1) + name_to_be_deleted.value='' + select_configuration_name.value='' } const now_selsect_projector=ref("0-0") const currently_selected_projector = (value: string) => { @@ -607,6 +624,31 @@ export default defineComponent({ getconfig() }) } + + const btn_options = computed(() => { + let tmp=[] + if(now_select_projectorlayout.value!=0){ + tmp.push({ label: $t.t('FusionLocale'), value: 'FusionLocale' }) + }else{ + optionsstr.value = "FourPointCalibration"; + } + tmp.push({label: $t.t('FourPointCalibration'), value: 'FourPointCalibration'}) + tmp.push({label: $t.t('SurfaceCorrection'),value: 'SurfaceCorrection',}) + tmp.push({label: $t.t('DensityCorrection'),value: 'DensityCorrection',}) + tmp.push({ label: $t.t('GridSettings'), value: 'GridSettings' }) + return tmp + }) + /** + * 计算可以显示的投影机数量 + */ + const projectors_that_can_display=computed(()=>{ + let allconfig = JSON.parse($store.state.fusion_configuration); + let max = allconfig.max_projector_count + let row = max/allconfig.row|0 + let remain=max%allconfig.row + // config_projectors + return {row,remain} + }) return { currently_selected_projector, name_to_be_deleted, @@ -646,7 +688,9 @@ export default defineComponent({ set_resolution, send_projectorlayout, now_select_projectorlayout, - projectorlayout + projectorlayout, + btn_options, + projectors_that_can_display }; }, });