修复 融合设置参数同步问题 投影机布局从后端获取

This commit is contained in:
shefengchun 2023-03-01 11:19:56 +08:00
parent 44aadff1d2
commit 14076866ec
3 changed files with 33 additions and 26 deletions

View File

@ -398,7 +398,6 @@ export default defineComponent({
}
}, { deep: true })
watch(() => value_v_point_amount, (newval, oldval) => {
console.log("🚀 ~ file: DensityCorrection.vue:401 ~ watch ~ newval:", newval)
setTimeout(() => {
if (now_v_h.value != 'level') {

View File

@ -8,7 +8,7 @@
<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 dense filled type="number" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''"
@ -30,7 +30,7 @@
<div class="col-6">
<div class="row">
<div class="col-3">
<q-toggle class="float-right" v-model="array[1].isshow" label="" />
<q-toggle class="float-right" @click="group = 1" v-model="array[1].isshow" label="" />
</div>
<div class="col-6">
<q-input dense filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''"
@ -48,7 +48,7 @@
<div class="col-6">
<div class="row">
<div class="col-3">
<q-toggle class="float-right" v-model="array[2].isshow" label="" />
<q-toggle class="float-right" @click="group = 2" v-model="array[2].isshow" label="" />
</div>
<div class="col-6">
<q-input dense filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''"
@ -552,8 +552,7 @@ export default defineComponent({
};
const left_right_auto_add = (difference: number) => {
let tmpobjall = JSON.parse($store.state.fusion_configuration)
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0) {
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0&&group.value==2) {
let tmp = set_cache.value[1] == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]);
let set_cache_tmp: any = []
if (tmp[1].hasOwnProperty("power")) {
@ -574,7 +573,7 @@ export default defineComponent({
set_cache.value[1] = JSON.stringify(set_cache_tmp);
}
}
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1) {
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1&&group.value==1) {
let tmp = set_cache.value[0] == null ? tmpobjall.projectors[0].params : JSON.parse(set_cache.value[0]);
let set_cache_tmp: any = []

View File

@ -538,9 +538,21 @@ export default defineComponent({
allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]};
now_resolution.value=0
}
for (let index = 0; index < projectorlayout.length; index++) {
let arr = projectorlayout[index].label.split('x');
if(tmp.col==Number(arr[0])&&tmp.row==Number(arr[1])){
projectorlayout.value=[]
for (let index = 0; index < tmp.max_projector_count; index++) {
for (let indexx = 0; indexx < tmp.max_projector_count; indexx++) {
if(index*tmp.max_projector_count+indexx>tmp.max_projector_count){
continue
}else{
projectorlayout.value.push({ label: `${index+1}x${indexx+1}`, value: index*tmp.max_projector_count+indexx })
}
}
}
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if(tmp.col==Number(arr[1])&&tmp.row==Number(arr[0])){
now_select_projectorlayout.value=index
}
}
@ -568,13 +580,13 @@ export default defineComponent({
allconfig = tmp
for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*');
if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){
if(tmp.projector_width==Number(arr[1])&&tmp.projector_height==Number(arr[0])){
now_resolution.value=index
}
}
for (let index = 0; index < projectorlayout.length; index++) {
let arr = projectorlayout[index].label.split('x');
if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if(tmp.row==Number(arr[1])&&tmp.col==Number(arr[0])){
now_select_projectorlayout.value=index
}
}
@ -635,13 +647,10 @@ export default defineComponent({
* 依赖注入
*/
provide("now_selsect_projector",now_selsect_projector);
/**
* 设置投影机布局
*/
const projectorlayout=[{label:'1x1',value:0},{label:'1x2',value:1}]
let projectorlayout=ref([{label:'1x1',value:0},{label:'1x2',value:1}])
const now_select_projectorlayout=ref(1)
const send_projectorlayout=(val:number) => {
let arr = projectorlayout[val].label.split('x');
let arr = projectorlayout.value[val].label.split('x');
set?.SetProjectorLayout(Number(arr[0]),Number(arr[1])).then(res => {
let tmpp=JSON.parse(res!.config)
config.value.row = tmpp.row;
@ -650,9 +659,9 @@ export default defineComponent({
message: 'Loading please wait'
})
$store.commit("setfusion_configuration", res?.config);
for (let index = 0; index < projectorlayout.length; index++) {
let arr = projectorlayout[index].label.split('x');
if(tmpp.col==Number(arr[0])&&tmpp.row==Number(arr[1])){
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if(tmpp.col==Number(arr[1])&&tmpp.row==Number(arr[0])){
now_select_projectorlayout.value=index
}
}
@ -708,14 +717,14 @@ export default defineComponent({
let tmp = JSON.parse($store.state.fusion_configuration);
for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*');
if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){
if(tmp.projector_width==Number(arr[1])&&tmp.projector_height==Number(arr[0])){
now_resolution.value=index
}
}
for (let index = 0; index < projectorlayout.length; index++) {
let arr = projectorlayout[index].label.split('x');
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){
if(tmp.row==Number(arr[1])&&tmp.col==Number(arr[0])){
now_select_projectorlayout.value=index
}
}