From 584f228c91895918644b71022cf9664c7df8a27b Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 6 Jan 2023 12:14:17 +0800 Subject: [PATCH 01/78] =?UTF-8?q?=E6=9B=B4=E6=94=B9=20=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/FourPointCalibration.vue | 85 ++++++++----- .../FusionSettings/FusionLocale.vue | 38 +++--- .../FusionSettings/SurfaceCorrection.vue | 114 ++++++++++-------- src/components/FusionSettingsDialog.vue | 55 +++------ src/pages/TopToolBar.vue | 14 ++- src/store/index.ts | 16 +-- 6 files changed, 179 insertions(+), 143 deletions(-) diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 80f355e..1ab3fe4 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -70,6 +70,7 @@ import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; import ClientConnection from "src/common/ClientConnection" import GlobalData from "src/common/GlobalData"; +import { json } from "body-parser"; export default defineComponent({ name: "ComponentFourPointCalibration", @@ -82,14 +83,15 @@ export default defineComponent({ const setIndexProjector = () => { console.log($store.state.selected_projector); }; + let config=JSON.parse($store.state.fusion_configuration).projectors[0]; let set = GlobalData.getInstance().getCurrentClient(); - const for_1 = computed(() => { }) - let four = ref([{ x: 0, y: 1080 }, { x: 1920, y: 1080 }, { x: 0, y: 0 }, { x: 1920, y: 0 }]); + const configselsect = computed(() => {return $store.state.selected_projector}) + let four = ref([{ x: config.point4[0].x, y: config.point4[0].y }, { x: config.point4[1].x, y: config.point4[1].y }, { x: config.point4[2].x, y: config.point4[2].x }, { x: config.point4[3].x, y: config.point4[3].y }]); let defaultfour = ref([{ x: 0, y: 1080 }, { x: 1920, y: 1080 }, { x: 0, y: 0 }, { x: 1920, y: 0 }]); let defaultfourpostion: any = ref([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }]); let fourpostion: any = ref([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }]); let div: any = ref(null); - let div2: any = ref(null); + // let div2: any = ref(null); let options = ref(['10', '20', '30', '40', '50']); let Proportion = ref({ x: 0, y: 0 }); let point1 = reactive({ x: 0, y: 0 }); @@ -103,7 +105,7 @@ export default defineComponent({ const { offset } = dom const save=()=>{ - + set?.SaveBlendingConfig("") } const activeMouseDown = (index: number) => { @@ -118,6 +120,7 @@ export default defineComponent({ }) const setpoa = () => { + console.log(config); point1.x = 0 point1.y = 0 @@ -145,22 +148,22 @@ export default defineComponent({ fourpostion.value[3].x = div.value.offsetWidth - 25 fourpostion.value[3].y = div.value.offsetHeight - 25 - - Proportion.value.x = 1920 / (div.value.offsetWidth - 25) - Proportion.value.y = 1080 / (div.value.offsetHeight - 25) + + Proportion.value.x = config.width / (div.value.offsetWidth - 25) + Proportion.value.y = config.height / (div.value.offsetHeight - 25) 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=four.value[index].x - defaultfour.value[index].y=four.value[index].y + defaultfour.value[index].x=config.point4[index].def_x + defaultfour.value[index].y=config.point4[index].def_y } } watch(() => four.value[0], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 1, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 1, Number(newVal.x), Number(newVal.y)); /// if (!isactivearray.value[0]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); x1.value = x y1.value = y isshowarray.value[0] = false @@ -172,11 +175,11 @@ export default defineComponent({ } }, { deep: true }) watch(() => four.value[1], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 2, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 2, Number(newVal.x), Number(newVal.y)); /// if (!isactivearray.value[1]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); point2.value.x = x point2.value.y = y isshowarray.value[1] = false @@ -188,11 +191,11 @@ export default defineComponent({ /// }, { deep: true }) watch(() => four.value[2], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 3, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 3, Number(newVal.x), Number(newVal.y)); /// if (!isactivearray.value[2]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil((1080 / Proportion.value.y) - (newVal.y / Proportion.value.y)); + let y = Math.ceil((config.height / Proportion.value.y) - (newVal.y / Proportion.value.y)); point3.value.x = x point3.value.y = y @@ -204,11 +207,11 @@ export default defineComponent({ /// }, { deep: true }) watch(() => four.value[3], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 4, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion)set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 4, Number(newVal.x), Number(newVal.y)); /// if (!isactivearray.value[3]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil((1080 / Proportion.value.y) - (newVal.y / Proportion.value.y)); + let y = Math.ceil((config.height / Proportion.value.y) - (newVal.y / Proportion.value.y)); point4.value.x = x point4.value.y = y @@ -221,9 +224,23 @@ export default defineComponent({ }, { deep: true }) /// + + watch(() => configselsect, (newVal, oldVal) => { + //console.log(newVal); + let tmp=JSON.parse($store.state.fusion_configuration); + let fortmp=null + let i + for(i of tmp.projectors){ + if(i.col===$store.getters.GetTheCurrentlySelectedCamera[0]&&i.row===$store.getters.GetTheCurrentlySelectedCamera[1]){ + fortmp=JSON.parse(JSON.stringify(i)) + } + } + config=JSON.parse(JSON.stringify(fortmp)) + console.log(config) + }, { deep: true }) + const reset = (index: number) => { if (index == 0) { - console.log(x1.value + "," + y1.value) four.value[0].x = 0 four.value[0].y = 1080 point1.x = 0 @@ -249,6 +266,10 @@ export default defineComponent({ fourpostion.value[3].x = div.value.offsetWidth - 25 fourpostion.value[3].y = div.value.offsetHeight - 25 } + // auto set config + four.value[index].x = config.point4[index].def_x + four.value[index].y = config.point4[index].def_y + isshowarray.value[index] = false setTimeout(() => { isshowarray.value[index] = true @@ -260,7 +281,6 @@ export default defineComponent({ for (let index = 0; index < fourpostion.value.length; index++) { fourpostion.value[index].x=defaultfourpostion.value[index].x fourpostion.value[index].y=defaultfourpostion.value[index].y - console.log("ok"); four.value[index].x=defaultfour.value[index].x four.value[index].y=defaultfour.value[index].y @@ -273,38 +293,37 @@ export default defineComponent({ const moveHandler_1 = (data: any) => { let x = Math.ceil((data.left - fourpostion.value[0].x) * Proportion.value.x + 0); - let y = Math.ceil((1080 - data.top * Proportion.value.y - fourpostion.value[0].y)); + let y = Math.ceil((config.height - data.top * Proportion.value.y - fourpostion.value[0].y)); - four.value[0].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - four.value[0].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y; + four.value[0].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + four.value[0].y = y > config.height ? config.height : y && y < 0 ? 0 : y; isactivearray.value[0] = true } const moveHandler_2 = (data: any) => { - //y0 x1920 - let x = Math.ceil((data.left - fourpostion.value[1].x) * Proportion.value.x + 1920); - let y = Math.ceil((1080 - data.top * Proportion.value.y - fourpostion.value[1].y)); - four.value[1].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - four.value[1].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y; + //y0 xconfig.width + let x = Math.ceil((data.left - fourpostion.value[1].x) * Proportion.value.x + config.width); + let y = Math.ceil((config.height - data.top * Proportion.value.y - fourpostion.value[1].y)); + four.value[1].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + four.value[1].y = y > config.height ? config.height : y && y < 0 ? 0 : y; //console.log("x :"+x+" y:"+y) } const moveHandler_3 = (data: any) => { let x = Math.ceil((data.left - fourpostion.value[2].x) * Proportion.value.x); let y = Math.abs(Math.ceil((data.top - fourpostion.value[2].y) * Proportion.value.y)); - four.value[2].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - four.value[2].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y; + four.value[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + four.value[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y; console.log("x :" + x + " y:" + y) //console.log("x :" + data.left + " y:" + (1370-data.top)); } const moveHandler_4 = (data: any) => { - let x = Math.ceil((data.left - fourpostion.value[3].x) * Proportion.value.x + 1920); + let x = Math.ceil((data.left - fourpostion.value[3].x) * Proportion.value.x + config.width); let y = Math.abs(Math.ceil((data.top - fourpostion.value[3].y) * Proportion.value.y)); - four.value[3].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - four.value[3].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y; + four.value[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + four.value[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y; //console.log("x :"+x+" y:"+y) } return { div, - div2, options, fourpostion, reset, diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index 3ff5a22..b3d0e37 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -208,7 +208,7 @@ export default defineComponent({ const age = ref(0); const standard = ref(0); const group = ref(4); - const EnableBlending=ref(false); + const enablefusion=ref(false); let array: any = ref([ { alpha: 0, p: 0, gamma: 0 }, { alpha: 0, p: 0, gamma: 0 }, @@ -260,7 +260,7 @@ export default defineComponent({ }); const chang = (type: string) => { if (type == "alpha") { - if($store.state.EnableBlending)set?.setBlendingAlphaParam( + if($store.state.enablefusion)set?.setBlendingAlphaParam( $store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], group.value, @@ -268,15 +268,15 @@ export default defineComponent({ ); } if (type == "p") { - if($store.state.EnableBlending)set?.setBlendingPowerParam( + if($store.state.enablefusion)set?.setBlendingPowerParam( $store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], group.value, array.value[group.value].p ); } - if($store.state.EnableBlending)if (type == "gamma") { - set?.setBlendingGammaParam( + if (type == "gamma") { + if($store.state.enablefusion)set?.setBlendingGammaParam( $store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], group.value, @@ -289,7 +289,7 @@ export default defineComponent({ watch( () => array2[0][0], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],1,array2[0][0].isshow,Number(array2[0][0].value)); + if($store.state.enablefusion)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],1,array2[0][0].isshow,Number(array2[0][0].value)); if(!array2[0][0].isshow){ array2[0][0].value=0 } @@ -299,7 +299,7 @@ export default defineComponent({ watch( () => array2[0][1], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],0,array2[0][1].isshow,Number(array2[0][1].value)); + if($store.state.enablefusion)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],0,array2[0][1].isshow,Number(array2[0][1].value)); if(!array2[0][1].isshow){ array2[0][1].value=0 } @@ -309,7 +309,7 @@ export default defineComponent({ watch( () => array2[0][2], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],2,array2[0][2].isshow,Number(array2[0][2].value)); + if($store.state.enablefusion)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],2,array2[0][2].isshow,Number(array2[0][2].value)); if(!array2[0][2].isshow){ array2[0][2].value=0 } @@ -319,7 +319,7 @@ export default defineComponent({ watch( () => array2[0][3], (newVal, oldVal) => { - if($store.state.EnableBlending)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],3,array2[0][3].isshow,Number(array2[0][3].value)); + if($store.state.enablefusion)set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],3,array2[0][3].isshow,Number(array2[0][3].value)); if(!array2[0][3].isshow){ array2[0][3].value=0 } @@ -332,7 +332,7 @@ export default defineComponent({ watch( () => array2[1][0], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],1,array2[1][0].isshow,Number(array2[1][0].value)); + if($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],1,array2[1][0].isshow,Number(array2[1][0].value)); if(!array2[1][0].isshow){ array2[1][0].value=0 } @@ -342,7 +342,7 @@ watch( watch( () => array2[1][1], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],0,array2[1][1].isshow,Number(array2[1][2].value)); + if($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],0,array2[1][1].isshow,Number(array2[1][1].value)); if(!array2[1][1].isshow){ array2[1][1].value=0 } @@ -352,7 +352,7 @@ watch( watch( () => array2[1][2], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],2,array2[1][2].isshow,Number(array2[1][2].value)); + if($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],2,array2[1][2].isshow,Number(array2[1][2].value)); if(!array2[1][2].isshow){ array2[1][2].value=0 } @@ -362,7 +362,7 @@ watch( watch( () => array2[1][3], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],3,array2[1][3].isshow,Number(array2[1][3].value)); + if($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1],3,array2[1][3].isshow,Number(array2[1][3].value)); if(!array2[1][3].isshow){ array2[1][3].value=0 } @@ -372,14 +372,14 @@ watch( /// watch( - () => EnableBlending, + () => enablefusion, (newVal, oldVal) => { - $store.commit('setEnableBlending',newVal.value); + $store.commit('setenablefusion',newVal.value); set?.EnableBlending(newVal.value); },{ deep: true } ); - const changEnableBlending=()=>{ - $store.commit('setEnableBlending',EnableBlending.value); + const changenablefusion=()=>{ + $store.commit('setenablefusion',enablefusion.value); } return { model, @@ -391,9 +391,9 @@ watch( text, array, chang, - EnableBlending, + enablefusion, array2, - changEnableBlending, + changenablefusion, selectedprojector }; }, diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index a7b86a1..c433680 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -162,6 +162,8 @@ export default defineComponent({ const setIndexProjector = () => { console.log($store.state.selected_projector); }; + let config=JSON.parse($store.state.fusion_configuration).projectors[0]; + const configselsect = computed(() => {return $store.state.selected_projector}) let Proportion = ref({ x: 0, y: 0 }); let centor = ref({ x: 0, y: 0 }); const div = ref(); @@ -177,67 +179,80 @@ export default defineComponent({ let defaultninepostion: any = ref([{ x: 0, y: 1920 }, { x: 960, y: 1920 }, { x: 1080, y: 1920 }, { x: 0, y: 540 }, { x: 960, y: 540 }, { x: 1080, y: 540 }, { x: 0, y: 0 }, { x: 540, y: 0 }, { x: 1080, y: 0 }]); const moveHandler_1 = (data: any) => { let x = Math.ceil((data.left - ninepostion.value[0].x) * Proportion.value.x); - let y = 1080 - Math.ceil((data.top - ninepostion.value[0].y) * Proportion.value.y); + let y = config.height - Math.ceil((data.top - ninepostion.value[0].y) * Proportion.value.y); - nine.value[0].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[0].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[0].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[0].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_2 = (data: any) => { let x = 960 + Math.ceil((data.left - ninepostion.value[1].x) * centor.value.x); - let y = 1080 - Math.ceil((data.top - ninepostion.value[1].y) * Proportion.value.y); + let y = config.height - Math.ceil((data.top - ninepostion.value[1].y) * Proportion.value.y); - nine.value[1].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[1].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[1].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[1].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_3 = (data: any) => { - let x = 1920 + Math.ceil((data.left - ninepostion.value[2].x) * Proportion.value.x); - let y = 1080 - Math.ceil((data.top - ninepostion.value[2].y) * Proportion.value.y); + let x = config.width + Math.ceil((data.left - ninepostion.value[2].x) * Proportion.value.x); + let y = config.height - Math.ceil((data.top - ninepostion.value[2].y) * Proportion.value.y); - nine.value[2].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[2].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_4 = (data: any) => { let x = Math.ceil((data.left - ninepostion.value[3].x) * Proportion.value.x); let y = 530 - Math.ceil((data.top - ninepostion.value[3].y) * Proportion.value.y); - nine.value[3].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[3].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_5 = (data: any) => { let x = 960 + Math.ceil((data.left - ninepostion.value[4].x) * centor.value.x); let y = 530 - Math.ceil((data.top - ninepostion.value[4].y) * Proportion.value.y); - nine.value[4].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[4].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[4].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[4].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_6 = (data: any) => { - let x = 1920 + Math.ceil((data.left - ninepostion.value[5].x) * Proportion.value.x); + let x = config.width + Math.ceil((data.left - ninepostion.value[5].x) * Proportion.value.x); let y = 530 - Math.ceil((data.top - ninepostion.value[5].y) * Proportion.value.y); - nine.value[5].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[5].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[5].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[5].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_7 = (data: any) => { let x = Math.ceil((data.left - ninepostion.value[6].x) * Proportion.value.x); let y = Math.abs(Math.ceil((data.top - ninepostion.value[6].y) * Proportion.value.y)); - nine.value[6].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[6].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[6].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[6].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_8 = (data: any) => { let x = 960 + Math.ceil((data.left - ninepostion.value[7].x) * Proportion.value.x); let y = Math.abs(Math.ceil((data.top - ninepostion.value[7].y) * Proportion.value.y));; - nine.value[7].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[7].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[7].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[7].y = y > config.height ? config.height : y && y < 0 ? 0 : y } const moveHandler_9 = (data: any) => { - let x = 1920 + Math.ceil((data.left - ninepostion.value[8].x) * Proportion.value.x); + let x = config.width + Math.ceil((data.left - ninepostion.value[8].x) * Proportion.value.x); let y = Math.abs(Math.ceil((data.top - ninepostion.value[8].y) * Proportion.value.y)); - nine.value[8].x = x > 1920 ? 1920 : x && x < 0 ? 0 : x; - nine.value[8].y = y > 1080 ? 1080 : y && y < 0 ? 0 : y + nine.value[8].x = x > config.width ? config.width : x && x < 0 ? 0 : x; + nine.value[8].y = y > config.height ? config.height : y && y < 0 ? 0 : y } + watch(() => configselsect, (newVal, oldVal) => { + //console.log(newVal); + let tmp=JSON.parse($store.state.fusion_configuration); + let fortmp=null + let i + for(i of tmp.projectors){ + if(i.col===$store.getters.GetTheCurrentlySelectedCamera[1]&&i.row===$store.getters.GetTheCurrentlySelectedCamera[0]){ + fortmp=JSON.parse(JSON.stringify(i)) + } + } + config=JSON.parse(JSON.stringify(fortmp)) + console.log(config) + }, { deep: true }) onMounted(() => { startpostion(); @@ -270,11 +285,11 @@ export default defineComponent({ ninepostion.value[8].x = div.value.offsetWidth - 25 ninepostion.value[8].y = div.value.offsetHeight - 25 - Proportion.value.x = 1920 / (div.value.offsetWidth - 25) - Proportion.value.y = 1080 / (div.value.offsetHeight - 25) + Proportion.value.x = config.width / (div.value.offsetWidth - 25) + Proportion.value.y = config.height / (div.value.offsetHeight - 25) - centor.value.x = 2160 / (div.value.offsetWidth + 25) - centor.value.y = 3840 / (div.value.offsetHeight + 25) + centor.value.x = config.width *2 / (div.value.offsetWidth + 25) + centor.value.y = config.height*2 / (div.value.offsetHeight + 25) for (let index = 0; index < defaultninepostion.value.length; index++) { defaultninepostion.value[index].x = ninepostion.value[index].x; @@ -344,6 +359,9 @@ export default defineComponent({ ninepostion.value[8].x = div.value.offsetWidth - 25 ninepostion.value[8].y = div.value.offsetHeight - 25 } + //data is flase + // nine.value[index].x = config.point9[index].def_x + // nine.value[index].y = config.point9[index].def_y isshowarray.value[index] = false setTimeout(() => { isshowarray.value[index] = true @@ -366,78 +384,78 @@ export default defineComponent({ } /// watch(() => nine.value[0], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 1, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 1, Number(newVal.x), Number(newVal.y)); /// if (!isactivearray.value[0]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(0, x, y) } /// }, { deep: true }) watch(() => nine.value[1], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 2, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 2, Number(newVal.x), Number(newVal.y)); /// if (!isactivearray.value[1]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(1, x, y) } /// }, { deep: true }) watch(() => nine.value[2], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 3, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 3, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[2]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(2, x, y) } }, { deep: true }) watch(() => nine.value[3], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 4, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 4, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[3]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(3, x, y) } }, { deep: true }) watch(() => nine.value[4], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 5, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 5, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[4]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(4, x, y) } }, { deep: true }) watch(() => nine.value[5], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 6, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 6, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[5]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(5, x, y) } }, { deep: true }) watch(() => nine.value[6], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 7, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 7, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[6]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(6, x, y) } }, { deep: true }) watch(() => nine.value[7], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 8, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 8, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[7]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(7, x, y) } }, { deep: true }) watch(() => nine.value[8], (newVal, oldVal) => { - if($store.state.EnableBlending) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 9, Number(newVal.x), Number(newVal.y)); + if($store.state.enablefusion) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 9, Number(newVal.x), Number(newVal.y)); if (!isactivearray.value[8]) { let x = Math.ceil(newVal.x / Proportion.value.x); - let y = Math.ceil(((1080 - newVal.y) / Proportion.value.y)); + let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y)); setdianposin(8, x, y) } }, { deep: true }) @@ -457,8 +475,8 @@ export default defineComponent({ } - const save = () => { - + const save=()=>{ + set?.SaveBlendingConfig("") } return { model, diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 4d71de5..b693e5d 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -1,15 +1,11 @@ @@ -76,14 +109,11 @@ export default defineComponent({ let $store = useStore(); let $t = useI18n(); const RowsColumns = reactive([false, false, false, false]); - const hex = ref("") - const isshowhex = ref(false); const index = ref(0); const color = reactive(["#ffffff", "#CCCCCC", "#000", "#000"]); let model = reactive([20, 40]); let options = ref([10, 20, 30, 40, 50]); const submit = () => { - isshowhex.value = false switch (index.value) { case 0: set?.SetBlendingOption("blending_grids_line_color", color[index.value]); @@ -169,10 +199,8 @@ export default defineComponent({ return { model, options, - hex, submit, RowsColumns, - isshowhex, index, color, update_row_col, From fe3d2695a1d844d058abd43185e403b4756b3218 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 09:35:21 +0800 Subject: [PATCH 50/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=E9=87=8D=E6=96=B0=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettingsDialog.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index e187f58..82aa9a9 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -388,9 +388,6 @@ export default defineComponent({ const saveconfig = () => { set?.SaveBlendingConfig(save_cover_name.value); - clear(); - save_cover_name.value = save_name.value = '' - $store.commit("setSelectedProjector", "0/0"); } const isdebug = computed(() => { From 86834823b7658a4d3cb3cff70b6d317d0e5400d1 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 09:55:28 +0800 Subject: [PATCH 51/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettingsDialog.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 82aa9a9..ce064f5 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -309,19 +309,19 @@ export default defineComponent({ if (res == null || res.scenes.length == 0) return plan_list.splice(0, plan_list.length); for (let index = 0; index < res.scenes.length; index++) { - plan_list.push(res.scenes[index]); + plan_list[index]=(res.scenes[index]); } }) } onBeforeMount(() => { - setTimeout(() => { - try { + // setTimeout(() => { + // try { - } catch (error) { - erroe(); - } - }, 1000); + // } catch (error) { + // erroe(); + // } + // }, 1000); }); onMounted(() => { setTimeout(() => { @@ -346,6 +346,7 @@ export default defineComponent({ $store.commit("setfusion_configuration", res?.config); }); + get_scenes() }, 1000); }); const save_cover_name = ref("") From 08c19d630de7b779ca015f16f7774210f231f89c Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 10:37:22 +0800 Subject: [PATCH 52/78] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E6=A0=BC=E8=A1=8C=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettings/FusionLocale.vue | 11 ++++++----- src/components/FusionSettings/GridSettings.vue | 4 ++-- src/i18n/en-US/index.ts | 14 +++++++------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index 1fd4470..c845938 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -18,7 +18,7 @@ (val !== null && val !== '') || $t('Please enter a number'), (val) => - (val > -1 && val < 1080) || $t('Please enter 0-100'), + (val > -1 && val < config.height) || $t('Please enter 0-100'), ]" /> @@ -40,7 +40,7 @@ (val !== null && val !== '') || $t('Please enter a number'), (val) => - (val > -1 && val < 1920) || $t('Please enter 0-100'), + (val > -1 && val < config.width) || $t('Please enter 0-100'), ]" /> @@ -58,7 +58,7 @@ (val !== null && val !== '') || $t('Please enter a number'), (val) => - (val > -1 && val < 1920) || $t('Please enter 0-100'), + (val > -1 && val < config.width) || $t('Please enter 0-100'), ]" />
{{ $t('Whether to operate synchronously') }} - (val > -1 && val < 1080) || $t('Please enter 0-100'), + (val > -1 && val < config.height) || $t('Please enter 0-100'), ]" />
@@ -564,7 +564,8 @@ export default defineComponent({ set_cache, reduce, add, - auto_sync + auto_sync, + config }; }, }); diff --git a/src/components/FusionSettings/GridSettings.vue b/src/components/FusionSettings/GridSettings.vue index 0da8ea9..10c71ad 100644 --- a/src/components/FusionSettings/GridSettings.vue +++ b/src/components/FusionSettings/GridSettings.vue @@ -166,8 +166,8 @@ export default defineComponent({ } const use_server_config = () => { let server_conf = JSON.parse($store.state.fusion_configuration).options - model[0] = server_conf.blending_grids_row ? Number(server_conf.blending_grids_row) : 20; - model[1] = server_conf.blending_grids_column ? Number(server_conf.blending_grids_column) : 40; + model[0] = server_conf.blending_grids_row!=null ? Number(server_conf.blending_grids_row) : 20; + model[1] = server_conf.blending_grids_column!=null ? Number(server_conf.blending_grids_column) : 40; color[0] = server_conf.blending_grids_line_color RowsColumns[0] = server_conf.blending_grids_show_row === "false" ? false : true diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 59a8084..b56efd6 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -404,7 +404,7 @@ export default { "Please input vaild host. example: 192.168.1.1 or 192.168.1.1:8080": "Please Input Vaild Host. Example: 192.168.1.1 or 192.168.1.1:8080", "equipment data": "Equipment Data", - "fusion settings":"fusion settings", + "fusion settings":"Fusion Settings", "FusionLocale":"Fusion Locale", "FourPointCalibration":"Four Pint Calibration", "SurfaceCorrection":"Surface Correction", @@ -412,7 +412,7 @@ export default { "GridSettings":"Grid Settings", "point":"dot", "reset":"reset", - "upper fusion zone parameters":"upper fusion zone parameters", + "upper fusion zone parameters":"Upper Fusion Zone Parameters", "Left fusion Band Parameters":"Left Fusion Band Parameters", "Lower fusion Zone Parameters":"Lower Fusion Zone Parameters", "Right fusion Band Parameters":"Right Fusion Band Parameters", @@ -422,20 +422,20 @@ export default { "Set Fusion Band Parameters":"Set Fusion Band Parameters", "Projector":"Projector", "resetall":"reset all", - "save config":"save config", + "save config":"Save Config", "Whether to enable integration":"Whether to enable integration", "Whether to hide the desktop":"Whether to hide the desktop", "resetall config":"resetall config", "disable blending params":"Dsable blending params", - "show blending grids":"show grids", - "line color":"line color", + "show blending grids":"Show Grids", + "line color":"Line Color", "center line color":"center line color", "center circle color":"center circle color", "Whether to operate synchronously":"Whether to operate synchronously", - "Select saved configuration":"Select saved configuration", + "Select saved configuration":"Select saved Configuration", "read saved configuration":"read saved configuration", "please choose":"please choose", - "save":"save", + "save":"Save", "Whether to save the configuration":"Whether to save the configuration", "New Please enter a name":"New Please enter a name", "Please select an override":"Please select an override", From 13d71b2a6bb897db82b967d01a75e9ee8e6019a1 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 11:12:16 +0800 Subject: [PATCH 53/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=96=8F=E5=AF=86?= =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E7=82=B9=E4=B8=8D=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 17 +++++++++++++++++ src/i18n/en-US/index.ts | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index 6eaea61..90d89f8 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -261,6 +261,20 @@ export default defineComponent({ const ste_status = ref(0); //为了加载 缓存的配置时 同步点的位置 const syncpoint = () => { + let x = 0 + let y = 0 + for (let index = 0; index < 5; index++) { + x = default_location[index].x; + y = Math.ceil((config.height - value[index].y) / Proportion.value.y); + setdianposin(index, x, y); + } + + for (let index = 5; index < 10; index++) { + x = Math.ceil(value[index].x / Proportion.value.x); + y = default_location[5].y; + setdianposin(index, x, y); + } + for (let index = 0; index < value.length; index++) { isactivearray.value[index] = false; } @@ -450,6 +464,7 @@ export default defineComponent({ } }; + onMounted(() => { initialization(); Proportion.value.x = config.width / (div.value.offsetWidth - 40); @@ -470,6 +485,8 @@ export default defineComponent({ Width * (index - 5); } } + use_server_config(); + syncpoint(); }); //窗口变动重新渲染 diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index b56efd6..4fefa64 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -441,7 +441,7 @@ export default { "Please select an override":"Please select an override", "confirm delete":"confirm delete", "delete or not":"delete or not", - "debugging":"debugging", + "debugging":"Debugging", "disable_blending":"disable blending", "disable_clip":"disable clip", "show_mask":"hide desktop", From 17b91ca8eef3393544d828f031e500386659e422 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 13:49:06 +0800 Subject: [PATCH 54/78] =?UTF-8?q?=E5=85=81=E8=AE=B89=E7=82=B9=E6=A0=A1?= =?UTF-8?q?=E6=AD=A37-9=E7=82=B9=E4=B8=BA=E8=B4=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/FusionLocale.vue | 26 +++++++++++++------ .../FusionSettings/SurfaceCorrection.vue | 9 ++++--- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index c845938..67fdb46 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -387,7 +387,7 @@ export default defineComponent({ array[1].isshow, Number(array[1].value) ); - if (auto_sync.value) left_right_auto_add(newVal - oldVal); + if (auto_sync.value) left_right_auto_add(newVal); save_set_cache(); }, { deep: true } @@ -403,7 +403,7 @@ export default defineComponent({ array[2].isshow, Number(array[2].value) ); - if (auto_sync.value) left_right_auto_add(newVal - oldVal); + if (auto_sync.value) left_right_auto_add(newVal); save_set_cache(); }, { deep: true } @@ -451,7 +451,7 @@ export default defineComponent({ array[1].isshow, Number(array[1].value) ); - if (auto_sync.value) left_right_auto_add(0); + if (auto_sync.value) left_right_auto_add(-1); save_set_cache(); }, { deep: true } @@ -467,7 +467,7 @@ export default defineComponent({ array[2].isshow, Number(array[2].value) ); - if (auto_sync.value) left_right_auto_add(0); + if (auto_sync.value) left_right_auto_add(-1); save_set_cache(); }, { deep: true } @@ -527,8 +527,13 @@ export default defineComponent({ set_cache_tmp = tmp } if (ste_status.value == 0) { - set_cache_tmp[1].value = Number(set_cache_tmp[1].value) + difference - set_cache_tmp[1].isshow = array[2].isshow + //set_cache_tmp[1].value = Number(set_cache_tmp[1].value) + difference + + if(difference==-1){ + set_cache_tmp[1].isshow = array[2].isshow + }else{ + set_cache_tmp[1].value = difference + } set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value)); set_cache.value[1] = JSON.stringify(set_cache_tmp); } @@ -546,8 +551,13 @@ export default defineComponent({ set_cache_tmp = tmp } if (ste_status.value == 0) { - set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference - set_cache_tmp[2].isshow = array[1].isshow + //set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference + + if(difference==-1){ + set_cache_tmp[2].isshow = array[1].isshow + }else{ + set_cache_tmp[2].value = difference + } set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value)); set_cache.value[0] = JSON.stringify(set_cache_tmp); } diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 7c4a83a..1037a5d 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -339,8 +339,9 @@ export default defineComponent({ let y = Math.abs( Math.ceil((data.top - ninepostion.value[6].y) * Proportion.value.y) ); + if(data.top>ninepostion.value[6].y)y= Math.ceil((ninepostion.value[6].y-data.top ) * Proportion.value.y) nine[6].x = x > config.width ? config.width : x && x < 0 ? 0 : x; - nine[6].y = y > config.height ? config.height : y && y < 0 ? 0 : y; + nine[6].y = y > config.height ? config.height : y; save_set_cache(); }; const moveHandler_8 = (data: any) => { @@ -350,8 +351,9 @@ export default defineComponent({ let y = Math.abs( Math.ceil((data.top - ninepostion.value[7].y) * Proportion.value.y) ); + if(data.top>ninepostion.value[7].y)y= Math.ceil((ninepostion.value[7].y-data.top ) * Proportion.value.y) nine[7].x = x > config.width ? config.width : x && x < 0 ? 0 : x; - nine[7].y = y > config.height ? config.height : y && y < 0 ? 0 : y; + nine[7].y = y > config.height ? config.height : y ; save_set_cache(); }; const moveHandler_9 = (data: any) => { @@ -361,8 +363,9 @@ export default defineComponent({ let y = Math.abs( Math.ceil((data.top - ninepostion.value[8].y) * Proportion.value.y) ); + if(data.top>ninepostion.value[8].y)y= Math.ceil((ninepostion.value[8].y-data.top ) * Proportion.value.y) nine[8].x = x > config.width ? config.width : x && x < 0 ? 0 : x; - nine[8].y = y > config.height ? config.height : y && y < 0 ? 0 : y; + nine[8].y = y > config.height ? config.height : y ; save_set_cache(); }; From b17435d0dd9de7a2634901e90709801b1b3537aa Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 14:00:18 +0800 Subject: [PATCH 55/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B9=9D=E7=82=B9?= =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E5=88=86=E8=BE=A8=E7=8E=87=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BB=8E=E6=9C=8D=E5=8A=A1=E7=AB=AF=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettings/SurfaceCorrection.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 1037a5d..1c558e1 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -515,8 +515,8 @@ export default defineComponent({ 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; + defaultnine.value[index].x = config.point9[index].def_x; + defaultnine.value[index].y = config.point9[index].def_y; } if (sessionStorage.SurfaceCorrection) { set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection); @@ -532,8 +532,8 @@ export default defineComponent({ 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; + defaultnine.value[index].x = config.point9[index].def_x; + defaultnine.value[index].y = config.point9[index].def_y; nine[index].x = config.point9[index].x; nine[index].y = config.point9[index].y; } From fed77c3e81273bbabf557a9323d4e583294abefe Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 17:21:36 +0800 Subject: [PATCH 56/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=87=E6=8D=A2=E6=97=B6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettings/Debugging.vue | 1 + .../FusionSettings/DebuggingItem.vue | 35 ++++++++++ src/components/FusionSettingsDialog.vue | 68 ++++++++++--------- src/i18n/en-US/index.ts | 3 +- src/i18n/zh-CN/index.ts | 3 +- 5 files changed, 75 insertions(+), 35 deletions(-) diff --git a/src/components/FusionSettings/Debugging.vue b/src/components/FusionSettings/Debugging.vue index ad7014d..b1a0d7f 100644 --- a/src/components/FusionSettings/Debugging.vue +++ b/src/components/FusionSettings/Debugging.vue @@ -50,6 +50,7 @@ export default defineComponent({ DebuggingItem, }, setup() { + let set = GlobalData.getInstance().getCurrentClient(); let $store = useStore(); let $t = useI18n(); diff --git a/src/components/FusionSettings/DebuggingItem.vue b/src/components/FusionSettings/DebuggingItem.vue index 7b65ed5..1e4bdd1 100644 --- a/src/components/FusionSettings/DebuggingItem.vue +++ b/src/components/FusionSettings/DebuggingItem.vue @@ -51,7 +51,42 @@ export default defineComponent({ val.value=props.value=="1"?true:false const send = () => { set?.SetBlendingOption(props.name, val.value ? "1" : "0"); + } + const use_sessionStorage=()=>{ + if(sessionStorage.Debugging){ + let tmp=JSON.parse(sessionStorage.Debugging); + for (let index = 0;index < tmp.length; index++) { + if(Object.keys(tmp[index])[0]==props.name){ + val.value=Object.values(tmp[index])[0]=="1"?true:false + break + } + } + } + } + onMounted(()=>{ + use_sessionStorage() + }) + onBeforeUnmount(() => { + let key=props.name + let value=val.value + if(sessionStorage.Debugging){ + let tmp=JSON.parse(sessionStorage.Debugging); + let count=0; + for (let index = 0;index < tmp.length; index++) { + if(Object.keys(tmp[index])[0]==key){ + tmp[index]={[key]:value} + break + } + count=index + } + if(count==tmp.length-1)tmp.push({[key]:value}); + sessionStorage.Debugging = JSON.stringify(tmp); + }else{ + sessionStorage.Debugging = JSON.stringify([{[key]:value}]); + } + + }); return { send, val, diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index ce064f5..796596b 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -237,8 +237,31 @@ export default defineComponent({ set?.SetBlendingOption(show_blending_grids_id.value, show_blending_grids.value ? "1" : "0"); }; const resetall = () => { - set?.ResetBlendingConfig() + set?.ResetBlendingConfig().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); + }); + let tmp = options.value + options.value = "" + $store.commit("setSelectedProjector", "0/0"); + setTimeout(() => { + clear_sessionStorage() + options.value = tmp + }, 300); } + const clear_sessionStorage=()=>{ + sessionStorage.removeItem("FusionLocale"); + sessionStorage.removeItem("SurfaceCorrection"); + sessionStorage.removeItem("DensityCorrection"); + sessionStorage.removeItem("FourPointCalibration"); + sessionStorage.removeItem("GridSettings"); + sessionStorage.removeItem("Debugging"); + } + const config = ref({ col: 0, row: 0 }); const EnableBlending = ref(false); let optionsstr = ref(); @@ -265,15 +288,6 @@ export default defineComponent({ { deep: true } ); - const erroe = () => { - $q.notify({ - color: "negative", - icon: "warning", - message: "数据获取失败!", - position: "top", - timeout: 1500, - }); - }; const save = () => { medium.value = true //读取场景 @@ -294,11 +308,7 @@ export default defineComponent({ send_show_blending_grids(); $store.commit("setSelectedProjector", "0/0"); setTimeout(() => { - sessionStorage.removeItem("FusionLocale"); - sessionStorage.removeItem("SurfaceCorrection"); - sessionStorage.removeItem("DensityCorrection"); - sessionStorage.removeItem("FourPointCalibration"); - sessionStorage.removeItem("GridSettings"); + clear_sessionStorage() }, 500); options.value="FusionLocale" }; @@ -314,15 +324,6 @@ export default defineComponent({ }) } - onBeforeMount(() => { - // setTimeout(() => { - // try { - - // } catch (error) { - // erroe(); - // } - // }, 1000); - }); onMounted(() => { setTimeout(() => { set?.GetBlendingConfig("").then((res) => { @@ -355,7 +356,7 @@ export default defineComponent({ ] const apply_the_selected_configuration = () => { set?.ApplyBlendingScene(select_configuration_name.value).then((res) => { - let tmp = JSON.parse(res ? res.config : ""); + let tmp = JSON.parse(res ? res.config : "{}"); EnableBlending.value = tmp.enable; $store.commit("setEnablefusion", tmp.enable); config.value.col = tmp.col; @@ -367,13 +368,10 @@ export default defineComponent({ options.value = "" $store.commit("setSelectedProjector", "0/0"); setTimeout(() => { - sessionStorage.removeItem("FusionLocale"); - sessionStorage.removeItem("SurfaceCorrection"); - sessionStorage.removeItem("DensityCorrection"); - sessionStorage.removeItem("FourPointCalibration"); - sessionStorage.removeItem("GridSettings"); + clear_sessionStorage() options.value = tmp }, 800); + getconfig() } const plan_list_op = ref(plan_list) const filterFn = (val: any, update: any, abort: any) => { @@ -392,9 +390,13 @@ export default defineComponent({ } const isdebug = computed(() => { - let tmp = JSON.parse($store.state.fusion_configuration) - let str = 'debug@show_mask' - return tmp.options[str] == '1' || record_times.value > 2 + try { + let tmp = JSON.parse($store.state.fusion_configuration) + return record_times.value > 2 + } catch (error) { + + } + }) const name_to_be_deleted=ref(""); const del_scenes=(name:string)=>{ diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 4fefa64..e9ff0cc 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -445,5 +445,6 @@ export default { "disable_blending":"disable blending", "disable_clip":"disable clip", "show_mask":"hide desktop", - "save_bmp":"save bmp" + "save_bmp":"save bmp", + "disable_blending_params":"disable blending params" }; diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index 49d81a1..eda3390 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -714,5 +714,6 @@ export default { "disable_blending":"禁用混合", "disable_clip":"禁用裁剪", "show_mask":"隐藏桌面", - "save_bmp":"保存BMP" + "save_bmp":"保存BMP", + "disable_blending_params":"禁用融合参数" }; From a9f61b1651338095a6e4115fa2c0cc7e5c5104cd Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 19:01:51 +0800 Subject: [PATCH 57/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=9E=8D=E5=90=88?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=9C=A8=E7=95=8C=E9=9D=A2=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E6=AC=A1=E6=89=93=E5=BC=80=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FusionSettings/FusionLocale.vue | 8 +++++++- src/components/FusionSettingsDialog.vue | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index 67fdb46..b310983 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -141,6 +141,7 @@ import { withDefaults, onBeforeUnmount, reactive, +onMounted, } from "vue"; import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; @@ -190,6 +191,7 @@ export default defineComponent({ default: break; } + chang(type) save_set_cache() } const reduce = (type: string) => { @@ -208,6 +210,8 @@ export default defineComponent({ default: break; } + chang(type) + save_set_cache() } const ste_status = ref(0); const use_set_cache = () => { @@ -355,7 +359,9 @@ export default defineComponent({ array[arr[index]].value = Number(config.params[index].size); } }; - startconfig(); + onMounted(() => { + startconfig(); + }), onBeforeUnmount(() => { sessionStorage.FusionLocale = JSON.stringify(set_cache.value); }); diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 796596b..cf4bfe3 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -310,6 +310,7 @@ export default defineComponent({ setTimeout(() => { clear_sessionStorage() }, 500); + getconfig() options.value="FusionLocale" }; From 93c3a89a6dc2b909a5ddadfdf6eb0f5ff4a2f686 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 3 Feb 2023 20:05:10 +0800 Subject: [PATCH 58/78] =?UTF-8?q?=E5=8A=A0=E5=85=A5=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=8A=95=E5=BD=B1=E6=9C=BA=20=E9=80=89=E6=8B=A9=E8=B0=83?= =?UTF-8?q?=E8=8A=82=E9=A1=B5=E9=9D=A2=20=E9=80=89=E6=8B=A9=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 29 +++-- .../FusionSettings/FourPointCalibration.vue | 1 + .../FusionSettings/FusionLocale.vue | 33 +++-- .../FusionSettings/GridSettings.vue | 2 +- .../FusionSettings/SurfaceCorrection.vue | 1 + src/components/FusionSettingsDialog.vue | 117 +++++++++++------- 6 files changed, 114 insertions(+), 69 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index 90d89f8..295648c 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -5,43 +5,43 @@

V1

V2

V3

V4

V5

←H1→ ←H2→ ←H3→ ←H4→ ←H5→
@@ -693,8 +693,17 @@ export default defineComponent({ } save_set_cache(); }; + const activeMouseDown = (index: number) => { + isactivearray.value[index] = true; + if(index>=5){ + set?.SetBlendingOption("blending_grids_select_point",`density_h:${index-4}`) + }else{ + set?.SetBlendingOption("blending_grids_select_point",`density_v:${index+1}`) + } + }; initialization(); return { + activeMouseDown, model, options, value, diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 8e79fb7..660a574 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -307,6 +307,7 @@ export default defineComponent({ }); const activeMouseDown = (index: number) => { isactivearray.value[index] = true; + set?.SetBlendingOption("blending_grids_select_point",`4:${index+1}`) }; const mouseUpHandler = (index: number) => { isactivearray.value[index] = false; diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue index b310983..4f8d7ce 100644 --- a/src/components/FusionSettings/FusionLocale.vue +++ b/src/components/FusionSettings/FusionLocale.vue @@ -18,7 +18,7 @@ (val !== null && val !== '') || $t('Please enter a number'), (val) => - (val > -1 && val < config.height) || $t('Please enter 0-100'), + (val >= 0 && val < config.height) || $t('Please enter 0-100'), ]" />
@@ -40,7 +40,7 @@ (val !== null && val !== '') || $t('Please enter a number'), (val) => - (val > -1 && val < config.width) || $t('Please enter 0-100'), + (val >= 0 && val < config.width) || $t('Please enter 0-100'), ]" /> @@ -58,7 +58,7 @@ (val !== null && val !== '') || $t('Please enter a number'), (val) => - (val > -1 && val < config.width) || $t('Please enter 0-100'), + (val >= 0 && val < config.width) || $t('Please enter 0-100'), ]" />
{{ $t('Whether to operate synchronously') }} - (val > -1 && val < config.height) || $t('Please enter 0-100'), + (val >= 0 && val < config.height) || $t('Please enter 0-100'), ]" />
@@ -95,26 +95,26 @@

{{ $t("Set Fusion Band Parameters") }}

-
-
+ -
+

alpha

-
-
+ -
+

p

-
-
+ -
+

gamma

@@ -129,6 +129,13 @@ .boder { border: 2px solid #0000; } +.btn_bottom{ + margin-bottom: 0.5rem; +} +.btn_top{ + margin-top: 0.3rem; +} + diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 772f124..88c0f28 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -1,120 +1,97 @@ - diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 71d21ad..60e6750 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -1,222 +1,133 @@ + diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 8d555a8..5e7abdc 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -321,7 +321,7 @@ export default defineComponent({ tmp = '9' break; case 'DensityCorrection': - tmp = 'density' + tmp = 'hor_density' break; default: break; diff --git a/src/entities/DensityCorrection.ts b/src/entities/DensityCorrection.ts new file mode 100644 index 0000000..2b43f5c --- /dev/null +++ b/src/entities/DensityCorrection.ts @@ -0,0 +1,7 @@ +export default class DensityCorrection { + control_point = 0; + x = 0; + y = 0; + def_x = 0; + def_y = 0; +} diff --git a/src/entities/DensityCorrectionPoint.ts b/src/entities/DensityCorrectionPoint.ts new file mode 100644 index 0000000..6c1cf6b --- /dev/null +++ b/src/entities/DensityCorrectionPoint.ts @@ -0,0 +1,7 @@ +export default class DensityCorrectionPoint { + control_point = 0; + x = 0; + y = 0; + def_x = 0; + def_y = 0; +} diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index ef22767..184cc91 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -453,5 +453,13 @@ export default { "line width":"line width", "level":"level", "vertical":"vertical", - "auxiliary lines":"auxiliary lines" + "auxiliary lines":"auxiliary lines", + "level point":"level point amount", + "vertical point ":"vertical point amount", + "point amount":"point amount", + "add control points":"add control points", + "reduce control points":"reduce control points", + "OK to delete you will lose the data you adjusted now":"OK to delete you will lose the data you adjusted now", + "Please enter the points you need to add":"Please enter the points you need to add", + "Whether to add control points":"Whether to add control points" }; diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index 7b55ac1..ffc897e 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -722,5 +722,13 @@ export default { "line width":"线宽", "level":"水平", "vertical":"垂直", - "auxiliary lines":"辅助线" + "auxiliary lines":"辅助线", + "level point":"水平点数量", + "vertical point":"垂直点数量", + "point amount":"点数量", + "add control points":"增加", + "reduce control points":"减少", + "OK to delete you will lose the data you adjusted now":"确定删除你将失去现在调整的数据", + "Please enter the points you need to add":"请输入你所需要添加的点数", + "Whether to add control points":"是否添加控制点" }; From 12a940a55f4f88e51af261422612e98d00f78fe7 Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Wed, 15 Feb 2023 15:08:47 +0800 Subject: [PATCH 78/78] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9A=84=E4=B8=80=E4=BA=9B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/DensityCorrection.vue | 34 ++++++++++++------ .../FusionSettings/FourPointCalibration.vue | 6 +++- .../FusionSettings/GridSettings.vue | 2 +- .../FusionSettings/SurfaceCorrection.vue | 22 ++++++++---- src/components/FusionSettingsDialog.vue | 36 +++++++++++++++++-- src/i18n/en-US/index.ts | 2 +- src/i18n/zh-CN/index.ts | 2 +- 7 files changed, 80 insertions(+), 24 deletions(-) diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue index f61e155..9e61992 100644 --- a/src/components/FusionSettings/DensityCorrection.vue +++ b/src/components/FusionSettings/DensityCorrection.vue @@ -67,7 +67,7 @@
-
@@ -87,7 +87,7 @@
-
@@ -150,7 +150,8 @@ import { computed, watch, nextTick, - onBeforeUnmount + onBeforeUnmount, + defineExpose } from "vue"; import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; @@ -208,6 +209,8 @@ export default defineComponent({ }; const use_server_config = () => { + value_h_point_amount.value = 5 + value_v_point_amount.value = 5 let a = 5 value_h.value = [] value_h_point.value = [] @@ -256,8 +259,8 @@ export default defineComponent({ value_v_point.value = [] deepcopy(value_h.value, tmp.value_h) deepcopy(value_v.value, tmp.value_v) - value_h_point_amount.value = Number(tmp.value_h_point_amount) - value_v_point_amount.value = Number(tmp.value_v_point_amount) + value_h_point_amount.value = tmp.value_h_point_amount + value_v_point_amount.value = tmp.value_v_point_amount deepcopy(value_h_point.value, tmp.value_h_point) deepcopy(value_v_point.value, tmp.value_v_point) recalculate_coordinates() @@ -297,7 +300,7 @@ export default defineComponent({ use_server_config(); use_set_cache(); options_value_h_point_amount.value = Object.keys(config.multi_hor_density) - options_value_v_point_amount.value = Object.keys(config.multi_ver_density) + options_value_v_point_amount.value = Object.keys(config.multi_ver_density) setTimeout(() => { ste_status.value = 0; }, 100); @@ -339,6 +342,7 @@ export default defineComponent({ } else { set?.SetBlendingOption("blending_grids_select_ui", "ver_density") } + save_set_cache() }, { deep: true }) watch(() => value_h_point_amount, (newval, oldval) => { set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`) @@ -347,6 +351,7 @@ export default defineComponent({ } else { set?.SetBlendingOption("blending_grids_select_ui", "ver_density") } + save_set_cache() }, { deep: true }) watch(() => options_model_h, (newval, oldval) => { @@ -368,6 +373,7 @@ export default defineComponent({ const chang_point_amount = (val: number, type: string) => { start_point(val, type) + save_set_cache() } const dragStartHandle = ($event: any, index: number, type: string) => { @@ -570,7 +576,7 @@ export default defineComponent({ let col = $store.getters.GetTheCurrentlySelectedCamera[1] switch (type) { case 'v': - set?.AddBlendingCtrlPoint('ver_density', row, col, amount).then((res) => { + set?.AddBlendingCtrlPoint('ver_density', row, col, Number(amount)).then((res) => { if (res == null || typeof (res) == "undefined") return update(res?.config) let tmp = JSON.parse(res?.config); @@ -615,7 +621,7 @@ export default defineComponent({ }); break; case 'h': - set?.AddBlendingCtrlPoint('hor_density', row, col, amount).then((res) => { + set?.AddBlendingCtrlPoint('hor_density', row, col, Number(amount)).then((res) => { if (res == null || typeof (res) == "undefined") return update(res?.config) let tmp = JSON.parse(res?.config); @@ -700,7 +706,7 @@ export default defineComponent({ let col = $store.getters.GetTheCurrentlySelectedCamera[1] switch (type) { case 'v': - set?.DelBlendingCtrlPoint('ver_density', row, col, amount).then((res) => { + set?.DelBlendingCtrlPoint('ver_density', row, col, Number(amount)).then((res) => { if (res == null || typeof (res) == "undefined") return let tmp = JSON.parse(res?.config); let fortmp = null; @@ -747,7 +753,7 @@ export default defineComponent({ }); break; case 'h': - set?.DelBlendingCtrlPoint('hor_density', row, col, amount).then((res) => { + set?.DelBlendingCtrlPoint('hor_density', row, col, Number(amount)).then((res) => { if (res == null || typeof (res) == "undefined") return let tmp = JSON.parse(res?.config); let fortmp = null; @@ -830,6 +836,11 @@ export default defineComponent({ let tmp = now_v_h.value == "vertical" ? "v" : "h" add_control_points(Number(now_amount.value), tmp); } + defineExpose({ + now_v_h, + options_model_v, + options_model_h + }); return { resetall, div, @@ -860,7 +871,8 @@ export default defineComponent({ add, del_dialog, add_dialog, - now_amount + now_amount, + set_cache } } }) diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index 88c0f28..265b4e2 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -61,7 +61,8 @@ import { computed, watch, nextTick, - onBeforeUnmount + onBeforeUnmount, + defineExpose } from "vue"; import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; @@ -353,6 +354,9 @@ export default defineComponent({ } } + defineExpose({ + options_model, + }); return { resetall, div, diff --git a/src/components/FusionSettings/GridSettings.vue b/src/components/FusionSettings/GridSettings.vue index 0b18b4d..bc3aa3c 100644 --- a/src/components/FusionSettings/GridSettings.vue +++ b/src/components/FusionSettings/GridSettings.vue @@ -80,7 +80,7 @@
- {{ $t("center line color") }} + {{ $t("center circle color") }} diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue index 60e6750..b044fb4 100644 --- a/src/components/FusionSettings/SurfaceCorrection.vue +++ b/src/components/FusionSettings/SurfaceCorrection.vue @@ -17,7 +17,7 @@
-
+
-
@@ -97,7 +97,8 @@ import { computed, watch, nextTick, - onBeforeUnmount + onBeforeUnmount, + defineExpose } from "vue"; import { useStore } from "src/store"; import { useI18n } from "vue-i18n"; @@ -158,6 +159,7 @@ export default defineComponent({ }; const use_server_config = () => { + value_point_amount.value=9 let a = 9 value.value = [] value_point.value = [] @@ -241,6 +243,7 @@ export default defineComponent({ watch(() => value_point_amount, (newval, oldval) => { set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`) + save_set_cache() }, { deep: true }) /** @@ -423,6 +426,7 @@ export default defineComponent({ } ste_status.value = 1; tmpconfig = JSON.parse(JSON.stringify(fortmp)); + config = JSON.parse(JSON.stringify(fortmp)); options_value_point_amount.value = [] for (let key in tmpconfig.multi_curved_surface) { options_value_point_amount.value.push(key) @@ -449,6 +453,7 @@ export default defineComponent({ }); } const del_control_points = (amount: number) => { + let tmp=amount if (amount <= 9) return let cardinality = Math.sqrt(amount) amount = (cardinality + -1) ** 2 @@ -456,7 +461,7 @@ export default defineComponent({ let row = $store.getters.GetTheCurrentlySelectedCamera[0] let col = $store.getters.GetTheCurrentlySelectedCamera[1] - set?.DelBlendingCtrlPoint('9', row, col, amount).then((res) => { + set?.DelBlendingCtrlPoint('9', row, col, Number(tmp)).then((res) => { if (res == null || typeof (res) == "undefined") return let tmp = JSON.parse(res?.config); let fortmp = null; @@ -471,12 +476,13 @@ export default defineComponent({ } ste_status.value = 1; tmpconfig = JSON.parse(JSON.stringify(fortmp)); + config = JSON.parse(JSON.stringify(fortmp)); options_value_point_amount.value = [] for (let key in tmpconfig.multi_curved_surface) { options_value_point_amount.value.push(key) } - value_point_amount.value = amount - config = tmpconfig + value_point_amount.value = 9 + amount=9 $store.commit("setfusion_configuration", res?.config); value.value = [] value_point.value = [] @@ -494,8 +500,12 @@ export default defineComponent({ } value_point.value.push(tmp_point) } + }); } + defineExpose({ + options_model, + }); return { resetall, div, diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue index 5e7abdc..4f9ea05 100644 --- a/src/components/FusionSettingsDialog.vue +++ b/src/components/FusionSettingsDialog.vue @@ -70,7 +70,7 @@ ]" />
- +
@@ -233,6 +233,7 @@ export default defineComponent({ const send_disable_blending_params = () => { set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0"); }; + const child :any = ref(null); const send_show_blending_grids = () => { let tmp = "" switch (optionsstr.value) { @@ -246,7 +247,12 @@ export default defineComponent({ tmp = '9' break; case 'DensityCorrection': - tmp = 'density' + if(child.value!.now_v_h=='vertical'){ + tmp = 'ver_density' + }else{ + tmp = 'hor_density' + } + break; default: break; @@ -254,6 +260,29 @@ export default defineComponent({ set?.SetBlendingOption("blending_grids_select_ui", tmp) set?.SetBlendingOption('blending_grids_select_projector', now_selsect_projector.value); set?.SetBlendingOption(show_blending_grids_id.value, show_blending_grids.value ? "1" : "0"); + + switch (optionsstr.value) { + case 'FusionLocale': + + break; + case 'FourPointCalibration': + set?.SetBlendingOption("blending_grids_select_point", `4:${child.value!.options_model+1}`) + break; + case 'SurfaceCorrection': + set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`) + break; + case 'DensityCorrection': + console.log(child.value!.now_v_h) + if(child.value!.now_v_h=='vertical'){ + set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_v+1}`) + }else{ + set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_h+1}`) + } + break; + default: + break; + } + }; const resetall = () => { set?.ResetBlendingConfig().then((res) => { @@ -490,7 +519,8 @@ export default defineComponent({ record_times, saveconfig, isdebug, - del_dialog + del_dialog, + child }; }, }); diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 184cc91..6df0ffd 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -458,7 +458,7 @@ export default { "vertical point ":"vertical point amount", "point amount":"point amount", "add control points":"add control points", - "reduce control points":"reduce control points", + "reduce control points":"delete control points", "OK to delete you will lose the data you adjusted now":"OK to delete you will lose the data you adjusted now", "Please enter the points you need to add":"Please enter the points you need to add", "Whether to add control points":"Whether to add control points" diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index ffc897e..028f14a 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -727,7 +727,7 @@ export default { "vertical point":"垂直点数量", "point amount":"点数量", "add control points":"增加", - "reduce control points":"减少", + "reduce control points":"删除", "OK to delete you will lose the data you adjusted now":"确定删除你将失去现在调整的数据", "Please enter the points you need to add":"请输入你所需要添加的点数", "Whether to add control points":"是否添加控制点"