优化窗口大小更改时逻辑
This commit is contained in:
parent
4d967cb4ae
commit
ff63d3dc67
|
@ -154,12 +154,12 @@ export default defineComponent({
|
|||
setup() {
|
||||
let $store = useStore();
|
||||
let $t = useI18n();
|
||||
const value = reactive([{ x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}, { x: 0, y: 0 ,number:0}]);
|
||||
const value = reactive([{ x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }, { x: 0, y: 0, number: 0 }]);
|
||||
let model = ref(null);
|
||||
const div = ref();
|
||||
const isshowarray = ref([true, true, true, true, true, true, true, true, true, true])
|
||||
const isactivearray = ref([true, true, true, true, true, true, true, true, true, true])
|
||||
const default_location: any = reactive([{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },]);
|
||||
const default_location: any = reactive([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 },]);
|
||||
let options = ref(['10', '20', '30', '40', '50']);
|
||||
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||
let Proportion = ref({ x: 0, y: 0 });
|
||||
|
@ -170,7 +170,7 @@ export default defineComponent({
|
|||
return $store.getters.GetTheCurrentlySelectedCamera[0] * serverconfig.col + $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||
})
|
||||
const set_cache: any = ref([]);
|
||||
const ste_status =ref(0);
|
||||
const ste_status = ref(0);
|
||||
//
|
||||
//为了加载 缓存的配置时 同步点的位置
|
||||
const syncpoint = () => {
|
||||
|
@ -180,7 +180,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
const use_set_cache = () => {
|
||||
if (set_cache.value[selectedprojector.value]!=null) {
|
||||
if (set_cache.value[selectedprojector.value] != null) {
|
||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||
deepcopy(value, tmp)
|
||||
syncpoint()
|
||||
|
@ -211,33 +211,33 @@ export default defineComponent({
|
|||
fortmp = JSON.parse(JSON.stringify(i))
|
||||
}
|
||||
}
|
||||
ste_status.value=1;
|
||||
ste_status.value = 1;
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
use_server_config()
|
||||
use_set_cache()
|
||||
setTimeout(() => {
|
||||
ste_status.value=0;
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
}, { deep: true })
|
||||
const initialization = () => {
|
||||
ste_status.value=1;
|
||||
ste_status.value = 1;
|
||||
for (let index = 0; index < config.hor_density.length; index++) {
|
||||
value[index].x = config.ver_density[index].x
|
||||
value[index].y = config.ver_density[index].y
|
||||
value[index].number = config.ver_density[index].number
|
||||
value[index + 5].x = config.hor_density[index].x
|
||||
value[index + 5].y = config.hor_density[index].y
|
||||
value[index+5].number = config.hor_density[index].number
|
||||
value[index + 5].number = config.hor_density[index].number
|
||||
}
|
||||
if(sessionStorage.DensityCorrection&&sessionStorage.DensityCorrection.length>0){
|
||||
set_cache.value=JSON.parse(sessionStorage.DensityCorrection);
|
||||
if (sessionStorage.DensityCorrection && sessionStorage.DensityCorrection.length > 0) {
|
||||
set_cache.value = JSON.parse(sessionStorage.DensityCorrection);
|
||||
use_set_cache()
|
||||
}else{
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
syncpoint()
|
||||
setTimeout(() => {
|
||||
ste_status.value=0;
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
}
|
||||
|
||||
|
@ -250,11 +250,11 @@ export default defineComponent({
|
|||
if (index >= 5) {
|
||||
value[index].x = config.hor_density[index - 5].def_x
|
||||
value[index].y = config.hor_density[index - 5].def_y
|
||||
set?.SetBlendingVerDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index - 5+1, Number(value[index].x));
|
||||
set?.SetBlendingVerDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index - 5 + 1, Number(value[index].x));
|
||||
} else {
|
||||
value[index].x = config.ver_density[index].def_x
|
||||
value[index].y = config.ver_density[index].def_y
|
||||
set?.SetBlendingHorDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index+1, Number(value[index].y))
|
||||
set?.SetBlendingHorDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index + 1, Number(value[index].y))
|
||||
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ export default defineComponent({
|
|||
isshowarray.value[index] = true
|
||||
}, 100);
|
||||
}
|
||||
const point_postion: any = reactive([{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },{ x: 0, y: 0 },])
|
||||
const point_postion: any = reactive([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 },])
|
||||
let set = GlobalData.getInstance().getCurrentClient();
|
||||
const save = () => {
|
||||
set?.SaveBlendingConfig("")
|
||||
|
@ -293,7 +293,7 @@ export default defineComponent({
|
|||
case 9:
|
||||
x = Math.ceil($event.left * Proportion.value.x);
|
||||
y = config.height / 2 - Math.ceil(($event.top - default_location[index].y) * Proportion.value.y);
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
@ -302,19 +302,19 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}
|
||||
|
||||
const use_server_config=()=>{
|
||||
const use_server_config = () => {
|
||||
for (let index = 0; index < config.hor_density.length; index++) {
|
||||
value[index].x = config.ver_density[index].x
|
||||
value[index].y = config.ver_density[index].y
|
||||
value[index].number = config.ver_density[index].number
|
||||
value[index + 5].x = config.hor_density[index].x
|
||||
value[index + 5].y = config.hor_density[index].y
|
||||
value[index+5].number = config.hor_density[index].number
|
||||
value[index + 5].number = config.hor_density[index].number
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
initialization()
|
||||
Proportion.value.x = config.width / (div.value.offsetWidth - 25)
|
||||
Proportion.value.y = config.height / (div.value.offsetHeight - 25)
|
||||
|
@ -329,9 +329,32 @@ export default defineComponent({
|
|||
point_postion[index].x = default_location[index].x = Width * (index - 5)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
//窗口变动重新渲染
|
||||
onMounted(() => {
|
||||
//监听窗口变化
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
initialization()
|
||||
Proportion.value.x = config.width / (div.value.offsetWidth - 25)
|
||||
Proportion.value.y = config.height / (div.value.offsetHeight - 25)
|
||||
let Width = (div.value.offsetWidth - 25) / 4
|
||||
let Height = (div.value.offsetHeight - 25) / 4
|
||||
for (let index = 0; index < config.hor_density.length + config.ver_density.length; index++) {
|
||||
if (index < 5) {
|
||||
point_postion[index].y = default_location[index].y = Height * index
|
||||
point_postion[index].x = default_location[index].x = Width * 2
|
||||
} else {
|
||||
point_postion[index].y = default_location[index].y = Height * 2
|
||||
point_postion[index].x = default_location[index].x = Width * (index - 5)
|
||||
}
|
||||
}
|
||||
})();
|
||||
};
|
||||
});
|
||||
|
||||
const setdianposin = (index: number, x: number, y: number) => {
|
||||
point_postion[index].x = x
|
||||
point_postion[index].y = y
|
||||
|
@ -343,7 +366,7 @@ export default defineComponent({
|
|||
}
|
||||
//
|
||||
watch(() => value[0], (newVal, oldVal) => {
|
||||
send_configuration(0, newVal.y,newVal.number)
|
||||
send_configuration(0, newVal.y, newVal.number)
|
||||
if (!isactivearray.value[0]) {
|
||||
let x = default_location[0].x;
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -353,7 +376,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[1], (newVal, oldVal) => {
|
||||
send_configuration(1, newVal.y,newVal.number)
|
||||
send_configuration(1, newVal.y, newVal.number)
|
||||
if (!isactivearray.value[1]) {
|
||||
let x = default_location[1].x;
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -364,7 +387,7 @@ export default defineComponent({
|
|||
|
||||
watch(() => value[2], (newVal, oldVal) => {
|
||||
//发送x y 唯一一个
|
||||
send_configuration(2, newVal.y,newVal.number)
|
||||
send_configuration(2, newVal.y, newVal.number)
|
||||
if (!isactivearray.value[2]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -374,7 +397,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[3], (newVal, oldVal) => {
|
||||
send_configuration(3, newVal.y,newVal.number)
|
||||
send_configuration(3, newVal.y, newVal.number)
|
||||
if (!isactivearray.value[3]) {
|
||||
let x = default_location[3].x;
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -384,7 +407,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[4], (newVal, oldVal) => {
|
||||
send_configuration(4, newVal.y,newVal.number)
|
||||
send_configuration(4, newVal.y, newVal.number)
|
||||
if (!isactivearray.value[4]) {
|
||||
let x = default_location[4].x;
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -397,7 +420,7 @@ export default defineComponent({
|
|||
///
|
||||
|
||||
watch(() => value[5], (newVal, oldVal) => {
|
||||
send_configuration(5, newVal.x,newVal.number)
|
||||
send_configuration(5, newVal.x, newVal.number)
|
||||
if (!isactivearray.value[5]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = default_location[5].y
|
||||
|
@ -407,7 +430,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[6], (newVal, oldVal) => {
|
||||
send_configuration(6, newVal.x,newVal.number)
|
||||
send_configuration(6, newVal.x, newVal.number)
|
||||
if (!isactivearray.value[6]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = default_location[6].y
|
||||
|
@ -417,7 +440,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[7], (newVal, oldVal) => {
|
||||
send_configuration(7, newVal.x,newVal.number)
|
||||
send_configuration(7, newVal.x, newVal.number)
|
||||
if (!isactivearray.value[7]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = default_location[7].y
|
||||
|
@ -427,7 +450,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[8], (newVal, oldVal) => {
|
||||
send_configuration(8, newVal.x,newVal.number)
|
||||
send_configuration(8, newVal.x, newVal.number)
|
||||
if (!isactivearray.value[8]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = default_location[8].y
|
||||
|
@ -437,8 +460,7 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
|
||||
watch(() => value[9], (newVal, oldVal) => {
|
||||
//console.log(newVal)
|
||||
send_configuration(9, newVal.x,newVal.number)
|
||||
send_configuration(9, newVal.x, newVal.number)
|
||||
if (!isactivearray.value[9]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = default_location[9].y
|
||||
|
@ -448,14 +470,13 @@ export default defineComponent({
|
|||
}, { deep: true })
|
||||
///
|
||||
|
||||
const send_configuration = (index: number, value: number,number:number) => {
|
||||
|
||||
if(ste_status.value==0){
|
||||
//console.log("Send")
|
||||
if(index < 5){
|
||||
set?.SetBlendingVerDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index+1, Number(value))
|
||||
}else{
|
||||
set?.SetBlendingHorDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index-4, Number(value));
|
||||
const send_configuration = (index: number, value: number, number: number) => {
|
||||
|
||||
if (ste_status.value == 0) {
|
||||
if (index < 5) {
|
||||
set?.SetBlendingVerDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index + 1, Number(value))
|
||||
} else {
|
||||
set?.SetBlendingHorDensity($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], index - 4, Number(value));
|
||||
}
|
||||
}
|
||||
save_set_cache()
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
import vue3ResizeDrag from "src/third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue";
|
||||
import { dom } from 'quasar'
|
||||
|
||||
import { defineComponent, ref, watch, computed, defineProps, withDefaults, onMounted, reactive,onBeforeUnmount } from "vue";
|
||||
import { defineComponent, ref, watch, computed, defineProps, withDefaults, onMounted, reactive, onBeforeUnmount } from "vue";
|
||||
import { useStore } from "src/store";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import ClientConnection from "src/common/ClientConnection"
|
||||
|
@ -105,7 +105,7 @@ export default defineComponent({
|
|||
let points = reactive([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }]);//点的位置
|
||||
const isshowarray = ref([true, true, true, true])
|
||||
const isactivearray = ref([true, true, true, true])
|
||||
const ste_status =ref(0);
|
||||
const ste_status = ref(0);
|
||||
const save = () => {
|
||||
set?.SaveBlendingConfig("")
|
||||
setTimeout(() => {
|
||||
|
@ -114,11 +114,11 @@ export default defineComponent({
|
|||
}
|
||||
///
|
||||
const use_set_cache = () => {
|
||||
if (set_cache.value[selectedprojector.value]!=null) {
|
||||
if (set_cache.value[selectedprojector.value] != null) {
|
||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||
deepcopy(four, tmp)
|
||||
//four=JSON.parse(JSON.stringify(tmp))
|
||||
|
||||
|
||||
}
|
||||
syncpoint()
|
||||
};
|
||||
|
@ -135,8 +135,8 @@ export default defineComponent({
|
|||
const save_set_cache = () => {
|
||||
set_cache.value[selectedprojector.value] = JSON.stringify(four);
|
||||
}
|
||||
onBeforeUnmount(()=>{
|
||||
sessionStorage.FourPointCalibration=JSON.stringify(set_cache.value)
|
||||
onBeforeUnmount(() => {
|
||||
sessionStorage.FourPointCalibration = JSON.stringify(set_cache.value)
|
||||
})
|
||||
///
|
||||
const activeMouseDown = (index: number) => {
|
||||
|
@ -146,15 +146,15 @@ export default defineComponent({
|
|||
isactivearray.value[index] = false
|
||||
}
|
||||
onMounted(() => {
|
||||
ste_status.value=1;
|
||||
ste_status.value = 1;
|
||||
setpoa();
|
||||
|
||||
setTimeout(() => {
|
||||
ste_status.value=0;
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
})
|
||||
|
||||
const use_server_config=()=>{
|
||||
const use_server_config = () => {
|
||||
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;
|
||||
|
@ -166,7 +166,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
const setpoa = () => {
|
||||
|
||||
|
||||
points[0].x = 0
|
||||
points[0].y = 0
|
||||
|
||||
|
@ -203,17 +203,18 @@ export default defineComponent({
|
|||
four[index].x = config.point4[index].x
|
||||
four[index].y = config.point4[index].y
|
||||
}
|
||||
if(sessionStorage.FourPointCalibration&&sessionStorage.FourPointCalibration.length>0){
|
||||
set_cache.value=JSON.parse(sessionStorage.FourPointCalibration);
|
||||
if (sessionStorage.FourPointCalibration && sessionStorage.FourPointCalibration.length > 0) {
|
||||
set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
|
||||
use_set_cache()
|
||||
}else{
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
set_point_x()
|
||||
//syncpoint()
|
||||
|
||||
|
||||
}
|
||||
watch(() => four[0], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 1, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -224,12 +225,12 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
isshowarray.value[0] = true
|
||||
}, 100);
|
||||
|
||||
|
||||
}
|
||||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => four[1], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 2, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -240,12 +241,12 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
isshowarray.value[1] = true
|
||||
}, 100);
|
||||
|
||||
|
||||
}
|
||||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => four[2], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 3, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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((config.height / Proportion.value.y) - (newVal.y / Proportion.value.y));
|
||||
|
@ -256,12 +257,12 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
isshowarray.value[2] = true
|
||||
}, 100);
|
||||
|
||||
|
||||
}
|
||||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => four[3], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 4, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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((config.height / Proportion.value.y) - (newVal.y / Proportion.value.y));
|
||||
|
@ -272,7 +273,7 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
isshowarray.value[3] = true
|
||||
}, 100);
|
||||
|
||||
|
||||
}
|
||||
save_set_cache()
|
||||
}, { deep: true })
|
||||
|
@ -287,23 +288,53 @@ export default defineComponent({
|
|||
fortmp = JSON.parse(JSON.stringify(i))
|
||||
}
|
||||
}
|
||||
ste_status.value=1;
|
||||
ste_status.value = 1;
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
//setpoa();
|
||||
use_server_config()
|
||||
use_set_cache()
|
||||
setTimeout(() => {
|
||||
ste_status.value=0;
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
set_point_x()
|
||||
}, { deep: true })
|
||||
|
||||
//为了加载 缓存的配置时 同步点的位置
|
||||
const syncpoint=()=>{
|
||||
const syncpoint = () => {
|
||||
for (let index = 0; index < fourpostion.value.length; index++) {
|
||||
isactivearray.value[index]=false
|
||||
isactivearray.value[index] = false
|
||||
}
|
||||
}
|
||||
//手动同步 我裂开
|
||||
const set_point_x = () => {
|
||||
//console.log("kaishi jisuan ")
|
||||
let x = Math.ceil(four[0].x/ Proportion.value.x);
|
||||
let y = Math.ceil(((config.height - four[0].y) / Proportion.value.y));
|
||||
set_point(0,x,y);
|
||||
|
||||
x = Math.ceil(four[1].x / Proportion.value.x);
|
||||
y = Math.ceil(((config.height - four[1].y) / Proportion.value.y));
|
||||
set_point(1,x,y);
|
||||
|
||||
x = Math.ceil(four[2].x / Proportion.value.x);
|
||||
y = Math.ceil((config.height / Proportion.value.y) - (four[2].y / Proportion.value.y));
|
||||
set_point(2,x,y);
|
||||
|
||||
x = Math.ceil(four[3].x / Proportion.value.x);
|
||||
y = Math.ceil((config.height / Proportion.value.y) - (four[3].y / Proportion.value.y));
|
||||
set_point(3,x,y);
|
||||
}
|
||||
|
||||
const set_point = (index:number,x:number,y:number) => {
|
||||
|
||||
points[index].x = x
|
||||
points[index].y = y
|
||||
isshowarray.value[index] = false
|
||||
isactivearray.value[index] = false
|
||||
setTimeout(() => {
|
||||
isshowarray.value[index] = true
|
||||
}, 100);
|
||||
}
|
||||
const reset = (index: number) => {
|
||||
fourpostion.value[index].x = defaultfourpostion.value[index].x;
|
||||
fourpostion.value[index].y = defaultfourpostion.value[index].y;
|
||||
|
@ -311,20 +342,20 @@ export default defineComponent({
|
|||
four[index].x = config.point4[index].def_x
|
||||
four[index].y = config.point4[index].def_y
|
||||
|
||||
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));
|
||||
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(() => {
|
||||
isshowarray.value[index] = true
|
||||
}, 100);
|
||||
|
||||
|
||||
}
|
||||
|
||||
const resetall = () => {
|
||||
for (let index = 0; index < fourpostion.value.length; index++) {
|
||||
reset(index)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const moveHandler_1 = (data: any) => {
|
||||
|
@ -357,6 +388,20 @@ export default defineComponent({
|
|||
four[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||
save_set_cache()
|
||||
}
|
||||
//窗口变动重新渲染
|
||||
onMounted(() => {
|
||||
//监听窗口变化
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
ste_status.value = 1;
|
||||
setpoa();
|
||||
|
||||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
})();
|
||||
};
|
||||
});
|
||||
return {
|
||||
div,
|
||||
fourpostion,
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
<div class="col-4 offset-4">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<q-toggle class="float-right" v-model="array[0].isshow" label="" />
|
||||
<q-toggle class="float-right" v-model="array[0].isshow" label="" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :bg-color="group==0?'cyan-1':''" @focus="group = 0" v-model="array[0].value"
|
||||
:label="$t('upper fusion zone parameters')" lazy-rules :rules="[
|
||||
<q-input filled type="number" :bg-color="group == 0 ? 'cyan-1' : ''" @focus="group = 0"
|
||||
v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules :rules="[
|
||||
(val) =>
|
||||
(val !== null && val !== '') || $t('Please enter a number'),
|
||||
(val) =>
|
||||
|
@ -32,8 +32,8 @@
|
|||
<q-toggle class="float-right" v-model="array[1].isshow" label="" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :bg-color="group==1?'cyan-1':''" @focus="group = 1" v-model="array[1].value"
|
||||
:label="$t('Left fusion Band Parameters')" lazy-rules :rules="[
|
||||
<q-input filled type="number" :bg-color="group == 1 ? 'cyan-1' : ''" @focus="group = 1"
|
||||
v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules :rules="[
|
||||
(val) =>
|
||||
(val !== null && val !== '') || $t('Please enter a number'),
|
||||
(val) =>
|
||||
|
@ -48,8 +48,8 @@
|
|||
<q-toggle class="float-right" v-model="array[2].isshow" label="" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :bg-color="group==2?'cyan-1':''" @focus="group = 2" v-model="array[2].value"
|
||||
:label="$t('Right fusion Band Parameters')" lazy-rules :rules="[
|
||||
<q-input filled type="number" :bg-color="group == 2 ? 'cyan-1' : ''" @focus="group = 2"
|
||||
v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules :rules="[
|
||||
(val) =>
|
||||
(val !== null && val !== '') || $t('Please enter a number'),
|
||||
(val) =>
|
||||
|
@ -68,8 +68,8 @@
|
|||
<q-toggle class="float-right" v-model="array[3].isshow" label="" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :bg-color="group==3?'cyan-1':''" @focus="group = 3" v-model="array[3].value"
|
||||
:label="$t('Lower fusion Zone Parameters')" lazy-rules :rules="[
|
||||
<q-input filled type="number" :bg-color="group == 3 ? 'cyan-1' : ''" @focus="group = 3"
|
||||
v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules :rules="[
|
||||
(val) =>
|
||||
(val !== null && val !== '') || $t('Please enter a number'),
|
||||
(val) =>
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 offset-4">
|
||||
<div class="col-4 offset-4" v-if="group != 4">
|
||||
<p class="text-center">{{ $t('Set Fusion Band Parameters') }}</p>
|
||||
<div style="display: flex; justify-content: space-evenly">
|
||||
<div>
|
||||
|
@ -137,7 +137,7 @@ export default defineComponent({
|
|||
let set = GlobalData.getInstance().getCurrentClient();
|
||||
let $store = useStore();
|
||||
let $t = useI18n();
|
||||
const group = ref(0);
|
||||
const group = ref(4);
|
||||
const set_cache: any = ref([]);
|
||||
const enablefusion = ref(false);
|
||||
let array: any = reactive([
|
||||
|
@ -145,6 +145,7 @@ export default defineComponent({
|
|||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||
]);
|
||||
let serverconfig = JSON.parse($store.state.fusion_configuration);
|
||||
const selectedprojector = computed(() => {
|
||||
|
@ -182,13 +183,14 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
ste_status.value = 1;
|
||||
|
||||
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
use_server_config()
|
||||
use_set_cache()
|
||||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
setnowindex()
|
||||
}, { deep: true })
|
||||
const chang = (type: string) => {
|
||||
if (type == "alpha") {
|
||||
|
@ -217,8 +219,34 @@ export default defineComponent({
|
|||
}
|
||||
save_set_cache();
|
||||
};
|
||||
|
||||
const setnowindex = () => {
|
||||
let sum = 0;
|
||||
let indexx = 4;
|
||||
for (let index = 0; index < array.length - 1; index++) {
|
||||
if (array[index].isshow && Number(array[index].value) > 0) {
|
||||
sum++;
|
||||
indexx = index;
|
||||
}
|
||||
}
|
||||
if (sum == 1) {
|
||||
group.value = indexx
|
||||
} else {
|
||||
group.value = 4
|
||||
}
|
||||
}
|
||||
|
||||
const getconfig = () => {
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res) => { })
|
||||
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); })
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
const startconfig = () => {
|
||||
for (let index = 0; index < array.length; index++) {
|
||||
for (let index = 0; index < array.length - 1; index++) {
|
||||
array[index].gamma = config.params[index].gamma.toFixed(2)
|
||||
array[index].alpha = config.params[index].alpha.toFixed(2)
|
||||
array[index].p = config.params[index].power.toFixed(2)
|
||||
|
@ -228,8 +256,9 @@ export default defineComponent({
|
|||
if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); use_set_cache()
|
||||
|
||||
}
|
||||
const use_server_config=()=>{
|
||||
for (let index = 0; index < array.length; index++) {
|
||||
const use_server_config = () => {
|
||||
|
||||
for (let index = 0; index < array.length - 1; index++) {
|
||||
array[index].gamma = config.params[index].gamma.toFixed(2)
|
||||
array[index].alpha = config.params[index].alpha.toFixed(2)
|
||||
array[index].p = config.params[index].power.toFixed(2)
|
||||
|
|
|
@ -57,32 +57,32 @@
|
|||
<div class="col-8">
|
||||
<div ref="div" style="background-color: #7fffd4;height: 40vh;">
|
||||
<div style="position:absolute;">
|
||||
<vue3ResizeDrag :isActive="isactivearray[0]" v-if="isshowarray[0]" :w="30" :h="20" :x="ninepostion[0].x"
|
||||
:y="ninepostion[0].y" @mousedown="activeMouseDown(0)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[0]" v-if="isshowarray[0]" :w="30" :h="20"
|
||||
:x="ninepostion[0].x" :y="ninepostion[0].y" @mousedown="activeMouseDown(0)" :isResizable="false"
|
||||
@moveHandler="moveHandler_1"><span>{{ $t('point') }}1</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[1]" v-if="isshowarray[1]" :w="30" :h="20" :x="ninepostion[1].x"
|
||||
:y="ninepostion[1].y" @mousedown="activeMouseDown(1)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[1]" v-if="isshowarray[1]" :w="30" :h="20"
|
||||
:x="ninepostion[1].x" :y="ninepostion[1].y" @mousedown="activeMouseDown(1)" :isResizable="false"
|
||||
@moveHandler="moveHandler_2"><span>{{ $t('point') }}2</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[2]" v-if="isshowarray[2]" :w="30" :h="20" :x="ninepostion[2].x"
|
||||
:y="ninepostion[2].y" @mousedown="activeMouseDown(2)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[2]" v-if="isshowarray[2]" :w="30" :h="20"
|
||||
:x="ninepostion[2].x" :y="ninepostion[2].y" @mousedown="activeMouseDown(2)" :isResizable="false"
|
||||
@moveHandler="moveHandler_3"><span>{{ $t('point') }}3</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[3]" v-if="isshowarray[3]" :w="30" :h="20" :x="ninepostion[3].x"
|
||||
:y="ninepostion[3].y" @mousedown="activeMouseDown(3)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[3]" v-if="isshowarray[3]" :w="30" :h="20"
|
||||
:x="ninepostion[3].x" :y="ninepostion[3].y" @mousedown="activeMouseDown(3)" :isResizable="false"
|
||||
@moveHandler="moveHandler_4"><span>{{ $t('point') }}4</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[4]" v-if="isshowarray[4]" :w="30" :h="20" :x="ninepostion[4].x"
|
||||
:y="ninepostion[4].y" @mousedown="activeMouseDown(4)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[4]" v-if="isshowarray[4]" :w="30" :h="20"
|
||||
:x="ninepostion[4].x" :y="ninepostion[4].y" @mousedown="activeMouseDown(4)" :isResizable="false"
|
||||
@moveHandler="moveHandler_5"><span>{{ $t('point') }}5</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[5]" v-if="isshowarray[5]" :w="30" :h="20" :x="ninepostion[5].x"
|
||||
:y="ninepostion[5].y" @mousedown="activeMouseDown(5)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[5]" v-if="isshowarray[5]" :w="30" :h="20"
|
||||
:x="ninepostion[5].x" :y="ninepostion[5].y" @mousedown="activeMouseDown(5)" :isResizable="false"
|
||||
@moveHandler="moveHandler_6"><span>{{ $t('point') }}6</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[6]" v-if="isshowarray[6]" :w="30" :h="20" :x="ninepostion[6].x"
|
||||
:y="ninepostion[6].y" @mousedown="activeMouseDown(6)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[6]" v-if="isshowarray[6]" :w="30" :h="20"
|
||||
:x="ninepostion[6].x" :y="ninepostion[6].y" @mousedown="activeMouseDown(6)" :isResizable="false"
|
||||
@moveHandler="moveHandler_7"><span>{{ $t('point') }}7</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[7]" v-if="isshowarray[7]" :w="30" :h="20" :x="ninepostion[7].x"
|
||||
:y="ninepostion[7].y" @mousedown="activeMouseDown(7)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[7]" v-if="isshowarray[7]" :w="30" :h="20"
|
||||
:x="ninepostion[7].x" :y="ninepostion[7].y" @mousedown="activeMouseDown(7)" :isResizable="false"
|
||||
@moveHandler="moveHandler_8"><span>{{ $t('point') }}8</span> </vue3ResizeDrag>
|
||||
<vue3ResizeDrag :isActive="isactivearray[8]" v-if="isshowarray[8]" :w="30" :h="20" :x="ninepostion[8].x"
|
||||
:y="ninepostion[8].y" @mousedown="activeMouseDown(8)" :isResizable="false"
|
||||
<vue3ResizeDrag :isActive="isactivearray[8]" v-if="isshowarray[8]" :w="30" :h="20"
|
||||
:x="ninepostion[8].x" :y="ninepostion[8].y" @mousedown="activeMouseDown(8)" :isResizable="false"
|
||||
@moveHandler="moveHandler_9"><span>{{ $t('point') }}9</span> </vue3ResizeDrag>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -100,8 +100,8 @@
|
|||
</div>
|
||||
<div class="col-4">
|
||||
<div class="row">
|
||||
<div class="col-6"> <q-btn color="white" @click="resetall" text-color="black"
|
||||
:label="$t('resetall')" /></div>
|
||||
<div class="col-6"> <q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" />
|
||||
</div>
|
||||
<div class="col-3"> <q-input filled type="number" @focus="isactivearray[6] = false" class="q-pt-md"
|
||||
:dense="true" v-model="nine[6].x" label="x" lazy-rules />
|
||||
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[6] = false" :dense="true"
|
||||
|
@ -144,7 +144,7 @@
|
|||
<script lang="ts">
|
||||
import vue3ResizeDrag from "/src/third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue";
|
||||
import GlobalData from "src/common/GlobalData";
|
||||
import { defineComponent, ref, watch, computed, defineProps, withDefaults, onMounted ,onBeforeUnmount ,reactive} from "vue";
|
||||
import { defineComponent, ref, watch, computed, defineProps, withDefaults, onMounted, onBeforeUnmount, reactive } from "vue";
|
||||
import { useStore } from "src/store";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
|
@ -174,7 +174,7 @@ export default defineComponent({
|
|||
})
|
||||
const set_cache: any = ref([]);
|
||||
//
|
||||
const ste_status =ref(0);
|
||||
const ste_status = ref(0);
|
||||
const isshowarray = ref([true, true, true, true, true, true, true, true, true,])
|
||||
const isactivearray = ref([true, true, true, true, true, true, true, true, true,])
|
||||
let ninepostion: 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 }]);
|
||||
|
@ -252,12 +252,11 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
const use_set_cache = () => {
|
||||
if (set_cache.value[selectedprojector.value]!=null) {
|
||||
if (set_cache.value[selectedprojector.value] != null) {
|
||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||
deepcopy(nine, tmp)
|
||||
|
||||
|
||||
}
|
||||
//console.log(nine)
|
||||
syncpoint()
|
||||
};
|
||||
const deepcopy = (o1: any, o2: any) => {
|
||||
|
@ -274,10 +273,10 @@ export default defineComponent({
|
|||
set_cache.value[selectedprojector.value] = JSON.stringify(nine);
|
||||
}
|
||||
onBeforeUnmount(() => {
|
||||
if(set_cache.value[selectedprojector.value]!=null){
|
||||
if (set_cache.value[selectedprojector.value] != null) {
|
||||
sessionStorage.SurfaceCorrection = JSON.stringify(set_cache.value)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
watch(() => configselsect, (newVal, oldVal) => {
|
||||
|
@ -289,16 +288,16 @@ export default defineComponent({
|
|||
fortmp = JSON.parse(JSON.stringify(i))
|
||||
}
|
||||
}
|
||||
ste_status.value=1;
|
||||
ste_status.value = 1;
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
use_server_config()
|
||||
use_set_cache()
|
||||
setTimeout(() => {
|
||||
ste_status.value=0;
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
}, { deep: true })
|
||||
onMounted(() => {
|
||||
ste_status.value=1;
|
||||
ste_status.value = 1;
|
||||
startpostion();
|
||||
for (let index = 0; index < defaultninepostion.value.length; index++) {
|
||||
defaultninepostion.value[index].x = ninepostion.value[index].x;
|
||||
|
@ -309,9 +308,32 @@ export default defineComponent({
|
|||
setninepostion();
|
||||
syncpoint()
|
||||
setTimeout(() => {
|
||||
ste_status.value=0;
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
})
|
||||
|
||||
//窗口变动重新渲染
|
||||
onMounted(() => {
|
||||
//监听窗口变化
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
ste_status.value = 1;
|
||||
startpostion();
|
||||
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 = config.point9[index].def_x
|
||||
defaultnine.value[index].y = config.point9[index].def_y
|
||||
}
|
||||
setninepostion();
|
||||
syncpoint()
|
||||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
})();
|
||||
};
|
||||
});
|
||||
|
||||
const setninepostion = () => {
|
||||
for (let index = 0; index < defaultninepostion.value.length; index++) {
|
||||
nine[index].x = config.point9[index].x
|
||||
|
@ -358,15 +380,15 @@ export default defineComponent({
|
|||
defaultnine.value[index].x = nine[index].x
|
||||
defaultnine.value[index].y = nine[index].y
|
||||
}
|
||||
if(sessionStorage.SurfaceCorrection&&sessionStorage.SurfaceCorrection.length>0){
|
||||
set_cache.value=JSON.parse(sessionStorage.SurfaceCorrection);
|
||||
if (sessionStorage.SurfaceCorrection && sessionStorage.SurfaceCorrection.length > 0) {
|
||||
set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection);
|
||||
use_set_cache()
|
||||
}else{
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
syncpoint()
|
||||
}
|
||||
const use_server_config=()=>{
|
||||
const use_server_config = () => {
|
||||
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;
|
||||
|
@ -381,7 +403,7 @@ export default defineComponent({
|
|||
nine[index].x = config.point9[index].def_x
|
||||
nine[index].y = config.point9[index].def_y
|
||||
|
||||
set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, index+1, Number(config.point9[index].def_x), Number(config.point9[index].def_y));
|
||||
set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, index + 1, Number(config.point9[index].def_x), Number(config.point9[index].def_y));
|
||||
|
||||
isshowarray.value[index] = false
|
||||
setTimeout(() => {
|
||||
|
@ -394,7 +416,7 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
watch(() => nine[0], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 1, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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);
|
||||
|
@ -405,7 +427,7 @@ export default defineComponent({
|
|||
|
||||
}, { deep: true })
|
||||
watch(() => nine[1], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 2, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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);
|
||||
|
@ -416,7 +438,7 @@ export default defineComponent({
|
|||
|
||||
}, { deep: true })
|
||||
watch(() => nine[2], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 3, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -425,7 +447,7 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => nine[3], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 4, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -434,7 +456,7 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => nine[4], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 5, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -443,7 +465,7 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => nine[5], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 6, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -452,7 +474,7 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => nine[6], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 7, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -461,7 +483,7 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => nine[7], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 8, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -470,7 +492,7 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}, { deep: true })
|
||||
watch(() => nine[8], (newVal, oldVal) => {
|
||||
if ($store.state.enablefusion&&ste_status.value==0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 9, 9, Number(newVal.x), Number(newVal.y));
|
||||
if ($store.state.enablefusion && ste_status.value == 0) 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(((config.height - newVal.y) / Proportion.value.y));
|
||||
|
@ -488,7 +510,7 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
isshowarray.value[index] = true
|
||||
}, 100);
|
||||
|
||||
|
||||
}
|
||||
const save = () => {
|
||||
set?.SaveBlendingConfig("")
|
||||
|
|
|
@ -134,18 +134,17 @@ export default defineComponent({
|
|||
show_dialog.value = true;
|
||||
};
|
||||
const resize = ref(true)
|
||||
//窗口变动重新渲染
|
||||
onMounted(() => {
|
||||
//监听窗口变化
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
console.log("resize")
|
||||
resize.value = false; setTimeout(() => {
|
||||
resize.value = true
|
||||
}, 100);
|
||||
})();
|
||||
};
|
||||
});
|
||||
// //窗口变动重新渲染
|
||||
// onMounted(() => {
|
||||
// //监听窗口变化
|
||||
// window.onresize = () => {
|
||||
// return (() => {
|
||||
// resize.value = false; setTimeout(() => {
|
||||
// resize.value = true
|
||||
// }, 100);
|
||||
// })();
|
||||
// };
|
||||
// });
|
||||
|
||||
|
||||
//投影机数量
|
||||
|
@ -185,6 +184,15 @@ export default defineComponent({
|
|||
clear()
|
||||
set?.GetBlendingConfig("").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); })
|
||||
}
|
||||
const getconfig=()=>{
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res)=>{})
|
||||
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); })
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
const clear = () => {
|
||||
|
||||
sessionStorage.removeItem('DensityCorrection')
|
||||
|
@ -195,6 +203,7 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
sessionStorage.removeItem('FusionLocale')
|
||||
}, 500)
|
||||
getconfig()
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
|
@ -210,7 +219,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
|
||||
}, 500);
|
||||
}, 1000);
|
||||
})
|
||||
return {
|
||||
resize,
|
||||
|
|
|
@ -599,6 +599,7 @@ export default defineComponent({
|
|||
const getconfig=()=>{
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res)=>{})
|
||||
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); })
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue