From b3cc026b414ae0552b941743880db347bae8fcda Mon Sep 17 00:00:00 2001 From: shefengchun <1077478963@qq.com> Date: Fri, 10 Feb 2023 09:55:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=AE=E7=9B=98=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E5=AF=BC=E8=87=B4=E7=9A=84=E8=BE=93=E5=85=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FusionSettings/FourPointCalibration.vue | 68 ++++++++++--------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue index d8e9868..e7ae201 100644 --- a/src/components/FusionSettings/FourPointCalibration.vue +++ b/src/components/FusionSettings/FourPointCalibration.vue @@ -5,7 +5,7 @@ @focus="isactivearray[0] = false" v-model="four[0].x" label="x" lazy-rules /> -
@@ -14,7 +14,7 @@ label="x" lazy-rules /> - @@ -25,22 +25,22 @@ -
1
+
1
-
2
+
2
-
3
+
3
-
4
+
4
@@ -52,15 +52,15 @@ label="x" lazy-rules /> -
- + { document.onkeydown = (e) => { - + let lock = 0 let e1 = e || window.event || arguments.callee.caller.arguments[0] switch (e.code) { case "KeyW": @@ -220,15 +220,19 @@ export default defineComponent({ points[now_index.value].y break; default: + lock = 1 break; } - let tmp = { left: points[now_index.value].x, top: points[now_index.value].y } - eval(`moveHandler_${now_index.value+1}(tmp)`); - isactivearray.value[now_index.value] = false; - isshowarray.value[now_index.value] = false; - setTimeout(() => { - isshowarray.value[now_index.value] = true; - }, 100); + if (lock == 0) { + let tmp = { left: points[now_index.value].x, top: points[now_index.value].y } + eval(`moveHandler_${now_index.value + 1}(tmp)`); + isactivearray.value[now_index.value] = false; + isshowarray.value[now_index.value] = false; + setTimeout(() => { + isshowarray.value[now_index.value] = true; + }, 100); + } + } } onMounted(() => { @@ -316,6 +320,7 @@ export default defineComponent({ let y = Math.ceil((config.height - newVal.y) / Proportion.value.y); points[0].x = x; points[0].y = y; + console.log(points[0]) isshowarray.value[0] = false; isactivearray.value[0] = false; setTimeout(() => { @@ -442,7 +447,7 @@ export default defineComponent({ { deep: true } ); watch(() => now_index, (newval, oldval) => { - if(ste_status.value == 1)return + if (ste_status.value == 1) return set?.SetBlendingOption("blending_grids_select_point", `4:${now_index.value + 1}`) }, { deep: true }) //为了加载 缓存的配置时 同步点的位置 @@ -484,25 +489,24 @@ export default defineComponent({ }, 100); }; const reset = (index: number, send: boolean) => { - send = send?? true; - isactivearray.value[index] = false; + send = send ?? true; + isactivearray.value[index] = false; fourpostion.value[index].x = defaultfourpostion.value[index].x; fourpostion.value[index].y = defaultfourpostion.value[index].y; four[index].x = config.point4[index].def_x; four[index].y = config.point4[index].def_y; - if (send) - { - set?.setBlendingCorrection( - $store.getters.GetTheCurrentlySelectedCamera[0], - $store.getters.GetTheCurrentlySelectedCamera[1], - 4, - index + 1, - Number(config.point4[index].def_x), - Number(config.point4[index].def_y) - ); - } + if (send) { + set?.setBlendingCorrection( + $store.getters.GetTheCurrentlySelectedCamera[0], + $store.getters.GetTheCurrentlySelectedCamera[1], + 4, + index + 1, + Number(config.point4[index].def_x), + Number(config.point4[index].def_y) + ); + } isshowarray.value[index] = false; setTimeout(() => { @@ -514,7 +518,7 @@ export default defineComponent({ for (let index = 0; index < fourpostion.value.length; index++) { reset(index, false); } - set?.setBlendingCorrection( + set?.setBlendingCorrection( $store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 0, 0, 0