修改 疏密校正界面
This commit is contained in:
parent
41d1913f72
commit
5f2fc69a06
|
@ -1,72 +1,138 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-2 q-pa-lg"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
<div class="col-8 q-pt-md">
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
<div ref="div" style="width:100%;background-color: aquamarine;height: 100%;">
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[0]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[1]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[2]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[3]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div style="position:absolute;">
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[0]" v-if="isshowarray[0]" :w="30" :h="20"
|
||||||
|
:x="point_postion[0].x" :y="point_postion[0].y" @mousedown="isactivearray[0] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 0)"><span>{{ $t('point') }}1</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[1]" v-if="isshowarray[1]" :w="30" :h="20"
|
||||||
|
:x="point_postion[1].x" :y="point_postion[1].y" @mousedown="isactivearray[1] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 1)"><span>{{ $t('point') }}2</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[2]" v-if="isshowarray[2]" :w="30" :h="20"
|
||||||
|
:x="point_postion[2].x" :y="point_postion[2].y" @mousedown="isactivearray[2] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 2)"><span>{{ $t('point') }}3</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[3]" v-if="isshowarray[3]" :w="30" :h="20"
|
||||||
|
:x="point_postion[3].x" :y="point_postion[3].y" @mousedown="isactivearray[3] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 3)"><span>{{ $t('point') }}4</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[4]" v-if="isshowarray[4]" :w="30" :h="20"
|
||||||
|
:x="point_postion[4].x" :y="point_postion[4].y" @mousedown="isactivearray[4] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 4)"><span>{{ $t('point') }}5</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[5]" v-if="isshowarray[5]" :w="30" :h="20"
|
||||||
|
:x="point_postion[5].x" :y="point_postion[5].y" @mousedown="isactivearray[5] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 5)"><span>{{ $t('point') }}6</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[6]" v-if="isshowarray[6]" :w="30" :h="20"
|
||||||
|
:x="point_postion[6].x" :y="point_postion[6].y" @mousedown="isactivearray[6] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 6)"><span>{{ $t('point') }}7</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[7]" v-if="false" :w="30" :h="20" :x="point_postion[7].x"
|
||||||
|
:y="point_postion[7].y" @mousedown="isactivearray[7] = true" :isResizable="false"
|
||||||
|
@moveHandler="moveHandler($event, 7)"><span>{{ $t('point') }}8</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[8]" v-if="isshowarray[8]" :w="30" :h="20"
|
||||||
|
:x="point_postion[8].x" :y="point_postion[8].y" @mousedown="isactivearray[8] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 8)"><span>{{ $t('point') }}8</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
<vue3ResizeDrag :isActive="isactivearray[9]" v-if="isshowarray[9]" :w="30" :h="20"
|
||||||
|
:x="point_postion[9].x" :y="point_postion[9].y" @mousedown="isactivearray[9] = true"
|
||||||
|
:isResizable="false" @moveHandler="moveHandler($event, 9)"><span>{{ $t('point') }}9</span>
|
||||||
|
</vue3ResizeDrag>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-3 q-pt-md">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div class="col-8"><q-input @focus="isactivearray[0] = false" filled type="number"
|
||||||
|
class="q-pt-md" :dense="true" v-model="value[0].y" label="y" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div class="col-8"><q-input @focus="isactivearray[1] = false" filled type="number"
|
||||||
|
class="q-pt-md" :dense="true" v-model="value[1].y" label="y" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div class="col-8"><q-input @focus="isactivearray[2] = false" filled type="number"
|
||||||
|
class="q-pt-md" :dense="true" v-model="value[2].y" label="y" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div class="col-8"><q-input @focus="isactivearray[3] = false" filled type="number"
|
||||||
|
class="q-pt-md" :dense="true" v-model="value[3].y" label="y" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div class="col-8"><q-input @focus="isactivearray[4] = false" filled type="number"
|
||||||
|
class="q-pt-md" :dense="true" v-model="value[4].y" label="y" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(4)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="col-11">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-1"><q-input filled @focus="isactivearray[5] = false" type="number" class="q-pt-md"
|
||||||
|
:dense="true" v-model="value[5].x" label="x" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(5)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="col-1"><q-input filled @focus="isactivearray[6] = false" type="number" class="q-pt-md"
|
||||||
|
:dense="true" v-model="value[6].x" label="x" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(6)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="col-1"><q-input filled @focus="isactivearray[2] = false" type="number" class="q-pt-md"
|
||||||
|
:dense="true" v-model="value[2].x" label="x" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="col-1"><q-input filled @focus="isactivearray[8] = false" type="number" class="q-pt-md"
|
||||||
|
:dense="true" v-model="value[8].x" label="x" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(8)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="col-1"><q-input filled @focus="isactivearray[9] = false" type="number" class="q-pt-md"
|
||||||
|
:dense="true" v-model="value[9].x" label="x" lazy-rules />
|
||||||
|
<q-btn color="white" @click="reset(9)" text-color="black" :label="$t('reset')" />
|
||||||
|
</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="col-1 q-pt-xl">
|
||||||
|
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
</div>
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg"> </div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[3]" label="" lazy-rules />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[4]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[5]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[6]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[7]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[8]" label="" lazy-rules />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-pa-lg">
|
|
||||||
<!-- <q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[9]" label="" lazy-rules /> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -74,23 +140,233 @@
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref, watch, computed, defineProps, withDefaults, reactive} from "vue";
|
import { defineComponent, ref, watch, computed, defineProps, withDefaults, reactive, onMounted } from "vue";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import vue3ResizeDrag from "/src/third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentDensityCorrection",
|
name: "ComponentDensityCorrection",
|
||||||
|
components: {
|
||||||
|
vue3ResizeDrag
|
||||||
|
},
|
||||||
setup() {
|
setup() {
|
||||||
let $store = useStore();
|
let $store = useStore();
|
||||||
let $t = useI18n();
|
let $t = useI18n();
|
||||||
const value=reactive([0,0,0,0,0,0,0,0,0,0,0]);
|
const value = 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 model = ref(null);
|
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([]);
|
||||||
let options = ref(['10', '20', '30', '40', '50']);
|
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 });
|
||||||
|
const configselsect = computed(() => { return $store.state.selected_projector })
|
||||||
|
watch(() => configselsect, (newVal, oldVal) => {
|
||||||
|
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))
|
||||||
|
}, { deep: true })
|
||||||
|
const initialization = () => {
|
||||||
|
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 + 5].x = config.hor_density[index].x
|
||||||
|
value[index + 5].y = config.hor_density[index].y
|
||||||
|
}
|
||||||
|
for (let index = 0; index < 10; index++) {
|
||||||
|
let point_object: object = { active: true, show: true, x: 0, y: 0 }
|
||||||
|
let default_location_object = { x: 0, y: 0 }
|
||||||
|
point_postion.push(point_object)
|
||||||
|
default_location.push(default_location_object)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetall = () => {
|
||||||
|
for (let index = 0; index < config.hor_density.length + config.ver_density.length; index++) {
|
||||||
|
reset(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const reset = (index: number) => {
|
||||||
|
index >= 5 ? value[index].x = config.hor_density[index - 5].def_x : value[index].x = config.ver_density[index].def_x
|
||||||
|
index >= 5 ? value[index].y = config.hor_density[index - 5].def_y : value[index].y = config.ver_density[index].def_y
|
||||||
|
point_postion[index].y = default_location[index].y
|
||||||
|
point_postion[index].x = default_location[index].x
|
||||||
|
isshowarray.value[index] = false
|
||||||
|
setTimeout(() => {
|
||||||
|
isshowarray.value[index] = true
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
const point_postion: any = reactive([])
|
||||||
|
|
||||||
|
const moveHandler = ($event: any, index: number) => {
|
||||||
|
let x = 0
|
||||||
|
let y = 0
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
x = config.width / 2 + Math.ceil(($event.left - default_location[index].x) * Proportion.value.x);
|
||||||
|
y = (config.height - (config.height / 4) * index) - Math.ceil(($event.top - default_location[index].y) * Proportion.value.y);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 8:
|
||||||
|
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:
|
||||||
|
}
|
||||||
|
value[index].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
||||||
|
value[index].y = y > config.height ? config.height : y && y < 0 ? 0 : y
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
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
|
||||||
|
isshowarray.value[index] = false
|
||||||
|
isactivearray.value[index] = false
|
||||||
|
setTimeout(() => {
|
||||||
|
isshowarray.value[index] = true
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
watch(() => value[0], (newVal, oldVal) => {
|
||||||
|
// 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 = default_location[0].x;
|
||||||
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
|
setdianposin(0, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[1], (newVal, oldVal) => {
|
||||||
|
// 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[1]) {
|
||||||
|
let x = default_location[1].x;
|
||||||
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
|
setdianposin(1, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[2], (newVal, oldVal) => {
|
||||||
|
//发送x 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[2]) {
|
||||||
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
|
setdianposin(2, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[3], (newVal, oldVal) => {
|
||||||
|
// 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[3]) {
|
||||||
|
let x = default_location[3].x;
|
||||||
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
|
setdianposin(3, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[4], (newVal, oldVal) => {
|
||||||
|
// 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[4]) {
|
||||||
|
let x = default_location[4].x;
|
||||||
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
|
setdianposin(4, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
|
||||||
|
watch(() => value[5], (newVal, oldVal) => {
|
||||||
|
// 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[5]) {
|
||||||
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
|
let y = default_location[5].y
|
||||||
|
setdianposin(5, x, y)
|
||||||
|
console.log(x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[6], (newVal, oldVal) => {
|
||||||
|
// 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[6]) {
|
||||||
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
|
let y = default_location[6].y
|
||||||
|
setdianposin(6, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[7], (newVal, oldVal) => {
|
||||||
|
// 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[7]) {
|
||||||
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
|
let y = default_location[7].y
|
||||||
|
setdianposin(7, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[8], (newVal, oldVal) => {
|
||||||
|
// 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[8]) {
|
||||||
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
|
let y = default_location[8].y
|
||||||
|
setdianposin(8, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
|
watch(() => value[9], (newVal, oldVal) => {
|
||||||
|
// 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[9]) {
|
||||||
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
|
let y = default_location[9].y
|
||||||
|
setdianposin(9, x, y)
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
|
///
|
||||||
|
|
||||||
|
|
||||||
|
initialization();
|
||||||
return {
|
return {
|
||||||
model,
|
model,
|
||||||
options,
|
options,
|
||||||
value
|
value,
|
||||||
|
reset,
|
||||||
|
resetall,
|
||||||
|
point_postion,
|
||||||
|
moveHandler,
|
||||||
|
div,
|
||||||
|
isshowarray,
|
||||||
|
isactivearray
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,19 +23,19 @@
|
||||||
<div ref="div" style="background-color: #7fffd4;height: 40vh;">
|
<div ref="div" style="background-color: #7fffd4;height: 40vh;">
|
||||||
<div style="position:absolute;">
|
<div style="position:absolute;">
|
||||||
<vue3ResizeDrag v-if="isshowarray[0]" :isActive="isactivearray[0]" @mousedown="activeMouseDown(0)"
|
<vue3ResizeDrag v-if="isshowarray[0]" :isActive="isactivearray[0]" @mousedown="activeMouseDown(0)"
|
||||||
@mouseUpHandler="mouseUpHandler(0)" :w="30" :h="20" :x="x1" :y="y1" :isResizable="false"
|
@mouseUpHandler="mouseUpHandler(0)" :w="30" :h="20" :x="points[0].x" :y="points[0].y"
|
||||||
@moveHandler="moveHandler_1"><span>{{ $t('point') }}1</span>
|
:isResizable="false" @moveHandler="moveHandler_1"><span>{{ $t('point') }}1</span>
|
||||||
</vue3ResizeDrag>
|
</vue3ResizeDrag>
|
||||||
<vue3ResizeDrag v-if="isshowarray[1]" :isActive="isactivearray[1]" @mousedown="activeMouseDown(1)"
|
<vue3ResizeDrag v-if="isshowarray[1]" :isActive="isactivearray[1]" @mousedown="activeMouseDown(1)"
|
||||||
@mouseUpHandler="mouseUpHandler(1)" :w="30" :h="20" :x="point2.x" :y="point2.y"
|
@mouseUpHandler="mouseUpHandler(1)" :w="30" :h="20" :x="points[1].x" :y="points[1].y"
|
||||||
:isResizable="false" @moveHandler="moveHandler_2"><span>{{ $t('point') }}2</span>
|
:isResizable="false" @moveHandler="moveHandler_2"><span>{{ $t('point') }}2</span>
|
||||||
</vue3ResizeDrag>
|
</vue3ResizeDrag>
|
||||||
<vue3ResizeDrag v-if="isshowarray[2]" :isActive="isactivearray[2]" @mousedown="activeMouseDown(2)"
|
<vue3ResizeDrag v-if="isshowarray[2]" :isActive="isactivearray[2]" @mousedown="activeMouseDown(2)"
|
||||||
@mouseUpHandler="mouseUpHandler(2)" :w="30" :h="20" :x="point3.x" :y="point3.y"
|
@mouseUpHandler="mouseUpHandler(2)" :w="30" :h="20" :x="points[2].x" :y="points[2].y"
|
||||||
:isResizable="false" @moveHandler="moveHandler_3"><span>{{ $t('point') }}3</span>
|
:isResizable="false" @moveHandler="moveHandler_3"><span>{{ $t('point') }}3</span>
|
||||||
</vue3ResizeDrag>
|
</vue3ResizeDrag>
|
||||||
<vue3ResizeDrag v-if="isshowarray[3]" :isActive="isactivearray[3]" @mousedown="activeMouseDown(3)"
|
<vue3ResizeDrag v-if="isshowarray[3]" :isActive="isactivearray[3]" @mousedown="activeMouseDown(3)"
|
||||||
@mouseUpHandler="mouseUpHandler(3)" :w="30" :h="20" :x="point4.x" :y="point4.y"
|
@mouseUpHandler="mouseUpHandler(3)" :w="30" :h="20" :x="points[3].x" :y="points[3].y"
|
||||||
:isResizable="false" @moveHandler="moveHandler_4"><span>{{ $t('point') }}4</span>
|
:isResizable="false" @moveHandler="moveHandler_4"><span>{{ $t('point') }}4</span>
|
||||||
</vue3ResizeDrag>
|
</vue3ResizeDrag>
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,21 +89,23 @@ export default defineComponent({
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||||
let set = GlobalData.getInstance().getCurrentClient();
|
let set = GlobalData.getInstance().getCurrentClient();
|
||||||
const configselsect = computed(() => { return $store.state.selected_projector })
|
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 serverconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
|
const selectedprojector = computed(() => {
|
||||||
|
return $store.getters.GetTheCurrentlySelectedCamera[0] * serverconfig.col + $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
|
})
|
||||||
|
const set_cache: any = ref([]);
|
||||||
|
//
|
||||||
|
//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 four = reactive([{ 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 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 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 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 div: any = ref(null);
|
||||||
let options = ref(['10', '20', '30', '40', '50']);
|
let Proportion = ref({ x: 0, y: 0 });//缩放比例
|
||||||
let Proportion = ref({ x: 0, y: 0 });
|
let points = reactive([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }]);//点的位置
|
||||||
let point1 = reactive({ x: 0, y: 0 });
|
|
||||||
let point2 = ref({ x: 0, y: 0 });
|
|
||||||
let point3 = ref({ x: 0, y: 0 });
|
|
||||||
let point4 = ref({ x: 0, y: 0 });
|
|
||||||
const isshowarray = ref([true, true, true, true])
|
const isshowarray = ref([true, true, true, true])
|
||||||
const isactivearray = ref([true, true, true, true])
|
const isactivearray = ref([true, true, true, true])
|
||||||
const x1 = ref(0);
|
|
||||||
const y1 = ref(0);
|
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
set?.SaveBlendingConfig("")
|
set?.SaveBlendingConfig("")
|
||||||
|
@ -111,7 +113,29 @@ export default defineComponent({
|
||||||
set?.GetBlendingConfig("").then((res) => { $store.commit("setfusion_configuration", res?.config); })
|
set?.GetBlendingConfig("").then((res) => { $store.commit("setfusion_configuration", res?.config); })
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
///
|
||||||
|
const use_set_cache = () => {
|
||||||
|
if (set_cache.value[selectedprojector.value]) {
|
||||||
|
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||||
|
deepcopy(four, tmp)
|
||||||
|
syncpoint()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const deepcopy = (o1: any, o2: any) => {
|
||||||
|
for (let k in o2) {
|
||||||
|
if (typeof o2[k] === 'object') {
|
||||||
|
o1[k] = {};
|
||||||
|
deepcopy(o1[k], o2[k]);
|
||||||
|
} else {
|
||||||
|
o1[k] = o2[k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const save_set_cache = () => {
|
||||||
|
set_cache.value[selectedprojector.value] = JSON.stringify(four);
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
const activeMouseDown = (index: number) => {
|
const activeMouseDown = (index: number) => {
|
||||||
isactivearray.value[index] = true
|
isactivearray.value[index] = true
|
||||||
}
|
}
|
||||||
|
@ -124,20 +148,19 @@ export default defineComponent({
|
||||||
})
|
})
|
||||||
|
|
||||||
const setpoa = () => {
|
const setpoa = () => {
|
||||||
point1.x = 0
|
|
||||||
point1.y = 0
|
|
||||||
|
|
||||||
x1.value = 0
|
points[0].x = 0
|
||||||
y1.value = 0
|
points[0].y = 0
|
||||||
|
|
||||||
point2.value.x = div.value.offsetWidth - 25
|
points[1].x = div.value.offsetWidth - 25
|
||||||
point2.value.y = 0
|
points[1].y = 0
|
||||||
|
|
||||||
point3.value.x = 0
|
points[2].x = 0
|
||||||
point3.value.y = div.value.offsetHeight - 25
|
points[2].y = div.value.offsetHeight - 25
|
||||||
|
|
||||||
|
points[3].x = div.value.offsetWidth - 25
|
||||||
|
points[3].y = div.value.offsetHeight - 25
|
||||||
|
|
||||||
point4.value.x = div.value.offsetWidth - 25
|
|
||||||
point4.value.y = div.value.offsetHeight - 25
|
|
||||||
|
|
||||||
|
|
||||||
fourpostion.value[0].x = 0
|
fourpostion.value[0].x = 0
|
||||||
|
@ -159,62 +182,69 @@ export default defineComponent({
|
||||||
defaultfourpostion.value[index].y = fourpostion.value[index].y;
|
defaultfourpostion.value[index].y = fourpostion.value[index].y;
|
||||||
defaultfour.value[index].x = config.point4[index].def_x
|
defaultfour.value[index].x = config.point4[index].def_x
|
||||||
defaultfour.value[index].y = config.point4[index].def_y
|
defaultfour.value[index].y = config.point4[index].def_y
|
||||||
|
four[index].x = config.point4[index].x
|
||||||
|
four[index].y = config.point4[index].y
|
||||||
}
|
}
|
||||||
|
syncpoint()
|
||||||
}
|
}
|
||||||
watch(() => four.value[0], (newVal, oldVal) => {
|
watch(() => four[0], (newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion) 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]) {
|
if (!isactivearray.value[0]) {
|
||||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
x1.value = x
|
points[0].x = x
|
||||||
y1.value = y
|
points[0].y = y
|
||||||
isshowarray.value[0] = false
|
isshowarray.value[0] = false
|
||||||
isactivearray.value[0] = false
|
isactivearray.value[0] = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isshowarray.value[0] = true
|
isshowarray.value[0] = true
|
||||||
}, 100);
|
}, 100);
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
watch(() => four.value[1], (newVal, oldVal) => {
|
watch(() => four[1], (newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion) 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]) {
|
if (!isactivearray.value[1]) {
|
||||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||||
point2.value.x = x
|
points[1].x = x
|
||||||
point2.value.y = y
|
points[1].y = y
|
||||||
isshowarray.value[1] = false
|
isshowarray.value[1] = false
|
||||||
isactivearray.value[1] = false
|
isactivearray.value[1] = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isshowarray.value[1] = true
|
isshowarray.value[1] = true
|
||||||
}, 100);
|
}, 100);
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
watch(() => four.value[2], (newVal, oldVal) => {
|
watch(() => four[2], (newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion) 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]) {
|
if (!isactivearray.value[2]) {
|
||||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
let y = Math.ceil((config.height / 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
|
points[2].x = x
|
||||||
point3.value.y = y
|
points[2].y = y
|
||||||
isshowarray.value[2] = false
|
isshowarray.value[2] = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isshowarray.value[2] = true
|
isshowarray.value[2] = true
|
||||||
}, 100);
|
}, 100);
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
watch(() => four.value[3], (newVal, oldVal) => {
|
watch(() => four[3], (newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion) 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]) {
|
if (!isactivearray.value[3]) {
|
||||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||||
let y = Math.ceil((config.height / 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
|
points[3].x = x
|
||||||
point4.value.y = y
|
points[3].y = y
|
||||||
isshowarray.value[3] = false
|
isshowarray.value[3] = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isshowarray.value[3] = true
|
isshowarray.value[3] = true
|
||||||
}, 100);
|
}, 100);
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
|
@ -230,42 +260,28 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
config = JSON.parse(JSON.stringify(fortmp))
|
config = JSON.parse(JSON.stringify(fortmp))
|
||||||
setpoa();
|
setpoa();
|
||||||
|
use_set_cache()
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
|
//为了加载 缓存的配置时 同步点的位置
|
||||||
|
const syncpoint=()=>{
|
||||||
|
for (let index = 0; index < fourpostion.value.length; index++) {
|
||||||
|
isactivearray.value[index]=false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const reset = (index: number) => {
|
const reset = (index: number) => {
|
||||||
if (index == 0) {
|
fourpostion.value[index].x = defaultfourpostion.value[index].x;
|
||||||
four.value[0].x = 0
|
fourpostion.value[index].y = defaultfourpostion.value[index].y;
|
||||||
four.value[0].y = 1080
|
|
||||||
point1.x = 0
|
four[index].x = config.point4[index].def_x
|
||||||
point1.y = 0
|
four[index].y = config.point4[index].def_y
|
||||||
x1.value = 0
|
|
||||||
y1.value = 0
|
|
||||||
}
|
|
||||||
if (index == 1) {
|
|
||||||
four.value[1].x = 1920
|
|
||||||
four.value[1].y = 1080
|
|
||||||
fourpostion.value[1].x = div.value.offsetWidth - 25
|
|
||||||
fourpostion.value[1].y = 0
|
|
||||||
}
|
|
||||||
if (index == 2) {
|
|
||||||
four.value[2].x = 0
|
|
||||||
four.value[2].y = 0
|
|
||||||
fourpostion.value[2].x = 0
|
|
||||||
fourpostion.value[2].y = div.value.offsetHeight - 25
|
|
||||||
}
|
|
||||||
if (index == 3) {
|
|
||||||
four.value[3].x = 1920
|
|
||||||
four.value[3].y = 0
|
|
||||||
fourpostion.value[3].x = div.value.offsetWidth - 25
|
|
||||||
fourpostion.value[3].y = div.value.offsetHeight - 25
|
|
||||||
}
|
|
||||||
four.value[index].x = config.point4[index].def_x
|
|
||||||
four.value[index].y = config.point4[index].def_y
|
|
||||||
|
|
||||||
isshowarray.value[index] = false
|
isshowarray.value[index] = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isshowarray.value[index] = true
|
isshowarray.value[index] = true
|
||||||
}, 100);
|
}, 100);
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
|
|
||||||
const resetall = () => {
|
const resetall = () => {
|
||||||
|
@ -273,45 +289,50 @@ export default defineComponent({
|
||||||
for (let index = 0; index < fourpostion.value.length; index++) {
|
for (let index = 0; index < fourpostion.value.length; index++) {
|
||||||
fourpostion.value[index].x = defaultfourpostion.value[index].x
|
fourpostion.value[index].x = defaultfourpostion.value[index].x
|
||||||
fourpostion.value[index].y = defaultfourpostion.value[index].y
|
fourpostion.value[index].y = defaultfourpostion.value[index].y
|
||||||
four.value[index].x = defaultfour.value[index].x
|
four[index].x = defaultfour.value[index].x
|
||||||
four.value[index].y = defaultfour.value[index].y
|
four[index].y = defaultfour.value[index].y
|
||||||
|
|
||||||
isshowarray.value[index] = false
|
isshowarray.value[index] = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isshowarray.value[index] = true
|
isshowarray.value[index] = true
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
|
|
||||||
const moveHandler_1 = (data: any) => {
|
const moveHandler_1 = (data: any) => {
|
||||||
let x = Math.ceil((data.left - fourpostion.value[0].x) * Proportion.value.x + 0);
|
let x = Math.ceil((data.left - fourpostion.value[0].x) * Proportion.value.x + 0);
|
||||||
let y = Math.ceil((config.height - 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 > config.width ? config.width : x && x < 0 ? 0 : x;
|
four[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;
|
four[0].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||||
isactivearray.value[0] = true
|
isactivearray.value[0] = true
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
const moveHandler_2 = (data: any) => {
|
const moveHandler_2 = (data: any) => {
|
||||||
let x = Math.ceil((data.left - fourpostion.value[1].x) * Proportion.value.x + config.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));
|
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[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;
|
four[1].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
const moveHandler_3 = (data: any) => {
|
const moveHandler_3 = (data: any) => {
|
||||||
let x = Math.ceil((data.left - fourpostion.value[2].x) * Proportion.value.x);
|
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));
|
let y = Math.abs(Math.ceil((data.top - fourpostion.value[2].y) * Proportion.value.y));
|
||||||
four.value[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
four[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;
|
four[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
const moveHandler_4 = (data: any) => {
|
const moveHandler_4 = (data: any) => {
|
||||||
let x = Math.ceil((data.left - fourpostion.value[3].x) * Proportion.value.x + config.width);
|
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));
|
let y = Math.abs(Math.ceil((data.top - fourpostion.value[3].y) * Proportion.value.y));
|
||||||
four.value[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
four[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;
|
four[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
div,
|
div,
|
||||||
options,
|
|
||||||
fourpostion,
|
fourpostion,
|
||||||
reset,
|
reset,
|
||||||
resetall,
|
resetall,
|
||||||
|
@ -321,16 +342,11 @@ export default defineComponent({
|
||||||
moveHandler_4,
|
moveHandler_4,
|
||||||
four,
|
four,
|
||||||
save,
|
save,
|
||||||
point1,
|
|
||||||
point2,
|
|
||||||
point3,
|
|
||||||
point4,
|
|
||||||
x1,
|
|
||||||
y1,
|
|
||||||
isshowarray,
|
isshowarray,
|
||||||
isactivearray,
|
isactivearray,
|
||||||
activeMouseDown,
|
activeMouseDown,
|
||||||
mouseUpHandler
|
mouseUpHandler,
|
||||||
|
points
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -148,25 +148,6 @@ export default defineComponent({
|
||||||
const selectedprojector = computed(() => {
|
const selectedprojector = computed(() => {
|
||||||
return $store.getters.GetTheCurrentlySelectedCamera[0]*serverconfig.col+$store.getters.GetTheCurrentlySelectedCamera[1]
|
return $store.getters.GetTheCurrentlySelectedCamera[0]*serverconfig.col+$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
})
|
})
|
||||||
const options = ref([
|
|
||||||
{
|
|
||||||
label: "上融合带参数",
|
|
||||||
value: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "左融合带参数",
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "右融合带参数",
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "下融合带参数",
|
|
||||||
value: 3,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
const use_set_cache = () => {
|
const use_set_cache = () => {
|
||||||
if (set_cache.value[selectedprojector.value]) {
|
if (set_cache.value[selectedprojector.value]) {
|
||||||
|
@ -303,7 +284,6 @@ export default defineComponent({
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
options,
|
|
||||||
group,
|
group,
|
||||||
array,
|
array,
|
||||||
chang,
|
chang,
|
||||||
|
|
|
@ -85,7 +85,6 @@
|
||||||
:y="ninepostion[8].y" @mousedown="activeMouseDown(8)" :isResizable="false"
|
:y="ninepostion[8].y" @mousedown="activeMouseDown(8)" :isResizable="false"
|
||||||
@moveHandler="moveHandler_9"><span>{{ $t('point') }}9</span> </vue3ResizeDrag>
|
@moveHandler="moveHandler_9"><span>{{ $t('point') }}9</span> </vue3ResizeDrag>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
|
@ -301,42 +300,9 @@ export default defineComponent({
|
||||||
|
|
||||||
}
|
}
|
||||||
const reset = (index: number) => {
|
const reset = (index: number) => {
|
||||||
if (index == 0) {
|
ninepostion.value[index].x = defaultninepostion.value[index].x;
|
||||||
ninepostion.value[index].x = 0
|
ninepostion.value[index].y = defaultninepostion.value[index].y;
|
||||||
ninepostion.value[index].y = 0
|
|
||||||
}
|
|
||||||
if (index == 1) {
|
|
||||||
ninepostion.value[index].x = div.value.offsetWidth / 2 - 25
|
|
||||||
ninepostion.value[index].y = 0
|
|
||||||
}
|
|
||||||
if (index == 2) {
|
|
||||||
ninepostion.value[index].x = div.value.offsetWidth - 25
|
|
||||||
ninepostion.value[index].y = 0
|
|
||||||
}
|
|
||||||
if (index == 3) {
|
|
||||||
ninepostion.value[index].x = 0
|
|
||||||
ninepostion.value[index].y = div.value.offsetHeight / 2 - 8
|
|
||||||
}
|
|
||||||
if (index == 4) {
|
|
||||||
ninepostion.value[index].x = div.value.offsetWidth / 2 - 25
|
|
||||||
ninepostion.value[index].y = div.value.offsetHeight / 2 - 8
|
|
||||||
}
|
|
||||||
if (index == 5) {
|
|
||||||
ninepostion.value[index].x = div.value.offsetWidth - 25
|
|
||||||
ninepostion.value[index].y = div.value.offsetHeight / 2
|
|
||||||
}
|
|
||||||
if (index == 6) {
|
|
||||||
ninepostion.value[index].x = 0
|
|
||||||
ninepostion.value[index].y = div.value.offsetHeight - 25
|
|
||||||
}
|
|
||||||
if (index == 7) {
|
|
||||||
ninepostion.value[index].x = div.value.offsetWidth / 2
|
|
||||||
ninepostion.value[index].y = div.value.offsetHeight - 25
|
|
||||||
}
|
|
||||||
if (index == 8) {
|
|
||||||
ninepostion.value[index].x = div.value.offsetWidth - 25
|
|
||||||
ninepostion.value[index].y = div.value.offsetHeight - 25
|
|
||||||
}
|
|
||||||
nine.value[index].x = config.point9[index].def_x
|
nine.value[index].x = config.point9[index].def_x
|
||||||
nine.value[index].y = config.point9[index].def_y
|
nine.value[index].y = config.point9[index].def_y
|
||||||
isshowarray.value[index] = false
|
isshowarray.value[index] = false
|
||||||
|
|
|
@ -152,9 +152,22 @@ export default defineComponent({
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const erroe=()=>{
|
||||||
|
$q.notify({
|
||||||
|
color: "negative",
|
||||||
|
icon: "warning",
|
||||||
|
message:"数据获取失败!",
|
||||||
|
position: "top",
|
||||||
|
timeout: 1500,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
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);})
|
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);})
|
||||||
|
//let textdata="{\"col\":2,\"enable\":true,\"projectors\":[{\"col\":0,\"height\":1080,\"hor_density\":[{\"def_x\":0,\"def_y\":540,\"number\":1,\"x\":0,\"y\":540},{\"def_x\":480,\"def_y\":540,\"number\":2,\"x\":480,\"y\":540},{\"def_x\":960,\"def_y\":540,\"number\":3,\"x\":960,\"y\":540},{\"def_x\":1440,\"def_y\":540,\"number\":4,\"x\":1440,\"y\":540},{\"def_x\":1920,\"def_y\":540,\"number\":5,\"x\":1920,\"y\":540}],\"params\":[{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0},{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0},{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0},{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0}],\"point4\":[{\"def_x\":0,\"def_y\":1080,\"number\":1,\"x\":0,\"y\":1080},{\"def_x\":1920,\"def_y\":1080,\"number\":2,\"x\":1171,\"y\":712},{\"def_x\":0,\"def_y\":0,\"number\":3,\"x\":0,\"y\":0},{\"def_x\":1920,\"def_y\":0,\"number\":4,\"x\":1920,\"y\":0}],\"point9\":[{\"def_x\":0,\"def_y\":1080,\"number\":1,\"x\":0,\"y\":1080},{\"def_x\":960,\"def_y\":1080,\"number\":2,\"x\":960,\"y\":1080},{\"def_x\":1920,\"def_y\":1080,\"number\":3,\"x\":1920,\"y\":1080},{\"def_x\":0,\"def_y\":540,\"number\":4,\"x\":0,\"y\":540},{\"def_x\":960,\"def_y\":540,\"number\":5,\"x\":960,\"y\":540},{\"def_x\":1920,\"def_y\":540,\"number\":6,\"x\":1920,\"y\":540},{\"def_x\":0,\"def_y\":0,\"number\":7,\"x\":0,\"y\":0},{\"def_x\":960,\"def_y\":0,\"number\":8,\"x\":960,\"y\":0},{\"def_x\":1920,\"def_y\":0,\"number\":9,\"x\":1920,\"y\":0}],\"row\":0,\"ver_density\":[{\"def_x\":960,\"def_y\":1080,\"number\":1,\"x\":960,\"y\":1080},{\"def_x\":960,\"def_y\":810,\"number\":2,\"x\":960,\"y\":810},{\"def_x\":960,\"def_y\":540,\"number\":3,\"x\":960,\"y\":540},{\"def_x\":960,\"def_y\":270,\"number\":4,\"x\":960,\"y\":270},{\"def_x\":960,\"def_y\":0,\"number\":5,\"x\":960,\"y\":0}],\"width\":1920},{\"col\":1,\"height\":1080,\"hor_density\":[{\"def_x\":0,\"def_y\":540,\"number\":1,\"x\":0,\"y\":540},{\"def_x\":480,\"def_y\":540,\"number\":2,\"x\":480,\"y\":540},{\"def_x\":960,\"def_y\":540,\"number\":3,\"x\":960,\"y\":540},{\"def_x\":1440,\"def_y\":540,\"number\":4,\"x\":1440,\"y\":540},{\"def_x\":1920,\"def_y\":540,\"number\":5,\"x\":1920,\"y\":540}],\"params\":[{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0},{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0},{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0},{\"alpha\":0.5,\"enable\":false,\"gamma\":2.200000047683716,\"power\":2.0,\"size\":0}],\"point4\":[{\"def_x\":0,\"def_y\":1080,\"number\":1,\"x\":0,\"y\":1080},{\"def_x\":1920,\"def_y\":1080,\"number\":2,\"x\":1920,\"y\":1080},{\"def_x\":0,\"def_y\":0,\"number\":3,\"x\":0,\"y\":0},{\"def_x\":1920,\"def_y\":0,\"number\":4,\"x\":1920,\"y\":0}],\"point9\":[{\"def_x\":0,\"def_y\":1080,\"number\":1,\"x\":0,\"y\":1080},{\"def_x\":960,\"def_y\":1080,\"number\":2,\"x\":960,\"y\":1080},{\"def_x\":1920,\"def_y\":1080,\"number\":3,\"x\":1920,\"y\":1080},{\"def_x\":0,\"def_y\":540,\"number\":4,\"x\":0,\"y\":540},{\"def_x\":960,\"def_y\":540,\"number\":5,\"x\":960,\"y\":540},{\"def_x\":1920,\"def_y\":540,\"number\":6,\"x\":1920,\"y\":540},{\"def_x\":0,\"def_y\":0,\"number\":7,\"x\":0,\"y\":0},{\"def_x\":960,\"def_y\":0,\"number\":8,\"x\":960,\"y\":0},{\"def_x\":1920,\"def_y\":0,\"number\":9,\"x\":1920,\"y\":0}],\"row\":0,\"ver_density\":[{\"def_x\":960,\"def_y\":1080,\"number\":1,\"x\":960,\"y\":1080},{\"def_x\":960,\"def_y\":810,\"number\":2,\"x\":960,\"y\":810},{\"def_x\":960,\"def_y\":540,\"number\":3,\"x\":960,\"y\":540},{\"def_x\":960,\"def_y\":270,\"number\":4,\"x\":960,\"y\":270},{\"def_x\":960,\"def_y\":0,\"number\":5,\"x\":960,\"y\":0}],\"width\":1920}],\"row\":1,\"screen_height\":0,\"screen_width\":0}"
|
||||||
|
//let tmp=JSON.parse(textdata);EnableBlending.value=tmp.enable;$store.commit("setEnablefusion", tmp.enable);config.value.col=tmp.col;config.value.row=tmp.row;$store.commit("setfusion_configuration", textdata)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue