规范代码

This commit is contained in:
shefengchun 2023-01-13 16:46:00 +08:00
parent 6d3a838cfa
commit 5ca7e6e495
6 changed files with 2928 additions and 1599 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,119 @@
<template> <template>
<div class="row"> <div class="row">
<div class="col-2"> <div class="col-2">
<q-input filled type="number" class="q-pt-md" style="text-align: center;" :dense="true" <q-input
@focus="isactivearray[0] = false" v-model="four[0].x" label="x" lazy-rules /> filled
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[0] = false" type="number"
v-model="four[0].y" label="y" lazy-rules /> class="q-pt-md"
<q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset') +$t('point') +'1'" /> style="text-align: center"
</div> :dense="true"
<div class="col-8"> @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>
<div class="col-8"></div>
<div class="col-2"> <div class="col-2">
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[1] = false" <q-input
v-model="four[1].x" label="x" lazy-rules /> filled
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[1] = false" type="number"
v-model="four[1].y" label="y" lazy-rules /> class="q-pt-md"
<q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset') +$t('point') +'2'" /> :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>
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-8"> <div class="col-8">
<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
@mouseUpHandler="mouseUpHandler(0)" :w="30" :h="20" :x="points[0].x" :y="points[0].y" v-if="isshowarray[0]"
:isResizable="false" @moveHandler="moveHandler_1"><span>{{ $t('point') }}1</span> :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>
<vue3ResizeDrag v-if="isshowarray[1]" :isActive="isactivearray[1]" @mousedown="activeMouseDown(1)" <vue3ResizeDrag
@mouseUpHandler="mouseUpHandler(1)" :w="30" :h="20" :x="points[1].x" :y="points[1].y" v-if="isshowarray[1]"
:isResizable="false" @moveHandler="moveHandler_2"><span>{{ $t('point') }}2</span> :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>
<vue3ResizeDrag v-if="isshowarray[2]" :isActive="isactivearray[2]" @mousedown="activeMouseDown(2)" <vue3ResizeDrag
@mouseUpHandler="mouseUpHandler(2)" :w="30" :h="20" :x="points[2].x" :y="points[2].y" v-if="isshowarray[2]"
:isResizable="false" @moveHandler="moveHandler_3"><span>{{ $t('point') }}3</span> :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>
<vue3ResizeDrag v-if="isshowarray[3]" :isActive="isactivearray[3]" @mousedown="activeMouseDown(3)" <vue3ResizeDrag
@mouseUpHandler="mouseUpHandler(3)" :w="30" :h="20" :x="points[3].x" :y="points[3].y" v-if="isshowarray[3]"
:isResizable="false" @moveHandler="moveHandler_4"><span>{{ $t('point') }}4</span> :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> </vue3ResizeDrag>
</div> </div>
</div> </div>
@ -44,107 +121,188 @@
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-2"> <div class="col-2">
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[2] = false" <q-input
v-model="four[2].x" label="x" lazy-rules /> filled
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[2] = false" type="number"
v-model="four[2].y" label="y" lazy-rules /> class="q-pt-md"
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset') +$t('point') +'3'" /> :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>
<div class="col-8"> <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>
<div class="col-2"> <div class="col-2">
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false" <q-input
v-model="four[3].x" label="x" lazy-rules /> filled
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false" type="number"
v-model="four[3].y" label="y" lazy-rules /> class="q-pt-md"
<q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset') +$t('point') +'4'" /> :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>
</div> </div>
</template> </template>
<style scoped> <style scoped></style>
</style>
<script lang="ts"> <script lang="ts">
import vue3ResizeDrag from "src/third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue"; 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 { useStore } from "src/store";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import ClientConnection from "src/common/ClientConnection" import ClientConnection from "src/common/ClientConnection";
import GlobalData from "src/common/GlobalData"; import GlobalData from "src/common/GlobalData";
import { json } from "body-parser"; import { json } from "body-parser";
export default defineComponent({ export default defineComponent({
name: "ComponentFourPointCalibration", name: "ComponentFourPointCalibration",
components: { components: {
vue3ResizeDrag vue3ResizeDrag,
}, },
setup() { setup() {
let $store = useStore(); let $store = useStore();
let $t = useI18n(); let $t = useI18n();
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 serverconfig = JSON.parse($store.state.fusion_configuration); let serverconfig = JSON.parse($store.state.fusion_configuration);
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 set_cache: any = ref([]); const set_cache: any = ref([]);
// let four = reactive([
//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 }]); { x: config.point4[0].x, y: config.point4[0].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 }]); { x: config.point4[1].x, y: config.point4[1].y },
let defaultfour = ref([{ x: 0, y: 1080 }, { x: 1920, y: 1080 }, { x: 0, y: 0 }, { x: 1920, y: 0 }]); { x: config.point4[2].x, y: config.point4[2].x },
let defaultfourpostion: any = ref([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }]); { x: config.point4[3].x, y: config.point4[3].y },
let fourpostion: any = ref([{ x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, y: 0 }, { x: 0, 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 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 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 points = reactive([
const isshowarray = ref([true, true, true, true]) { x: 0, y: 0 },
const isactivearray = ref([true, true, true, true]) { x: 0, y: 0 },
{ x: 0, y: 0 },
{ x: 0, y: 0 },
]); //
const isshowarray = ref([true, true, true, true]);
const isactivearray = ref([true, true, true, true]);
const ste_status = ref(0); const ste_status = ref(0);
const save = () => { const save = () => {
set?.SaveBlendingConfig("") set?.SaveBlendingConfig("");
setTimeout(() => { setTimeout(() => {
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 = () => { const use_set_cache = () => {
if (set_cache.value[selectedprojector.value] != null) { if (set_cache.value[selectedprojector.value] != null) {
let tmp = JSON.parse(set_cache.value[selectedprojector.value]); let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
deepcopy(four, tmp) deepcopy(four, tmp);
//four=JSON.parse(JSON.stringify(tmp))
} }
syncpoint() syncpoint();
}; };
const deepcopy = (o1: any, o2: any) => { const deepcopy = (o1: any, o2: any) => {
for (let k in o2) { for (let k in o2) {
if (typeof o2[k] === 'object') { if (typeof o2[k] === "object") {
o1[k] = {}; o1[k] = {};
deepcopy(o1[k], o2[k]); deepcopy(o1[k], o2[k]);
} else { } else {
o1[k] = o2[k]; o1[k] = o2[k];
} }
} }
} };
const save_set_cache = () => { const save_set_cache = () => {
set_cache.value[selectedprojector.value] = JSON.stringify(four); set_cache.value[selectedprojector.value] = JSON.stringify(four);
} };
onBeforeUnmount(() => { onBeforeUnmount(() => {
sessionStorage.FourPointCalibration = JSON.stringify(set_cache.value) sessionStorage.FourPointCalibration = JSON.stringify(set_cache.value);
}) });
///
const activeMouseDown = (index: number) => { const activeMouseDown = (index: number) => {
isactivearray.value[index] = true isactivearray.value[index] = true;
} };
const mouseUpHandler = (index: number) => { const mouseUpHandler = (index: number) => {
isactivearray.value[index] = false isactivearray.value[index] = false;
} };
onMounted(() => { onMounted(() => {
ste_status.value = 1; ste_status.value = 1;
setpoa(); setpoa();
@ -152,242 +310,315 @@ export default defineComponent({
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
}) });
const use_server_config = () => { const use_server_config = () => {
for (let index = 0; index < fourpostion.value.length; index++) { for (let index = 0; index < fourpostion.value.length; index++) {
defaultfourpostion.value[index].x = fourpostion.value[index].x; defaultfourpostion.value[index].x = fourpostion.value[index].x;
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].x = config.point4[index].x;
four[index].y = config.point4[index].y four[index].y = config.point4[index].y;
}
} }
};
const setpoa = () => { const setpoa = () => {
points[0].x = 0;
points[0].y = 0;
points[0].x = 0 points[1].x = div.value.offsetWidth - 25;
points[0].y = 0 points[1].y = 0;
points[1].x = div.value.offsetWidth - 25 points[2].x = 0;
points[1].y = 0 points[2].y = div.value.offsetHeight - 25;
points[2].x = 0 points[3].x = div.value.offsetWidth - 25;
points[2].y = div.value.offsetHeight - 25 points[3].y = div.value.offsetHeight - 25;
points[3].x = div.value.offsetWidth - 25 fourpostion.value[0].x = 0;
points[3].y = div.value.offsetHeight - 25 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[3].x = div.value.offsetWidth - 25;
fourpostion.value[0].y = 0 fourpostion.value[3].y = div.value.offsetHeight - 25;
fourpostion.value[1].x = div.value.offsetWidth - 25 Proportion.value.x = config.width / (div.value.offsetWidth - 25);
fourpostion.value[1].y = 0 Proportion.value.y = config.height / (div.value.offsetHeight - 25);
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)
for (let index = 0; index < fourpostion.value.length; index++) { for (let index = 0; index < fourpostion.value.length; index++) {
defaultfourpostion.value[index].x = fourpostion.value[index].x; defaultfourpostion.value[index].x = fourpostion.value[index].x;
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].x = config.point4[index].x;
four[index].y = config.point4[index].y 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); set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
use_set_cache() use_set_cache();
} else { } else {
} }
set_point_x() set_point_x();
//syncpoint() };
watch(
} () => four[0],
watch(() => four[0], (newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion && ste_status.value == 0) set?.setBlendingCorrection($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 4, 1, Number(newVal.x), Number(newVal.y)); if ($store.state.enablefusion && ste_status.value == 0)
set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
4,
1,
Number(newVal.x),
Number(newVal.y)
);
if (!isactivearray.value[0]) { 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);
points[0].x = x points[0].x = x;
points[0].y = 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() save_set_cache();
}, { deep: true }) },
watch(() => four[1], (newVal, oldVal) => { { deep: true }
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)); );
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]) { 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);
points[1].x = x points[1].x = x;
points[1].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() save_set_cache();
}, { deep: true }) },
watch(() => four[2], (newVal, oldVal) => { { deep: true }
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)); );
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]) { 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
);
points[2].x = x points[2].x = x;
points[2].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() save_set_cache();
}, { deep: true }) },
watch(() => four[3], (newVal, oldVal) => { { deep: true }
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)); );
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]) { 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
);
points[3].x = x points[3].x = x;
points[3].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() save_set_cache();
}, { deep: true }) },
{ deep: true }
);
watch(
watch(() => configselsect, (newVal, oldVal) => { () => configselsect,
(newVal, oldVal) => {
let tmp = JSON.parse($store.state.fusion_configuration); let tmp = JSON.parse($store.state.fusion_configuration);
let fortmp = null let fortmp = null;
let i let i;
for (i of tmp.projectors) { for (i of tmp.projectors) {
if (i.col === $store.getters.GetTheCurrentlySelectedCamera[1] && i.row === $store.getters.GetTheCurrentlySelectedCamera[0]) { if (
fortmp = JSON.parse(JSON.stringify(i)) i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
) {
fortmp = JSON.parse(JSON.stringify(i));
} }
} }
ste_status.value = 1; ste_status.value = 1;
config = JSON.parse(JSON.stringify(fortmp)) config = JSON.parse(JSON.stringify(fortmp));
//setpoa(); use_server_config();
use_server_config() use_set_cache();
use_set_cache()
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
set_point_x() set_point_x();
}, { deep: true }) },
{ deep: true }
);
// //
const syncpoint = () => { const syncpoint = () => {
for (let index = 0; index < fourpostion.value.length; index++) { for (let index = 0; index < fourpostion.value.length; index++) {
isactivearray.value[index] = false isactivearray.value[index] = false;
} }
} };
// //
const set_point_x = () => { const set_point_x = () => {
//console.log("kaishi jisuan ") let x = Math.ceil(four[0].x / Proportion.value.x);
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);
set_point(0,x,y);
x = Math.ceil(four[1].x / Proportion.value.x); 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); set_point(1, x, y);
x = Math.ceil(four[2].x / Proportion.value.x); 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(
set_point(2,x,y); 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); 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(
set_point(3,x,y); 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) => { const set_point = (index: number, x: number, y: number) => {
points[index].x = x;
points[index].x = x points[index].y = y;
points[index].y = y isshowarray.value[index] = false;
isshowarray.value[index] = false isactivearray.value[index] = false;
isactivearray.value[index] = false
setTimeout(() => { setTimeout(() => {
isshowarray.value[index] = true isshowarray.value[index] = true;
}, 100); }, 100);
} };
const reset = (index: number) => { const reset = (index: number) => {
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[index].x = config.point4[index].def_x four[index].x = config.point4[index].def_x;
four[index].y = config.point4[index].def_y 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(() => { setTimeout(() => {
isshowarray.value[index] = true isshowarray.value[index] = true;
}, 100); }, 100);
};
}
const resetall = () => { const resetall = () => {
for (let index = 0; index < fourpostion.value.length; index++) { for (let index = 0; index < fourpostion.value.length; index++) {
reset(index) reset(index);
}
} }
};
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(
let y = Math.ceil((config.height - data.top * Proportion.value.y - fourpostion.value[0].y)); (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].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[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() 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(
let y = Math.ceil((config.height - data.top * Proportion.value.y - fourpostion.value[1].y)); (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].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[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() 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(
let y = Math.abs(Math.ceil((data.top - fourpostion.value[2].y) * Proportion.value.y)); (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].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[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() 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(
let y = Math.abs(Math.ceil((data.top - fourpostion.value[3].y) * Proportion.value.y)); (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].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[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() save_set_cache();
} };
// //
onMounted(() => { onMounted(() => {
// //
@ -417,7 +648,7 @@ export default defineComponent({
isactivearray, isactivearray,
activeMouseDown, activeMouseDown,
mouseUpHandler, mouseUpHandler,
points points,
}; };
}, },
}); });

View File

@ -1,25 +1,37 @@
<template> <template>
<div class="row"> <div class="row">
<div class="col-12"> <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="row">
<div class="col-12"> <div class="col-12">
<div class="row"> <div class="row">
<div class="col-4 offset-4"> <div class="col-4 offset-4">
<div class="row"> <div class="row">
<div class="col-3"> <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>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''" <q-input
@focus="group = 0" v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules 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="[ :rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') ||
$t('Please enter a number'),
(val) => (val) =>
(val > -1 && val < 1080) || $t('Please enter 0-100'), (val > -1 && val < 1080) || $t('Please enter 0-100'),
]" /> ]"
/>
</div> </div>
</div> </div>
</div> </div>
@ -30,34 +42,60 @@
<div class="col-6"> <div class="col-6">
<div class="row"> <div class="row">
<div class="col-3"> <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>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''" <q-input
@focus="group = 1" v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules 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="[ :rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') ||
$t('Please enter a number'),
(val) => (val) =>
(val > -1 && val < 1920) || $t('Please enter 0-100'), (val > -1 && val < 1920) || $t('Please enter 0-100'),
]" /> ]"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="col-6"> <div class="col-6">
<div class="row"> <div class="row">
<div class="col-3"> <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>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''" <q-input
@focus="group = 2" v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules 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="[ :rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') ||
$t('Please enter a number'),
(val) => (val) =>
(val > -1 && val < 1920) || $t('Please enter 0-100'), (val > -1 && val < 1920) || $t('Please enter 0-100'),
]" /> ]"
/>
</div> </div>
</div> </div>
</div> </div>
@ -68,51 +106,94 @@
<div class="col-4 offset-4"> <div class="col-4 offset-4">
<div class="row"> <div class="row">
<div class="col-3"> <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>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :autofocus="group == 3" :bg-color="group == 3 ? 'cyan-1' : ''" <q-input
@focus="group = 3" v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules 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="[ :rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') ||
$t('Please enter a number'),
(val) => (val) =>
(val > -1 && val < 1080) || $t('Please enter 0-100'), (val > -1 && val < 1080) || $t('Please enter 0-100'),
]" /> ]"
/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-4 offset-4" v-if="group != 4"> <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 style="display: flex; justify-content: space-evenly">
<div> <div>
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green" <q-slider
vertical reverse label-always /> 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> <p class="text-center">alpha</p>
</div> </div>
<div> <div>
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="2.5" :step="0.01" color="green" <q-slider
vertical reverse label-always /> 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> <p class="text-center">p</p>
</div> </div>
<div> <div>
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="2.5" :step="0.01" color="green" <q-slider
vertical reverse label-always /> 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> <p class="text-center">gamma</p>
</div> </div>
</div> </div>
</div> </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> </div>
</template> </template>
@ -155,56 +236,69 @@ export default defineComponent({
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 }, { 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); let serverconfig = JSON.parse($store.state.fusion_configuration);
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 ste_status = ref(0); const ste_status = ref(0);
const use_set_cache = () => { const use_set_cache = () => {
if (set_cache.value[selectedprojector.value] != null) { if (set_cache.value[selectedprojector.value] != null) {
let tmp = JSON.parse(set_cache.value[selectedprojector.value]); let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
deepcopy(array, tmp) deepcopy(array, tmp);
} }
}; };
const deepcopy = (o1: any, o2: any) => { const deepcopy = (o1: any, o2: any) => {
for (let k in o2) { for (let k in o2) {
if (typeof o2[k] === 'object') { if (typeof o2[k] === "object") {
o1[k] = {}; o1[k] = {};
deepcopy(o1[k], o2[k]); deepcopy(o1[k], o2[k]);
} else { } else {
o1[k] = o2[k]; o1[k] = o2[k];
} }
} }
} };
const save_set_cache = () => { const save_set_cache = () => {
set_cache.value[selectedprojector.value] = JSON.stringify(array); set_cache.value[selectedprojector.value] = JSON.stringify(array);
} };
let config = JSON.parse($store.state.fusion_configuration).projectors[0]; let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => { return $store.state.selected_projector }) const configselsect = computed(() => {
watch(() => configselsect, (newVal, oldVal) => { return $store.state.selected_projector;
});
watch(
() => configselsect,
(newVal, oldVal) => {
let tmp = JSON.parse($store.state.fusion_configuration); let tmp = JSON.parse($store.state.fusion_configuration);
let fortmp = null let fortmp = null;
let i let i;
for (i of tmp.projectors) { for (i of tmp.projectors) {
if (i.col === $store.getters.GetTheCurrentlySelectedCamera[1] && i.row === $store.getters.GetTheCurrentlySelectedCamera[0]) { if (
fortmp = JSON.parse(JSON.stringify(i)) i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
) {
fortmp = JSON.parse(JSON.stringify(i));
} }
} }
ste_status.value = 1; ste_status.value = 1;
config = JSON.parse(JSON.stringify(fortmp)) config = JSON.parse(JSON.stringify(fortmp));
use_server_config() use_server_config();
use_set_cache() use_set_cache();
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
setnowindex() setnowindex();
}, { deep: true }) },
{ deep: true }
);
const chang = (type: string) => { const chang = (type: string) => {
if (type == "alpha") { if (type == "alpha") {
if ($store.state.enablefusion) set?.setBlendingAlphaParam( if ($store.state.enablefusion)
set?.setBlendingAlphaParam(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
arr[group.value], arr[group.value],
@ -212,7 +306,8 @@ export default defineComponent({
); );
} }
if (type == "p") { if (type == "p") {
if ($store.state.enablefusion) set?.setBlendingPowerParam( if ($store.state.enablefusion)
set?.setBlendingPowerParam(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
arr[group.value], arr[group.value],
@ -220,7 +315,8 @@ export default defineComponent({
); );
} }
if (type == "gamma") { if (type == "gamma") {
if ($store.state.enablefusion) set?.setBlendingGammaParam( if ($store.state.enablefusion)
set?.setBlendingGammaParam(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
arr[group.value], arr[group.value],
@ -240,152 +336,212 @@ export default defineComponent({
} }
} }
if (sum == 1) { if (sum == 1) {
group.value = indexx group.value = indexx;
} else { } else {
group.value = 4 group.value = 4;
}
} }
};
//
const setconfig = (config: any) => { const setconfig = (config: any) => {
let tmp = JSON.parse(config); let tmp = JSON.parse(config);
let fortmp = null let fortmp = null;
let i let i;
for (i of tmp.projectors) { for (i of tmp.projectors) {
if (i.col === $store.getters.GetTheCurrentlySelectedCamera[1] && i.row === $store.getters.GetTheCurrentlySelectedCamera[0]) { if (
fortmp = JSON.parse(JSON.stringify(i)) i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
) {
fortmp = JSON.parse(JSON.stringify(i));
} }
} }
ste_status.value = 1; 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++) { for (let index = 0; index < array.length - 1; index++) {
array[arr[index]].gamma = config.params[index].gamma.toFixed(2) array[arr[index]].gamma = config.params[index].gamma.toFixed(2);
array[arr[index]].alpha = config.params[index].alpha.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]].p = config.params[index].power.toFixed(2);
array[arr[index]].isshow = config.params[index].enable array[arr[index]].isshow = config.params[index].enable;
array[arr[index]].value = Number(config.params[index].size) array[arr[index]].value = Number(config.params[index].size);
} }
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
setnowindex() setnowindex();
} };
const startconfig = () => { const startconfig = () => {
//
for (let index = 0; index < array.length - 1; index++) { for (let index = 0; index < array.length - 1; index++) {
array[arr[index]].gamma = config.params[index].gamma.toFixed(2) array[arr[index]].gamma = config.params[index].gamma.toFixed(2);
array[arr[index]].alpha = config.params[index].alpha.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]].p = config.params[index].power.toFixed(2);
array[arr[index]].isshow = config.params[index].enable array[arr[index]].isshow = config.params[index].enable;
array[arr[index]].value = Number(config.params[index].size) array[arr[index]].value = Number(config.params[index].size);
}
if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); use_set_cache()
setnowindex()
} }
if (sessionStorage.FusionLocale)
set_cache.value = JSON.parse(sessionStorage.FusionLocale);
use_set_cache();
setnowindex();
};
const use_server_config = () => { const use_server_config = () => {
for (let index = 0; index < array.length - 1; index++) { for (let index = 0; index < array.length - 1; index++) {
array[arr[index]].gamma = config.params[index].gamma.toFixed(2) array[arr[index]].gamma = config.params[index].gamma.toFixed(2);
array[arr[index]].alpha = config.params[index].alpha.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]].p = config.params[index].power.toFixed(2);
array[arr[index]].isshow = config.params[index].enable array[arr[index]].isshow = config.params[index].enable;
array[arr[index]].value = Number(config.params[index].size) array[arr[index]].value = Number(config.params[index].size);
} }
} };
startconfig() startconfig();
onBeforeUnmount(() => { onBeforeUnmount(() => {
sessionStorage.FusionLocale = JSON.stringify(set_cache.value) sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
}) });
watch( watch(
() => array[0].value, () => array[0].value,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 1, array[0].isshow, Number(array[0].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
1,
array[0].isshow,
Number(array[0].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
watch( watch(
() => array[1].value, () => array[1].value,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 0, array[1].isshow, Number(array[1].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
0,
array[1].isshow,
Number(array[1].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
watch( watch(
() => array[2].value, () => array[2].value,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 2, array[2].isshow, Number(array[2].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
2,
array[2].isshow,
Number(array[2].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
watch( watch(
() => array[3].value, () => array[3].value,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 3, array[3].isshow, Number(array[3].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
3,
array[3].isshow,
Number(array[3].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
////
watch( watch(
() => array[0].isshow, () => array[0].isshow,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 1, array[0].isshow, Number(array[0].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
1,
array[0].isshow,
Number(array[0].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
watch( watch(
() => array[1].isshow, () => array[1].isshow,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 0, array[1].isshow, Number(array[1].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
0,
array[1].isshow,
Number(array[1].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
watch( watch(
() => array[2].isshow, () => array[2].isshow,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 2, array[2].isshow, Number(array[2].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
2,
array[2].isshow,
Number(array[2].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
watch( watch(
() => array[3].isshow, () => array[3].isshow,
(newVal, oldVal) => { (newVal, oldVal) => {
if ($store.state.enablefusion) set?.SetBlendingOverlap($store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[1], 3, array[3].isshow, Number(array[3].value)); if ($store.state.enablefusion)
save_set_cache() set?.SetBlendingOverlap(
$store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1],
3,
array[3].isshow,
Number(array[3].value)
);
save_set_cache();
}, },
{ deep: true } { deep: true }
); );
////
watch( watch(
() => enablefusion, () => enablefusion,
(newVal, oldVal) => { (newVal, oldVal) => {
$store.commit('setenablefusion', newVal.value); $store.commit("setenablefusion", newVal.value);
set?.EnableBlending(newVal.value); set?.EnableBlending(newVal.value);
}, { deep: true } },
{ deep: true }
); );
const changenablefusion = () => { const changenablefusion = () => {
$store.commit('setenablefusion', enablefusion.value); $store.commit("setenablefusion", enablefusion.value);
} };
let resnewdata = null; let resnewdata = null;
const resetall = () => { const resetall = () => {
try { try {
set?.GetBlendingConfig("").then((res) => { resnewdata = res?.config; setconfig(resnewdata) }) set?.GetBlendingConfig("").then((res) => {
resnewdata = res?.config;
setconfig(resnewdata);
});
} catch (error) { } catch (error) {
console.log("ResetBlendingConfig error") console.log("ResetBlendingConfig error");
}
} }
};
return { return {
group, group,
array, array,
@ -394,7 +550,7 @@ export default defineComponent({
changenablefusion, changenablefusion,
selectedprojector, selectedprojector,
resetall, resetall,
set_cache set_cache,
}; };
}, },
}); });

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,15 @@
<template> <template>
<q-dialog persistent v-model="show_dialog" @keydown=" <q-dialog
persistent
v-model="show_dialog"
@keydown="
(evt: any) => { (evt: any) => {
if (evt.keyCode == 27) { if (evt.keyCode == 27) {
show_dialog = false; show_dialog = false;
} }
} }
"> "
>
<q-card class="overflow-hidden" style="max-width: 90vw; height: 90vh"> <q-card class="overflow-hidden" style="max-width: 90vw; height: 90vh">
<q-form> <q-form>
<q-card-section class="q-ma-none q-pa-sm"> <q-card-section class="q-ma-none q-pa-sm">
@ -15,7 +19,14 @@
</div> </div>
<q-space /> <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> <q-tooltip>
{{ $t("close") }} {{ $t("close") }}
</q-tooltip> </q-tooltip>
@ -27,23 +38,36 @@
<q-separator /> <q-separator />
<!-- height: 80vh --> <!-- height: 80vh -->
<q-card-section class="scroll" style="width: 80vw"> <q-card-section class="scroll" style="width: 80vw">
<div class="row" style="border: 1px solid #b0bec5;text-align: center;"> <div
<div class="col-3" style="border-right: 1px solid #b0bec5;"> 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> <p class="text-center">{{ $t("Projector") }}</p>
<!-- row 在前col在后 --> <!-- row 在前col在后 -->
<div v-for="(item, index_row) in config.row"> <div v-for="(item, index_row) in config.row">
<projector-item v-for="(item, index_col) in config.col" class="w-100" <projector-item
:llabel="$t('Projector') + (index_row * config.col + index_col + 1)" v-for="(item, index_col) in config.col"
:lvalue="index_row + '/' + index_col"></projector-item> class="w-100"
:llabel="
$t('Projector') + (index_row * config.col + index_col + 1)
"
:lvalue="index_row + '/' + index_col"
></projector-item>
</div> </div>
<div class="col-12" style="text-align: center"> <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> </div>
<div class="col-9"> <div class="col-9">
<div class="q-ta-md"> <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="[ :options="[
{ label: $t('FusionLocale'), value: 'FusionLocale' }, { label: $t('FusionLocale'), value: 'FusionLocale' },
{ {
@ -59,7 +83,8 @@
value: 'DensityCorrection', value: 'DensityCorrection',
}, },
// { label: $t('GridSettings'), value: 'GridSettings' }, // { label: $t('GridSettings'), value: 'GridSettings' },
]" /> ]"
/>
</div> </div>
<div style="min-height: 72vh"> <div style="min-height: 72vh">
<component :is="options" /> <component :is="options" />
@ -71,8 +96,22 @@
<q-separator /> <q-separator />
<q-card-actions align="right"> <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
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" v-close-popup /> 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-card-actions>
</q-form> </q-form>
</q-card> </q-card>
@ -134,10 +173,6 @@ export default defineComponent({
show_dialog.value = true; show_dialog.value = true;
}; };
//
const config = ref({ col: 0, row: 0 }); const config = ref({ col: 0, row: 0 });
const EnableBlending = ref(false); const EnableBlending = ref(false);
let optionsstr = ref(); let optionsstr = ref();
@ -167,49 +202,58 @@ export default defineComponent({
position: "top", position: "top",
timeout: 1500, timeout: 1500,
}); });
} };
const save = () => { const save = () => {
set?.SaveBlendingConfig("") set?.SaveBlendingConfig("");
show_dialog.value = false show_dialog.value = false;
clear() 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); }) set?.GetBlendingConfig("").then((res) => {
$store.commit('setSelectedProjector','0/0'); let tmp = JSON.parse(res ? res.config : "");
} EnableBlending.value = tmp.enable;
const getconfig=()=>{ $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 { try {
set?.GetBlendingConfig("").then((res)=>{}) 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); }) set?.GetBlendingConfig("").then((res) => {
} catch (error) { let tmp = JSON.parse(res ? res.config : "");
$store.commit("setEnablefusion", tmp.enable);
} $store.commit("setfusion_configuration", res?.config);
});
} } catch (error) {}
};
const clear = () => { const clear = () => {
$store.commit('setSelectedProjector','0/0'); $store.commit("setSelectedProjector", "0/0");
setTimeout(() => { setTimeout(() => {
sessionStorage.removeItem('FusionLocale') sessionStorage.removeItem("FusionLocale");
sessionStorage.removeItem('SurfaceCorrection') sessionStorage.removeItem("SurfaceCorrection");
sessionStorage.removeItem('DensityCorrection') sessionStorage.removeItem("DensityCorrection");
sessionStorage.removeItem('FourPointCalibration') sessionStorage.removeItem("FourPointCalibration");
}, 500) }, 500);
getconfig() getconfig();
} };
onBeforeMount(() => { onBeforeMount(() => {
setTimeout(() => { setTimeout(() => {
try { 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) { } 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}" erroe();
//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()
} }
}, 1000); }, 1000);
}) });
return { return {
clear, clear,
show_dialog, show_dialog,
@ -218,7 +262,7 @@ export default defineComponent({
showDialog, showDialog,
EnableBlending, EnableBlending,
config, config,
save save,
}; };
}, },
}); });

View File

@ -1,6 +1,10 @@
<template> <template>
<div> <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 <q-btn-dropdown
v-if="false" v-if="false"
v-touch-hold:10000.mouse="handleHold" v-touch-hold:10000.mouse="handleHold"
@ -288,7 +292,11 @@
:label="$t('other setting')" :label="$t('other setting')"
class="q-mr-sm" 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 <q-item
clickable clickable
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
@ -412,7 +420,10 @@
<q-item <q-item
clickable clickable
v-close-popup v-close-popup
@click="$refs.fusion_settings_dialog.showDialog();getconfig()" @click="
$refs.fusion_settings_dialog.showDialog();
getconfig();
"
> >
<q-item-section avatar> <q-item-section avatar>
<!-- <q-icon name="devices" /> --> <!-- <q-icon name="devices" /> -->
@ -457,7 +468,11 @@
<q-item-section avatar style="margin-right: 0px; padding-right: 0px"> <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:svgs/fan.svg" /> -->
<!-- <q-icon class="text-white rotate" name="img:new_icon/fan.png" /> --> <!-- <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>
<q-item-section style="margin-left: -25px"> <q-item-section style="margin-left: -25px">
{{ $store.state.fan_temp.toFixed(1) }} {{ $store.state.fan_temp.toFixed(1) }}
@ -491,7 +506,7 @@
<fusion-settings-dialog ref="fusion_settings_dialog" /> <fusion-settings-dialog ref="fusion_settings_dialog" />
</template> </template>
<style > <style>
@keyframes rotate { @keyframes rotate {
0% { 0% {
transform: rotate(0); transform: rotate(0);
@ -589,22 +604,21 @@ export default defineComponent({
const plan_running = computed( const plan_running = computed(
() => $store.state.current_running_plan.trim() != "" () => $store.state.current_running_plan.trim() != ""
); );
const fan = computed( const fan = computed(() => {
() => { let wendu: any = $store.state.fan_temp.toFixed(1);
let wendu:any=($store.state.fan_temp).toFixed(1) let sulv: any = 1 - wendu / 150;
let sulv:any=(1-(wendu/150)) return "rotate " + sulv + "s linear infinite";
return 'rotate '+sulv+'s linear infinite' });
} const getconfig = () => {
);
const getconfig=()=>{
try { try {
set?.GetBlendingConfig("").then((res)=>{}) 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); }) set?.GetBlendingConfig("").then((res) => {
} catch (error) { let tmp = JSON.parse(res ? res.config : "");
$store.commit("setEnablefusion", tmp.enable);
} $store.commit("setfusion_configuration", res?.config);
});
} } catch (error) {}
};
const checkRegistered = () => { const checkRegistered = () => {
if ( if (
GlobalData.getInstance().getCurrentClient()?.is_connected && GlobalData.getInstance().getCurrentClient()?.is_connected &&