规范代码
This commit is contained in:
parent
6d3a838cfa
commit
5ca7e6e495
File diff suppressed because it is too large
Load Diff
|
@ -1,42 +1,119 @@
|
|||
<template>
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<q-input filled type="number" class="q-pt-md" style="text-align: center;" :dense="true"
|
||||
@focus="isactivearray[0] = false" v-model="four[0].x" label="x" lazy-rules />
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[0] = false"
|
||||
v-model="four[0].y" label="y" lazy-rules />
|
||||
<q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset') +$t('point') +'1'" />
|
||||
</div>
|
||||
<div class="col-8">
|
||||
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
style="text-align: center"
|
||||
:dense="true"
|
||||
@focus="isactivearray[0] = false"
|
||||
v-model="four[0].x"
|
||||
label="x"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[0] = false"
|
||||
v-model="four[0].y"
|
||||
label="y"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-btn
|
||||
color="white"
|
||||
@click="reset(0)"
|
||||
text-color="black"
|
||||
:label="$t('reset') + $t('point') + '1'"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-8"></div>
|
||||
<div class="col-2">
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[1] = false"
|
||||
v-model="four[1].x" label="x" lazy-rules />
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[1] = false"
|
||||
v-model="four[1].y" label="y" lazy-rules />
|
||||
<q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset') +$t('point') +'2'" />
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[1] = false"
|
||||
v-model="four[1].x"
|
||||
label="x"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[1] = false"
|
||||
v-model="four[1].y"
|
||||
label="y"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-btn
|
||||
color="white"
|
||||
@click="reset(1)"
|
||||
text-color="black"
|
||||
:label="$t('reset') + $t('point') + '2'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8">
|
||||
<div ref="div" style="background-color: #7fffd4;height: 40vh;">
|
||||
<div style="position:absolute;">
|
||||
<vue3ResizeDrag v-if="isshowarray[0]" :isActive="isactivearray[0]" @mousedown="activeMouseDown(0)"
|
||||
@mouseUpHandler="mouseUpHandler(0)" :w="30" :h="20" :x="points[0].x" :y="points[0].y"
|
||||
:isResizable="false" @moveHandler="moveHandler_1"><span>{{ $t('point') }}1</span>
|
||||
<div ref="div" style="background-color: #7fffd4; height: 40vh">
|
||||
<div style="position: absolute">
|
||||
<vue3ResizeDrag
|
||||
v-if="isshowarray[0]"
|
||||
:isActive="isactivearray[0]"
|
||||
@mousedown="activeMouseDown(0)"
|
||||
@mouseUpHandler="mouseUpHandler(0)"
|
||||
:w="30"
|
||||
:h="20"
|
||||
:x="points[0].x"
|
||||
:y="points[0].y"
|
||||
:isResizable="false"
|
||||
@moveHandler="moveHandler_1"
|
||||
><span>{{ $t("point") }}1</span>
|
||||
</vue3ResizeDrag>
|
||||
<vue3ResizeDrag v-if="isshowarray[1]" :isActive="isactivearray[1]" @mousedown="activeMouseDown(1)"
|
||||
@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>
|
||||
<vue3ResizeDrag
|
||||
v-if="isshowarray[1]"
|
||||
:isActive="isactivearray[1]"
|
||||
@mousedown="activeMouseDown(1)"
|
||||
@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>
|
||||
</vue3ResizeDrag>
|
||||
<vue3ResizeDrag v-if="isshowarray[2]" :isActive="isactivearray[2]" @mousedown="activeMouseDown(2)"
|
||||
@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>
|
||||
<vue3ResizeDrag
|
||||
v-if="isshowarray[2]"
|
||||
:isActive="isactivearray[2]"
|
||||
@mousedown="activeMouseDown(2)"
|
||||
@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>
|
||||
</vue3ResizeDrag>
|
||||
<vue3ResizeDrag v-if="isshowarray[3]" :isActive="isactivearray[3]" @mousedown="activeMouseDown(3)"
|
||||
@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>
|
||||
<vue3ResizeDrag
|
||||
v-if="isshowarray[3]"
|
||||
:isActive="isactivearray[3]"
|
||||
@mousedown="activeMouseDown(3)"
|
||||
@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>
|
||||
</vue3ResizeDrag>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,107 +121,188 @@
|
|||
<div class="col-2"></div>
|
||||
|
||||
<div class="col-2">
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[2] = false"
|
||||
v-model="four[2].x" label="x" lazy-rules />
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[2] = false"
|
||||
v-model="four[2].y" label="y" lazy-rules />
|
||||
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset') +$t('point') +'3'" />
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[2] = false"
|
||||
v-model="four[2].x"
|
||||
label="x"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[2] = false"
|
||||
v-model="four[2].y"
|
||||
label="y"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-btn
|
||||
color="white"
|
||||
@click="reset(2)"
|
||||
text-color="black"
|
||||
:label="$t('reset') + $t('point') + '3'"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" />
|
||||
<q-btn
|
||||
color="white"
|
||||
@click="resetall"
|
||||
text-color="black"
|
||||
:label="$t('resetall')"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false"
|
||||
v-model="four[3].x" label="x" lazy-rules />
|
||||
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false"
|
||||
v-model="four[3].y" label="y" lazy-rules />
|
||||
<q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset') +$t('point') +'4'" />
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[3] = false"
|
||||
v-model="four[3].x"
|
||||
label="x"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
class="q-pt-md"
|
||||
:dense="true"
|
||||
@focus="isactivearray[3] = false"
|
||||
v-model="four[3].y"
|
||||
label="y"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-btn
|
||||
color="white"
|
||||
@click="reset(3)"
|
||||
text-color="black"
|
||||
:label="$t('reset') + $t('point') + '4'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
<script lang="ts">
|
||||
import vue3ResizeDrag from "src/third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue";
|
||||
import { dom } from 'quasar'
|
||||
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"
|
||||
import ClientConnection from "src/common/ClientConnection";
|
||||
import GlobalData from "src/common/GlobalData";
|
||||
import { json } from "body-parser";
|
||||
|
||||
export default defineComponent({
|
||||
name: "ComponentFourPointCalibration",
|
||||
components: {
|
||||
vue3ResizeDrag
|
||||
vue3ResizeDrag,
|
||||
},
|
||||
setup() {
|
||||
let $store = useStore();
|
||||
let $t = useI18n();
|
||||
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||
let set = GlobalData.getInstance().getCurrentClient();
|
||||
const configselsect = computed(() => { return $store.state.selected_projector })
|
||||
const configselsect = computed(() => {
|
||||
return $store.state.selected_projector;
|
||||
});
|
||||
//用于计算当前投影仪的索引
|
||||
let serverconfig = JSON.parse($store.state.fusion_configuration);
|
||||
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 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 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 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 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 div: any = ref(null);
|
||||
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 }]);//点的位置
|
||||
const isshowarray = ref([true, true, true, true])
|
||||
const isactivearray = ref([true, true, true, true])
|
||||
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 save = () => {
|
||||
set?.SaveBlendingConfig("")
|
||||
set?.SaveBlendingConfig("");
|
||||
setTimeout(() => {
|
||||
set?.GetBlendingConfig("").then((res) => { $store.commit("setfusion_configuration", res?.config); })
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
///
|
||||
};
|
||||
const use_set_cache = () => {
|
||||
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))
|
||||
|
||||
deepcopy(four, tmp);
|
||||
}
|
||||
syncpoint()
|
||||
syncpoint();
|
||||
};
|
||||
const deepcopy = (o1: any, o2: any) => {
|
||||
for (let k in o2) {
|
||||
if (typeof o2[k] === 'object') {
|
||||
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);
|
||||
}
|
||||
};
|
||||
onBeforeUnmount(() => {
|
||||
sessionStorage.FourPointCalibration = JSON.stringify(set_cache.value)
|
||||
})
|
||||
///
|
||||
sessionStorage.FourPointCalibration = JSON.stringify(set_cache.value);
|
||||
});
|
||||
const activeMouseDown = (index: number) => {
|
||||
isactivearray.value[index] = true
|
||||
}
|
||||
isactivearray.value[index] = true;
|
||||
};
|
||||
const mouseUpHandler = (index: number) => {
|
||||
isactivearray.value[index] = false
|
||||
}
|
||||
isactivearray.value[index] = false;
|
||||
};
|
||||
onMounted(() => {
|
||||
ste_status.value = 1;
|
||||
setpoa();
|
||||
|
@ -152,242 +310,315 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
})
|
||||
});
|
||||
|
||||
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;
|
||||
defaultfour.value[index].x = config.point4[index].def_x
|
||||
defaultfour.value[index].y = config.point4[index].def_y
|
||||
four[index].x = config.point4[index].x
|
||||
four[index].y = config.point4[index].y
|
||||
}
|
||||
defaultfour.value[index].x = config.point4[index].def_x;
|
||||
defaultfour.value[index].y = config.point4[index].def_y;
|
||||
four[index].x = config.point4[index].x;
|
||||
four[index].y = config.point4[index].y;
|
||||
}
|
||||
};
|
||||
|
||||
const setpoa = () => {
|
||||
points[0].x = 0;
|
||||
points[0].y = 0;
|
||||
|
||||
points[0].x = 0
|
||||
points[0].y = 0
|
||||
points[1].x = div.value.offsetWidth - 25;
|
||||
points[1].y = 0;
|
||||
|
||||
points[1].x = div.value.offsetWidth - 25
|
||||
points[1].y = 0
|
||||
points[2].x = 0;
|
||||
points[2].y = div.value.offsetHeight - 25;
|
||||
|
||||
points[2].x = 0
|
||||
points[2].y = div.value.offsetHeight - 25
|
||||
points[3].x = div.value.offsetWidth - 25;
|
||||
points[3].y = div.value.offsetHeight - 25;
|
||||
|
||||
points[3].x = div.value.offsetWidth - 25
|
||||
points[3].y = div.value.offsetHeight - 25
|
||||
fourpostion.value[0].x = 0;
|
||||
fourpostion.value[0].y = 0;
|
||||
|
||||
fourpostion.value[1].x = div.value.offsetWidth - 25;
|
||||
fourpostion.value[1].y = 0;
|
||||
|
||||
fourpostion.value[2].x = 0;
|
||||
fourpostion.value[2].y = div.value.offsetHeight - 25;
|
||||
|
||||
fourpostion.value[0].x = 0
|
||||
fourpostion.value[0].y = 0
|
||||
fourpostion.value[3].x = div.value.offsetWidth - 25;
|
||||
fourpostion.value[3].y = div.value.offsetHeight - 25;
|
||||
|
||||
fourpostion.value[1].x = div.value.offsetWidth - 25
|
||||
fourpostion.value[1].y = 0
|
||||
|
||||
fourpostion.value[2].x = 0
|
||||
fourpostion.value[2].y = div.value.offsetHeight - 25
|
||||
|
||||
fourpostion.value[3].x = div.value.offsetWidth - 25
|
||||
fourpostion.value[3].y = div.value.offsetHeight - 25
|
||||
|
||||
Proportion.value.x = config.width / (div.value.offsetWidth - 25)
|
||||
Proportion.value.y = config.height / (div.value.offsetHeight - 25)
|
||||
Proportion.value.x = config.width / (div.value.offsetWidth - 25);
|
||||
Proportion.value.y = config.height / (div.value.offsetHeight - 25);
|
||||
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;
|
||||
defaultfour.value[index].x = config.point4[index].def_x
|
||||
defaultfour.value[index].y = config.point4[index].def_y
|
||||
four[index].x = config.point4[index].x
|
||||
four[index].y = config.point4[index].y
|
||||
defaultfour.value[index].x = config.point4[index].def_x;
|
||||
defaultfour.value[index].y = config.point4[index].def_y;
|
||||
four[index].x = config.point4[index].x;
|
||||
four[index].y = config.point4[index].y;
|
||||
}
|
||||
if (sessionStorage.FourPointCalibration && sessionStorage.FourPointCalibration.length > 0) {
|
||||
if (
|
||||
sessionStorage.FourPointCalibration &&
|
||||
sessionStorage.FourPointCalibration.length > 0
|
||||
) {
|
||||
set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
|
||||
use_set_cache()
|
||||
use_set_cache();
|
||||
} 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));
|
||||
set_point_x();
|
||||
};
|
||||
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 (!isactivearray.value[0]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
points[0].x = x
|
||||
points[0].y = y
|
||||
isshowarray.value[0] = false
|
||||
isactivearray.value[0] = false
|
||||
let y = Math.ceil((config.height - newVal.y) / Proportion.value.y);
|
||||
points[0].x = x;
|
||||
points[0].y = y;
|
||||
isshowarray.value[0] = false;
|
||||
isactivearray.value[0] = false;
|
||||
setTimeout(() => {
|
||||
isshowarray.value[0] = true
|
||||
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));
|
||||
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 (!isactivearray.value[1]) {
|
||||
let x = Math.ceil(newVal.x / Proportion.value.x);
|
||||
let y = Math.ceil(((config.height - newVal.y) / Proportion.value.y));
|
||||
points[1].x = x
|
||||
points[1].y = y
|
||||
isshowarray.value[1] = false
|
||||
isactivearray.value[1] = false
|
||||
let y = Math.ceil((config.height - newVal.y) / Proportion.value.y);
|
||||
points[1].x = x;
|
||||
points[1].y = y;
|
||||
isshowarray.value[1] = false;
|
||||
isactivearray.value[1] = false;
|
||||
setTimeout(() => {
|
||||
isshowarray.value[1] = true
|
||||
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));
|
||||
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 (!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));
|
||||
let y = Math.ceil(
|
||||
config.height / Proportion.value.y - newVal.y / Proportion.value.y
|
||||
);
|
||||
|
||||
points[2].x = x
|
||||
points[2].y = y
|
||||
isshowarray.value[2] = false
|
||||
points[2].x = x;
|
||||
points[2].y = y;
|
||||
isshowarray.value[2] = false;
|
||||
setTimeout(() => {
|
||||
isshowarray.value[2] = true
|
||||
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));
|
||||
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 (!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));
|
||||
let y = Math.ceil(
|
||||
config.height / Proportion.value.y - newVal.y / Proportion.value.y
|
||||
);
|
||||
|
||||
points[3].x = x
|
||||
points[3].y = y
|
||||
isshowarray.value[3] = false
|
||||
points[3].x = x;
|
||||
points[3].y = y;
|
||||
isshowarray.value[3] = false;
|
||||
setTimeout(() => {
|
||||
isshowarray.value[3] = true
|
||||
isshowarray.value[3] = true;
|
||||
}, 100);
|
||||
|
||||
}
|
||||
save_set_cache()
|
||||
}, { deep: true })
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
|
||||
watch(() => configselsect, (newVal, oldVal) => {
|
||||
watch(
|
||||
() => configselsect,
|
||||
(newVal, oldVal) => {
|
||||
let tmp = JSON.parse($store.state.fusion_configuration);
|
||||
let fortmp = null
|
||||
let i
|
||||
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))
|
||||
if (
|
||||
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
|
||||
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||
) {
|
||||
fortmp = JSON.parse(JSON.stringify(i));
|
||||
}
|
||||
}
|
||||
ste_status.value = 1;
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
//setpoa();
|
||||
use_server_config()
|
||||
use_set_cache()
|
||||
config = JSON.parse(JSON.stringify(fortmp));
|
||||
use_server_config();
|
||||
use_set_cache();
|
||||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
set_point_x()
|
||||
}, { deep: true })
|
||||
set_point_x();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
//为了加载 缓存的配置时 同步点的位置
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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
|
||||
points[index].x = x;
|
||||
points[index].y = y;
|
||||
isshowarray.value[index] = false;
|
||||
isactivearray.value[index] = false;
|
||||
setTimeout(() => {
|
||||
isshowarray.value[index] = true
|
||||
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;
|
||||
|
||||
four[index].x = config.point4[index].def_x
|
||||
four[index].y = config.point4[index].def_y
|
||||
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
|
||||
isshowarray.value[index] = false;
|
||||
setTimeout(() => {
|
||||
isshowarray.value[index] = true
|
||||
isshowarray.value[index] = true;
|
||||
}, 100);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
const resetall = () => {
|
||||
for (let index = 0; index < fourpostion.value.length; index++) {
|
||||
reset(index)
|
||||
}
|
||||
|
||||
reset(index);
|
||||
}
|
||||
};
|
||||
|
||||
const moveHandler_1 = (data: any) => {
|
||||
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 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
|
||||
);
|
||||
|
||||
four[0].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
||||
four[0].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||
isactivearray.value[0] = true
|
||||
save_set_cache()
|
||||
}
|
||||
isactivearray.value[0] = true;
|
||||
save_set_cache();
|
||||
};
|
||||
const moveHandler_2 = (data: any) => {
|
||||
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 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
|
||||
);
|
||||
four[1].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
||||
four[1].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||
save_set_cache()
|
||||
}
|
||||
save_set_cache();
|
||||
};
|
||||
const moveHandler_3 = (data: any) => {
|
||||
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 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)
|
||||
);
|
||||
four[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
||||
four[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||
save_set_cache()
|
||||
}
|
||||
save_set_cache();
|
||||
};
|
||||
const moveHandler_4 = (data: any) => {
|
||||
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 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)
|
||||
);
|
||||
four[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
|
||||
four[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
|
||||
save_set_cache()
|
||||
}
|
||||
save_set_cache();
|
||||
};
|
||||
//窗口变动重新渲染
|
||||
onMounted(() => {
|
||||
//监听窗口变化
|
||||
|
@ -417,7 +648,7 @@ export default defineComponent({
|
|||
isactivearray,
|
||||
activeMouseDown,
|
||||
mouseUpHandler,
|
||||
points
|
||||
points,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,25 +1,37 @@
|
|||
<template>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- <p class="text-center">{{ $t('Set the fusion band width') }}</p> -->
|
||||
<div style="height: 1rem;"></div>
|
||||
<div style="height: 1rem"></div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<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" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''"
|
||||
@focus="group = 0" v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
:autofocus="group == 0"
|
||||
: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 !== null && val !== '') ||
|
||||
$t('Please enter a number'),
|
||||
(val) =>
|
||||
(val > -1 && val < 1080) || $t('Please enter 0-100'),
|
||||
]" />
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,34 +42,60 @@
|
|||
<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"
|
||||
v-model="array[1].isshow"
|
||||
label=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''"
|
||||
@focus="group = 1" v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
:autofocus="group == 1"
|
||||
: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 !== null && val !== '') ||
|
||||
$t('Please enter a number'),
|
||||
(val) =>
|
||||
(val > -1 && val < 1920) || $t('Please enter 0-100'),
|
||||
]" />
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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"
|
||||
v-model="array[2].isshow"
|
||||
label=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''"
|
||||
@focus="group = 2" v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
:autofocus="group == 2"
|
||||
: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 !== null && val !== '') ||
|
||||
$t('Please enter a number'),
|
||||
(val) =>
|
||||
(val > -1 && val < 1920) || $t('Please enter 0-100'),
|
||||
]" />
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,51 +106,94 @@
|
|||
<div class="col-4 offset-4">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<q-toggle class="float-right" v-model="array[3].isshow" label="" />
|
||||
<q-toggle
|
||||
class="float-right"
|
||||
v-model="array[3].isshow"
|
||||
label=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-input filled type="number" :autofocus="group == 3" :bg-color="group == 3 ? 'cyan-1' : ''"
|
||||
@focus="group = 3" v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules
|
||||
<q-input
|
||||
filled
|
||||
type="number"
|
||||
:autofocus="group == 3"
|
||||
: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 !== null && val !== '') ||
|
||||
$t('Please enter a number'),
|
||||
(val) =>
|
||||
(val > -1 && val < 1080) || $t('Please enter 0-100'),
|
||||
]" />
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 offset-4" v-if="group != 4">
|
||||
<p class="text-center">{{ $t('Set Fusion Band Parameters') }}</p>
|
||||
<p class="text-center">{{ $t("Set Fusion Band Parameters") }}</p>
|
||||
<div style="display: flex; justify-content: space-evenly">
|
||||
<div>
|
||||
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
|
||||
vertical reverse label-always />
|
||||
<q-slider
|
||||
v-model="array[group].alpha"
|
||||
:min="0.0"
|
||||
@change="chang('alpha')"
|
||||
:max="1"
|
||||
:step="0.01"
|
||||
color="green"
|
||||
vertical
|
||||
reverse
|
||||
label-always
|
||||
/>
|
||||
<p class="text-center">alpha</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="2.5" :step="0.01" color="green"
|
||||
vertical reverse label-always />
|
||||
<q-slider
|
||||
v-model="array[group].p"
|
||||
:min="0"
|
||||
@change="chang('p')"
|
||||
:max="2.5"
|
||||
:step="0.01"
|
||||
color="green"
|
||||
vertical
|
||||
reverse
|
||||
label-always
|
||||
/>
|
||||
<p class="text-center">p</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="2.5" :step="0.01" color="green"
|
||||
vertical reverse label-always />
|
||||
<q-slider
|
||||
v-model="array[group].gamma"
|
||||
:min="0"
|
||||
@change="chang('gamma')"
|
||||
:max="2.5"
|
||||
:step="0.01"
|
||||
color="green"
|
||||
vertical
|
||||
reverse
|
||||
label-always
|
||||
/>
|
||||
<p class="text-center">gamma</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" />
|
||||
<q-btn
|
||||
color="white"
|
||||
@click="resetall"
|
||||
text-color="black"
|
||||
:label="$t('resetall')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -155,56 +236,69 @@ export default defineComponent({
|
|||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||
]);
|
||||
//正确的 索引编号
|
||||
let arr = [1, 0, 2, 3]
|
||||
let arr = [1, 0, 2, 3];
|
||||
let serverconfig = JSON.parse($store.state.fusion_configuration);
|
||||
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 ste_status = ref(0);
|
||||
const use_set_cache = () => {
|
||||
if (set_cache.value[selectedprojector.value] != null) {
|
||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||
deepcopy(array, tmp)
|
||||
deepcopy(array, tmp);
|
||||
}
|
||||
};
|
||||
const deepcopy = (o1: any, o2: any) => {
|
||||
for (let k in o2) {
|
||||
if (typeof o2[k] === 'object') {
|
||||
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(array);
|
||||
}
|
||||
};
|
||||
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||
const configselsect = computed(() => { return $store.state.selected_projector })
|
||||
watch(() => configselsect, (newVal, oldVal) => {
|
||||
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
|
||||
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))
|
||||
if (
|
||||
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
|
||||
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||
) {
|
||||
fortmp = JSON.parse(JSON.stringify(i));
|
||||
}
|
||||
}
|
||||
ste_status.value = 1;
|
||||
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
use_server_config()
|
||||
use_set_cache()
|
||||
config = JSON.parse(JSON.stringify(fortmp));
|
||||
use_server_config();
|
||||
use_set_cache();
|
||||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
setnowindex()
|
||||
}, { deep: true })
|
||||
setnowindex();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const chang = (type: string) => {
|
||||
if (type == "alpha") {
|
||||
if ($store.state.enablefusion) set?.setBlendingAlphaParam(
|
||||
if ($store.state.enablefusion)
|
||||
set?.setBlendingAlphaParam(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
arr[group.value],
|
||||
|
@ -212,7 +306,8 @@ export default defineComponent({
|
|||
);
|
||||
}
|
||||
if (type == "p") {
|
||||
if ($store.state.enablefusion) set?.setBlendingPowerParam(
|
||||
if ($store.state.enablefusion)
|
||||
set?.setBlendingPowerParam(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
arr[group.value],
|
||||
|
@ -220,7 +315,8 @@ export default defineComponent({
|
|||
);
|
||||
}
|
||||
if (type == "gamma") {
|
||||
if ($store.state.enablefusion) set?.setBlendingGammaParam(
|
||||
if ($store.state.enablefusion)
|
||||
set?.setBlendingGammaParam(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
arr[group.value],
|
||||
|
@ -240,152 +336,212 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
if (sum == 1) {
|
||||
group.value = indexx
|
||||
group.value = indexx;
|
||||
} else {
|
||||
group.value = 4
|
||||
}
|
||||
group.value = 4;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//接受 赋值
|
||||
const setconfig = (config: any) => {
|
||||
let tmp = JSON.parse(config);
|
||||
let fortmp = null
|
||||
let i
|
||||
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))
|
||||
if (
|
||||
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
|
||||
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||
) {
|
||||
fortmp = JSON.parse(JSON.stringify(i));
|
||||
}
|
||||
}
|
||||
ste_status.value = 1;
|
||||
config = JSON.parse(JSON.stringify(fortmp))
|
||||
//手动对应数据索引
|
||||
config = JSON.parse(JSON.stringify(fortmp));
|
||||
for (let index = 0; index < array.length - 1; index++) {
|
||||
array[arr[index]].gamma = config.params[index].gamma.toFixed(2)
|
||||
array[arr[index]].alpha = config.params[index].alpha.toFixed(2)
|
||||
array[arr[index]].p = config.params[index].power.toFixed(2)
|
||||
array[arr[index]].isshow = config.params[index].enable
|
||||
array[arr[index]].value = Number(config.params[index].size)
|
||||
array[arr[index]].gamma = config.params[index].gamma.toFixed(2);
|
||||
array[arr[index]].alpha = config.params[index].alpha.toFixed(2);
|
||||
array[arr[index]].p = config.params[index].power.toFixed(2);
|
||||
array[arr[index]].isshow = config.params[index].enable;
|
||||
array[arr[index]].value = Number(config.params[index].size);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
ste_status.value = 0;
|
||||
}, 100);
|
||||
setnowindex()
|
||||
}
|
||||
setnowindex();
|
||||
};
|
||||
const startconfig = () => {
|
||||
//手动对应数据索引
|
||||
for (let index = 0; index < array.length - 1; index++) {
|
||||
array[arr[index]].gamma = config.params[index].gamma.toFixed(2)
|
||||
array[arr[index]].alpha = config.params[index].alpha.toFixed(2)
|
||||
array[arr[index]].p = config.params[index].power.toFixed(2)
|
||||
array[arr[index]].isshow = config.params[index].enable
|
||||
array[arr[index]].value = Number(config.params[index].size)
|
||||
}
|
||||
if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); use_set_cache()
|
||||
setnowindex()
|
||||
array[arr[index]].gamma = config.params[index].gamma.toFixed(2);
|
||||
array[arr[index]].alpha = config.params[index].alpha.toFixed(2);
|
||||
array[arr[index]].p = config.params[index].power.toFixed(2);
|
||||
array[arr[index]].isshow = config.params[index].enable;
|
||||
array[arr[index]].value = Number(config.params[index].size);
|
||||
}
|
||||
if (sessionStorage.FusionLocale)
|
||||
set_cache.value = JSON.parse(sessionStorage.FusionLocale);
|
||||
use_set_cache();
|
||||
setnowindex();
|
||||
};
|
||||
const use_server_config = () => {
|
||||
for (let index = 0; index < array.length - 1; index++) {
|
||||
array[arr[index]].gamma = config.params[index].gamma.toFixed(2)
|
||||
array[arr[index]].alpha = config.params[index].alpha.toFixed(2)
|
||||
array[arr[index]].p = config.params[index].power.toFixed(2)
|
||||
array[arr[index]].isshow = config.params[index].enable
|
||||
array[arr[index]].value = Number(config.params[index].size)
|
||||
array[arr[index]].gamma = config.params[index].gamma.toFixed(2);
|
||||
array[arr[index]].alpha = config.params[index].alpha.toFixed(2);
|
||||
array[arr[index]].p = config.params[index].power.toFixed(2);
|
||||
array[arr[index]].isshow = config.params[index].enable;
|
||||
array[arr[index]].value = Number(config.params[index].size);
|
||||
}
|
||||
}
|
||||
startconfig()
|
||||
};
|
||||
startconfig();
|
||||
onBeforeUnmount(() => {
|
||||
sessionStorage.FusionLocale = JSON.stringify(set_cache.value)
|
||||
})
|
||||
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => array[0].value,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 1, array[0].isshow, Number(array[0].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
1,
|
||||
array[0].isshow,
|
||||
Number(array[0].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => array[1].value,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 0, array[1].isshow, Number(array[1].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
0,
|
||||
array[1].isshow,
|
||||
Number(array[1].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => array[2].value,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 2, array[2].isshow, Number(array[2].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
2,
|
||||
array[2].isshow,
|
||||
Number(array[2].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => array[3].value,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 3, array[3].isshow, Number(array[3].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
3,
|
||||
array[3].isshow,
|
||||
Number(array[3].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
////
|
||||
|
||||
watch(
|
||||
() => array[0].isshow,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 1, array[0].isshow, Number(array[0].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
1,
|
||||
array[0].isshow,
|
||||
Number(array[0].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => array[1].isshow,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 0, array[1].isshow, Number(array[1].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
0,
|
||||
array[1].isshow,
|
||||
Number(array[1].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => array[2].isshow,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 2, array[2].isshow, Number(array[2].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
2,
|
||||
array[2].isshow,
|
||||
Number(array[2].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => array[3].isshow,
|
||||
(newVal, oldVal) => {
|
||||
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 3, array[3].isshow, Number(array[3].value));
|
||||
save_set_cache()
|
||||
if ($store.state.enablefusion)
|
||||
set?.SetBlendingOverlap(
|
||||
$store.getters.GetTheCurrentlySelectedCamera[0],
|
||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||
3,
|
||||
array[3].isshow,
|
||||
Number(array[3].value)
|
||||
);
|
||||
save_set_cache();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
////
|
||||
|
||||
watch(
|
||||
() => enablefusion,
|
||||
(newVal, oldVal) => {
|
||||
$store.commit('setenablefusion', newVal.value);
|
||||
$store.commit("setenablefusion", newVal.value);
|
||||
set?.EnableBlending(newVal.value);
|
||||
}, { deep: true }
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
const changenablefusion = () => {
|
||||
$store.commit('setenablefusion', enablefusion.value);
|
||||
}
|
||||
$store.commit("setenablefusion", enablefusion.value);
|
||||
};
|
||||
let resnewdata = null;
|
||||
const resetall = () => {
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res) => { resnewdata = res?.config; setconfig(resnewdata) })
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
resnewdata = res?.config;
|
||||
setconfig(resnewdata);
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("ResetBlendingConfig error")
|
||||
}
|
||||
console.log("ResetBlendingConfig error");
|
||||
}
|
||||
};
|
||||
return {
|
||||
group,
|
||||
array,
|
||||
|
@ -394,7 +550,7 @@ export default defineComponent({
|
|||
changenablefusion,
|
||||
selectedprojector,
|
||||
resetall,
|
||||
set_cache
|
||||
set_cache,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,15 @@
|
|||
<template>
|
||||
<q-dialog persistent v-model="show_dialog" @keydown="
|
||||
<q-dialog
|
||||
persistent
|
||||
v-model="show_dialog"
|
||||
@keydown="
|
||||
(evt: any) => {
|
||||
if (evt.keyCode == 27) {
|
||||
show_dialog = false;
|
||||
}
|
||||
}
|
||||
">
|
||||
"
|
||||
>
|
||||
<q-card class="overflow-hidden" style="max-width: 90vw; height: 90vh">
|
||||
<q-form>
|
||||
<q-card-section class="q-ma-none q-pa-sm">
|
||||
|
@ -15,7 +19,14 @@
|
|||
</div>
|
||||
|
||||
<q-space />
|
||||
<q-btn flat round icon="close" color="red" @click="clear()" v-close-popup>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
icon="close"
|
||||
color="red"
|
||||
@click="clear()"
|
||||
v-close-popup
|
||||
>
|
||||
<q-tooltip>
|
||||
{{ $t("close") }}
|
||||
</q-tooltip>
|
||||
|
@ -27,23 +38,36 @@
|
|||
<q-separator />
|
||||
<!-- height: 80vh -->
|
||||
<q-card-section class="scroll" style="width: 80vw">
|
||||
<div class="row" style="border: 1px solid #b0bec5;text-align: center;">
|
||||
<div class="col-3" style="border-right: 1px solid #b0bec5;">
|
||||
<div
|
||||
class="row"
|
||||
style="border: 1px solid #b0bec5; text-align: center"
|
||||
>
|
||||
<div class="col-3" style="border-right: 1px solid #b0bec5">
|
||||
<p class="text-center">{{ $t("Projector") }}</p>
|
||||
<!-- row 在前col在后 -->
|
||||
<div v-for="(item, index_row) in config.row">
|
||||
<projector-item v-for="(item, index_col) in config.col" class="w-100"
|
||||
:llabel="$t('Projector') + (index_row * config.col + index_col + 1)"
|
||||
:lvalue="index_row + '/' + index_col"></projector-item>
|
||||
<projector-item
|
||||
v-for="(item, index_col) in config.col"
|
||||
class="w-100"
|
||||
:llabel="
|
||||
$t('Projector') + (index_row * config.col + index_col + 1)
|
||||
"
|
||||
:lvalue="index_row + '/' + index_col"
|
||||
></projector-item>
|
||||
</div>
|
||||
|
||||
<div class="col-12" style="text-align: center">
|
||||
{{ $t('Whether to enable integration') }}<q-checkbox v-model="EnableBlending" />
|
||||
{{ $t("Whether to enable integration")
|
||||
}}<q-checkbox v-model="EnableBlending" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="q-ta-md">
|
||||
<q-btn-toggle :disable="!$store.state.enablefusion" no-caps v-model="options" toggle-color="primary"
|
||||
<q-btn-toggle
|
||||
:disable="!$store.state.enablefusion"
|
||||
no-caps
|
||||
v-model="options"
|
||||
toggle-color="primary"
|
||||
:options="[
|
||||
{ label: $t('FusionLocale'), value: 'FusionLocale' },
|
||||
{
|
||||
|
@ -59,7 +83,8 @@
|
|||
value: 'DensityCorrection',
|
||||
},
|
||||
// { label: $t('GridSettings'), value: 'GridSettings' },
|
||||
]" />
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
<div style="min-height: 72vh">
|
||||
<component :is="options" />
|
||||
|
@ -71,8 +96,22 @@
|
|||
<q-separator />
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup @click="$store.commit('setSelectedProjector','0/0');" />
|
||||
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" v-close-popup />
|
||||
<q-btn
|
||||
flat
|
||||
:label="$t('Cancel')"
|
||||
no-caps
|
||||
color="primary"
|
||||
v-close-popup
|
||||
@click="$store.commit('setSelectedProjector', '0/0')"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
:label="$t('save config')"
|
||||
no-caps
|
||||
color="primary"
|
||||
@click="save"
|
||||
v-close-popup
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
|
@ -134,10 +173,6 @@ export default defineComponent({
|
|||
show_dialog.value = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//投影机数量
|
||||
const config = ref({ col: 0, row: 0 });
|
||||
const EnableBlending = ref(false);
|
||||
let optionsstr = ref();
|
||||
|
@ -167,49 +202,58 @@ export default defineComponent({
|
|||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
}
|
||||
};
|
||||
const save = () => {
|
||||
set?.SaveBlendingConfig("")
|
||||
show_dialog.value = false
|
||||
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); })
|
||||
$store.commit('setSelectedProjector','0/0');
|
||||
}
|
||||
set?.SaveBlendingConfig("");
|
||||
show_dialog.value = false;
|
||||
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);
|
||||
});
|
||||
$store.commit("setSelectedProjector", "0/0");
|
||||
};
|
||||
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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
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 = () => {
|
||||
$store.commit('setSelectedProjector','0/0');
|
||||
$store.commit("setSelectedProjector", "0/0");
|
||||
setTimeout(() => {
|
||||
sessionStorage.removeItem('FusionLocale')
|
||||
sessionStorage.removeItem('SurfaceCorrection')
|
||||
sessionStorage.removeItem('DensityCorrection')
|
||||
sessionStorage.removeItem('FourPointCalibration')
|
||||
}, 500)
|
||||
getconfig()
|
||||
}
|
||||
sessionStorage.removeItem("FusionLocale");
|
||||
sessionStorage.removeItem("SurfaceCorrection");
|
||||
sessionStorage.removeItem("DensityCorrection");
|
||||
sessionStorage.removeItem("FourPointCalibration");
|
||||
}, 500);
|
||||
getconfig();
|
||||
};
|
||||
|
||||
onBeforeMount(() => {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
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);
|
||||
});
|
||||
} catch (error) {
|
||||
//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)
|
||||
//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);})
|
||||
// console.log("data is false")
|
||||
erroe()
|
||||
erroe();
|
||||
}
|
||||
|
||||
|
||||
}, 1000);
|
||||
})
|
||||
});
|
||||
return {
|
||||
clear,
|
||||
show_dialog,
|
||||
|
@ -218,7 +262,7 @@ export default defineComponent({
|
|||
showDialog,
|
||||
EnableBlending,
|
||||
config,
|
||||
save
|
||||
save,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<template>
|
||||
<div>
|
||||
<q-toolbar style="background-color: #3e9acd" class="shadow-2 text-white" @dragstart.prevent>
|
||||
<q-toolbar
|
||||
style="background-color: #3e9acd"
|
||||
class="shadow-2 text-white"
|
||||
@dragstart.prevent
|
||||
>
|
||||
<q-btn-dropdown
|
||||
v-if="false"
|
||||
v-touch-hold:10000.mouse="handleHold"
|
||||
|
@ -288,7 +292,11 @@
|
|||
:label="$t('other setting')"
|
||||
class="q-mr-sm"
|
||||
>
|
||||
<q-list style="background-color: #3e9acd" class="shadow-2 text-white" @dragstart.prevent>
|
||||
<q-list
|
||||
style="background-color: #3e9acd"
|
||||
class="shadow-2 text-white"
|
||||
@dragstart.prevent
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
:disable="!$store.state.power_state"
|
||||
|
@ -412,7 +420,10 @@
|
|||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="$refs.fusion_settings_dialog.showDialog();getconfig()"
|
||||
@click="
|
||||
$refs.fusion_settings_dialog.showDialog();
|
||||
getconfig();
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<!-- <q-icon name="devices" /> -->
|
||||
|
@ -457,7 +468,11 @@
|
|||
<q-item-section avatar style="margin-right: 0px; padding-right: 0px">
|
||||
<!-- <q-icon class="text-white rotate" name="img:svgs/fan.svg" /> -->
|
||||
<!-- <q-icon class="text-white rotate" name="img:new_icon/fan.png" /> -->
|
||||
<q-icon class="text-white" :style="{'animation':fan}" name="img:new_icon/fan.png" />
|
||||
<q-icon
|
||||
class="text-white"
|
||||
:style="{ animation: fan }"
|
||||
name="img:new_icon/fan.png"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section style="margin-left: -25px">
|
||||
{{ $store.state.fan_temp.toFixed(1) }} ℃
|
||||
|
@ -589,22 +604,21 @@ export default defineComponent({
|
|||
const plan_running = computed(
|
||||
() => $store.state.current_running_plan.trim() != ""
|
||||
);
|
||||
const fan = computed(
|
||||
() => {
|
||||
let wendu:any=($store.state.fan_temp).toFixed(1)
|
||||
let sulv:any=(1-(wendu/150))
|
||||
return 'rotate '+sulv+'s linear infinite'
|
||||
}
|
||||
);
|
||||
const fan = computed(() => {
|
||||
let wendu: any = $store.state.fan_temp.toFixed(1);
|
||||
let sulv: any = 1 - wendu / 150;
|
||||
return "rotate " + sulv + "s linear infinite";
|
||||
});
|
||||
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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
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 checkRegistered = () => {
|
||||
if (
|
||||
GlobalData.getInstance().getCurrentClient()?.is_connected &&
|
||||
|
|
Loading…
Reference in New Issue