修复切换投影仪时发送数据
This commit is contained in:
parent
063d9d8652
commit
b00fb02efb
|
@ -4,30 +4,30 @@
|
||||||
<div class="col-8 q-pt-md">
|
<div class="col-8 q-pt-md">
|
||||||
<div ref="div" style="width: 100%; background-color: #646464; height: 100%">
|
<div ref="div" style="width: 100%; background-color: #646464; height: 100%">
|
||||||
<div style="position: absolute">
|
<div style="position: absolute">
|
||||||
<Vue3DraggableResizable :class="[options_model_v==index?'action':'']" v-for="(item, index) in config.ver_density.length" :initW="20" :initH="20"
|
<Vue3DraggableResizable :class="[options_model_v==index?'action':'point']" v-for="(item, index) in config.ver_density.length" :initW="20" :initH="20"
|
||||||
:resizable="false" :x="0" v-model:y="point_postion[index].y" :disabledX="true"
|
:resizable="false" :x="0" v-model:y="point_postion[index].y" :disabledX="true"
|
||||||
@activated="now_index = index" @dragging="dragStartHandle($event, index, 'v')">
|
@activated="now_index =options_model_v= index" @click="options_model_v = index" @dragging="dragStartHandle($event, index, 'v')">
|
||||||
<span>v{{
|
<span>v{{
|
||||||
index+ 1
|
index+ 1
|
||||||
}}</span>
|
}}</span>
|
||||||
</Vue3DraggableResizable>
|
</Vue3DraggableResizable>
|
||||||
<Vue3DraggableResizable :class="[options_model_v==index?'action':'']" v-for="(item, index) in config.ver_density.length" :initW="20" :initH="20"
|
<Vue3DraggableResizable :class="[options_model_v==index?'action':'point']" v-for="(item, index) in config.ver_density.length" :initW="20" :initH="20"
|
||||||
:resizable="false" :x="max_x_y[0]" v-model:y="point_postion[index].y" @activated="now_index = index"
|
:resizable="false" :x="max_x_y[0]" @click="options_model_v = index" v-model:y="point_postion[index].y" @activated="now_index =options_model_v= index"
|
||||||
@dragging="dragStartHandle($event, index, 'v')">
|
@dragging="dragStartHandle($event, index, 'v')">
|
||||||
<span>v{{
|
<span>v{{
|
||||||
index+ 1
|
index+ 1
|
||||||
}}</span>
|
}}</span>
|
||||||
</Vue3DraggableResizable>
|
</Vue3DraggableResizable>
|
||||||
<Vue3DraggableResizable :class="[options_model_h==index+5?'action':'']" v-for="(item, index) in config.hor_density.length" :initW="20" :initH="20"
|
<Vue3DraggableResizable :class="[options_model_h==index+5?'action':'point']" v-for="(item, index) in config.hor_density.length" :initW="20" :initH="20"
|
||||||
:resizable="false" v-model:x="point_postion[index + 5].x" :y="-20" @activated="now_index = index + 5"
|
:resizable="false" v-model:x="point_postion[index + 5].x" :y="-20" @activated="now_index =options_model_h = index + 5"
|
||||||
:disabledY="true" @dragging="dragStartHandle($event, index + 5, 'h')">
|
:disabledY="true" @click="options_model_h = index+5 " @dragging="dragStartHandle($event, index, 'h')">
|
||||||
<span>h{{
|
<span>h{{
|
||||||
index+ 1
|
index+ 1
|
||||||
}}</span>
|
}}</span>
|
||||||
</Vue3DraggableResizable>
|
</Vue3DraggableResizable>
|
||||||
<Vue3DraggableResizable :class="[options_model_h==index+5?'action':'']" v-for="(item, index) in config.hor_density.length" :initW="20" :initH="20"
|
<Vue3DraggableResizable :class="[options_model_h==index+5?'action':'point']" v-for="(item, index) in config.hor_density.length" :initW="20" :initH="20"
|
||||||
:resizable="false" v-model:x="point_postion[index + 5].x" @activated="now_index = index + 5"
|
:resizable="false" v-model:x="point_postion[index + 5].x" @activated="now_index =options_model_h= index + 5"
|
||||||
:y="max_x_y[1] + 20" @dragging="dragStartHandle($event, index + 5, 'h')">
|
:y="max_x_y[1] + 20" @click="options_model_h = index+5" @dragging="dragStartHandle($event, index, 'h')">
|
||||||
<span>h{{
|
<span>h{{
|
||||||
index+ 1
|
index+ 1
|
||||||
}}</span>
|
}}</span>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<div class="col-2"></div>
|
<div class="col-2"></div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[index].y"
|
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[index].y"
|
||||||
@update:model-value="chang(index, $event)" label="y" lazy-rules />
|
@update:model-value="chang(index, $event,'v')" label="y" lazy-rules />
|
||||||
<q-btn size="sm" color="white" @click="reset(index)" text-color="black"
|
<q-btn size="sm" color="white" @click="reset(index)" text-color="black"
|
||||||
:label="$t('reset') + `v${index + 1}`" />
|
:label="$t('reset') + `v${index + 1}`" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box_son" v-for="(item, index) in 5">
|
<div class="box_son" v-for="(item, index) in 5">
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[index + 5].x" label="x"
|
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="value[index + 5].x" label="x"
|
||||||
@update:model-value="chang(index + 5, $event)" lazy-rules />
|
@update:model-value="chang(index + 5, $event,'h')" lazy-rules />
|
||||||
<q-btn size="sm" color="white" @click="reset(index + 5)" text-color="black"
|
<q-btn size="sm" color="white" @click="reset(index + 5)" text-color="black"
|
||||||
:label="$t('reset') + `h${index + 1}`" />
|
:label="$t('reset') + `h${index + 1}`" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,10 +68,10 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2"> <q-select class="q-pt-md" label="水平" :dense="true" filled v-model="options_model_v" :options="options_v" emit-value
|
<div class="col-2"> <q-select class="q-pt-md" :label="$t('level')" :dense="true" filled v-model="options_model_v" :options="options_v" emit-value
|
||||||
map-options /></div>
|
map-options /></div>
|
||||||
<div class="col-2"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
<div class="col-2"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
||||||
v-model="value[options_model_v].y" @update:model-value="chang(options_model_v, $event)" lazy-rules />
|
v-model="value[options_model_v].y" @update:model-value="chang(options_model_v, $event,'v')" lazy-rules />
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pt-md">
|
<div class="q-pt-md">
|
||||||
<q-btn color="white" @click="reset(options_model_v)" text-color="black" :label="$t('reset')" />
|
<q-btn color="white" @click="reset(options_model_v)" text-color="black" :label="$t('reset')" />
|
||||||
|
@ -79,13 +79,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2"> <q-select class="q-pt-md" label="垂直" :dense="true" filled v-model="options_model_h" :options="options_h" emit-value
|
<div class="col-2"> <q-select class="q-pt-md" :label="$t('vertical')" :dense="true" filled v-model="options_model_h" :options="options_h" emit-value
|
||||||
map-options /></div>
|
map-options /></div>
|
||||||
<div class="col-2"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
<div class="col-2"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
||||||
v-model="value[options_model_h].x" @update:model-value="chang(options_model_h, $event)" lazy-rules />
|
v-model="value[options_model_h].x" @update:model-value="chang(options_model_h, $event,'h')" lazy-rules />
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pt-md">
|
<div class="q-pt-md">
|
||||||
<q-btn color="white" @click="reset(options_model_v)" text-color="black" :label="$t('reset')" />
|
<q-btn color="white" @click="reset(options_model_h)" text-color="black" :label="$t('reset')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -119,7 +119,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.action {
|
.action {
|
||||||
background-color: aqua;
|
background-color: rgb(27, 180, 111);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.point{
|
||||||
|
background-color: rgb(186, 245, 245);
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -201,17 +206,19 @@ export default defineComponent({
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
const ste_status = ref(0);
|
const ste_status = ref(0);
|
||||||
|
|
||||||
const chang = (index: number, $event: any) => {
|
const chang = (index: number, $event: any,type:string) => {
|
||||||
let x = 0
|
let x = 0
|
||||||
let y = 0
|
let y = 0
|
||||||
if (index < 5) {
|
if (type=='v') {
|
||||||
x = default_location[9].y;
|
x = default_location[9].y;
|
||||||
y = Math.ceil((config.height - $event) / Proportion.value.y);
|
y = Math.ceil((config.height - $event) / Proportion.value.y);
|
||||||
send_configuration(index, $event,'v')
|
send_configuration(index, $event,'v')
|
||||||
|
options_model_v.value=index
|
||||||
} else {
|
} else {
|
||||||
x = Math.ceil($event / Proportion.value.x);
|
x = Math.ceil($event / Proportion.value.x);
|
||||||
y = default_location[0].x;
|
y = default_location[0].x;
|
||||||
send_configuration(index-5, $event,'h')
|
send_configuration(index, $event,'h')
|
||||||
|
options_model_h.value=index
|
||||||
}
|
}
|
||||||
point_postion[index].x = Number(x)
|
point_postion[index].x = Number(x)
|
||||||
point_postion[index].y = Number(y)
|
point_postion[index].y = Number(y)
|
||||||
|
@ -249,7 +256,7 @@ export default defineComponent({
|
||||||
sessionStorage.DensityCorrection = JSON.stringify(set_cache.value);
|
sessionStorage.DensityCorrection = JSON.stringify(set_cache.value);
|
||||||
});
|
});
|
||||||
watch(() => now_index, (newval, oldval) => {
|
watch(() => now_index, (newval, oldval) => {
|
||||||
now_index.value > 5 ? set?.SetBlendingOption("blending_grids_select_point", `density_h:${now_index.value - 4}`) : set?.SetBlendingOption("blending_grids_select_point", `density_v:${now_index.value + 1}`)
|
now_index.value > 4 ? set?.SetBlendingOption("blending_grids_select_point", `density_h:${now_index.value - 4}`) : set?.SetBlendingOption("blending_grids_select_point", `density_v:${now_index.value + 1}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
|
@ -471,7 +478,7 @@ export default defineComponent({
|
||||||
let obj_y = $event.y
|
let obj_y = $event.y
|
||||||
if (type == 'h') {
|
if (type == 'h') {
|
||||||
let x =
|
let x =
|
||||||
config.width / 4 * (index - 5) +
|
|
||||||
Math.ceil(
|
Math.ceil(
|
||||||
(obj_x - default_location[index].x) * Proportion.value.x
|
(obj_x - default_location[index].x) * Proportion.value.x
|
||||||
);
|
);
|
||||||
|
@ -481,7 +488,8 @@ export default defineComponent({
|
||||||
Math.ceil(
|
Math.ceil(
|
||||||
(obj_y - default_location[index].y) * Proportion.value.y
|
(obj_y - default_location[index].y) * Proportion.value.y
|
||||||
);
|
);
|
||||||
value[index].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
console.log(index, x,'h')
|
||||||
|
value[index+5].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
||||||
send_configuration(index, x,'h')
|
send_configuration(index, x,'h')
|
||||||
}
|
}
|
||||||
if (type == 'v') {
|
if (type == 'v') {
|
||||||
|
|
|
@ -449,6 +449,7 @@ export default defineComponent({
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
watch(() => now_index, (newval, oldval) => {
|
watch(() => now_index, (newval, oldval) => {
|
||||||
|
if(ste_status.value == 1)return
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `4:${now_index.value + 1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `4:${now_index.value + 1}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
//为了加载 缓存的配置时 同步点的位置
|
//为了加载 缓存的配置时 同步点的位置
|
||||||
|
|
|
@ -289,6 +289,7 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
|
|
||||||
const chang = (type: string) => {
|
const chang = (type: string) => {
|
||||||
|
if(ste_status.value == 1)return
|
||||||
if (type == "alpha") {
|
if (type == "alpha") {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion)
|
||||||
set?.setBlendingAlphaParam(
|
set?.setBlendingAlphaParam(
|
||||||
|
@ -384,7 +385,11 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
ste_status.value = 1;
|
||||||
startconfig();
|
startconfig();
|
||||||
|
setTimeout(() => {
|
||||||
|
ste_status.value = 0;
|
||||||
|
}, 100);
|
||||||
}),
|
}),
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
|
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
|
||||||
|
@ -393,7 +398,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[0].value,
|
() => array[0].value,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -409,7 +414,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[1].value,
|
() => array[1].value,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -425,7 +430,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[2].value,
|
() => array[2].value,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -441,7 +446,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[3].value,
|
() => array[3].value,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -458,7 +463,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[0].isshow,
|
() => array[0].isshow,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -473,7 +478,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[1].isshow,
|
() => array[1].isshow,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -489,7 +494,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[2].isshow,
|
() => array[2].isshow,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
@ -505,7 +510,7 @@ export default defineComponent({
|
||||||
watch(
|
watch(
|
||||||
() => array[3].isshow,
|
() => array[3].isshow,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
if ($store.state.enablefusion)
|
if ($store.state.enablefusion&&ste_status.value==0)
|
||||||
set?.SetBlendingOverlap(
|
set?.SetBlendingOverlap(
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
|
|
|
@ -450,5 +450,7 @@ export default {
|
||||||
"Please enter a value within the range":"Please enter a value within the range",
|
"Please enter a value within the range":"Please enter a value within the range",
|
||||||
"vertical correction":"vertical correction",
|
"vertical correction":"vertical correction",
|
||||||
"horizontal correction":"horizontal correction",
|
"horizontal correction":"horizontal correction",
|
||||||
"line width":"line width"
|
"line width":"line width",
|
||||||
|
"level":"level",
|
||||||
|
"vertical":"vertical"
|
||||||
};
|
};
|
||||||
|
|
|
@ -719,5 +719,7 @@ export default {
|
||||||
"Please enter a value within the range":"请输入范围内的值",
|
"Please enter a value within the range":"请输入范围内的值",
|
||||||
"vertical correction":"垂直校正",
|
"vertical correction":"垂直校正",
|
||||||
"horizontal correction":"水平校正",
|
"horizontal correction":"水平校正",
|
||||||
"line width":"线宽"
|
"line width":"线宽",
|
||||||
|
"level":"水平",
|
||||||
|
"vertical":"垂直"
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue