Compare commits
1 Commits
master_v2_
...
blending_d
Author | SHA1 | Date |
---|---|---|
shefengchun | d10ad12ba0 |
|
@ -73,6 +73,11 @@ module.exports = configure(function (ctx) {
|
||||||
https: false,
|
https: false,
|
||||||
port: 8080,
|
port: 8080,
|
||||||
open: true, // opens browser window automatically
|
open: true, // opens browser window automatically
|
||||||
|
proxy: {
|
||||||
|
"/get_websocket_port": "http://192.168.2.102",
|
||||||
|
"/media_control_client_product.js": "http://192.168.2.102",
|
||||||
|
"/media_control_client_language.js": "http://192.168.2.102",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
|
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
|
||||||
|
|
|
@ -119,7 +119,7 @@ export default defineComponent({
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventBus.getInstance().on(EventNamesDefine.CheckDebug, () => {
|
EventBus.getInstance().on(EventNamesDefine.CheckDebug2, () => {
|
||||||
const to_normal_url = () => {
|
const to_normal_url = () => {
|
||||||
const p1 = window.location.href.indexOf("?debug");
|
const p1 = window.location.href.indexOf("?debug");
|
||||||
const p2 = window.location.href.indexOf("#");
|
const p2 = window.location.href.indexOf("#");
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
<q-form @submit="onSubmit">
|
<q-form @submit="onSubmit">
|
||||||
<q-card-section class="q-ma-none q-pa-sm">
|
<q-card-section class="q-ma-none q-pa-sm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-auto text-h5">
|
<div class="col-auto text-h6">
|
||||||
{{ $t("magic wall") }}
|
{{ $t("magic wall") }}
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
@ -107,12 +107,12 @@
|
||||||
<q-card class="my-card" flat bordered>
|
<q-card class="my-card" flat bordered>
|
||||||
<q-card-section horizontal>
|
<q-card-section horizontal>
|
||||||
<q-card-section class="col-3" style="">
|
<q-card-section class="col-3" style="">
|
||||||
<div style="font-size: 1.2rem">{{ $t("angle") }}</div>
|
<div class="text-h5">{{ $t("angle") }}</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<br />
|
<br />
|
||||||
<div class="no-wrap items-center">
|
<div class="row no-wrap items-center">
|
||||||
<q-item class="row">
|
<q-item>
|
||||||
<q-item-section avatar class="">
|
<q-item-section avatar>
|
||||||
<span class="q-mb-md" style="font-size: 1rem">
|
<span class="q-mb-md" style="font-size: 1rem">
|
||||||
angle:</span
|
angle:</span
|
||||||
>
|
>
|
||||||
|
@ -162,17 +162,17 @@
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div style="font-size: 1.2rem">
|
<div class="text-h5">
|
||||||
{{ $t("physical central location") }}
|
{{ $t("physical central location") }}
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<br />
|
<br />
|
||||||
<div class="no-wrap items-center">
|
<div class="row no-wrap items-center">
|
||||||
<q-item class="row">
|
<q-item>
|
||||||
<q-item-section avatar class="col-2">
|
<q-item-section avatar>
|
||||||
<span class="q-mb-md">X:</span>
|
<span class="q-mb-md">X:</span>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section class="col">
|
<q-item-section>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="current_index > -1"
|
v-if="current_index > -1"
|
||||||
type="number"
|
type="number"
|
||||||
|
@ -215,12 +215,12 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div>
|
<div class="row">
|
||||||
<q-item class="row">
|
<q-item>
|
||||||
<q-item-section avatar class="col-2">
|
<q-item-section avatar>
|
||||||
<span class="q-mb-md">Y:</span>
|
<span class="q-mb-md">Y:</span>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section class="col">
|
<q-item-section>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="current_index > -1"
|
v-if="current_index > -1"
|
||||||
:hint="''"
|
:hint="''"
|
||||||
|
@ -411,7 +411,7 @@
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="monitor_list_current_index > -1"
|
v-if="monitor_list_current_index > -1"
|
||||||
type="number"
|
type="text"
|
||||||
v-model="test_monitor_list[monitor_list_current_index].cmw"
|
v-model="test_monitor_list[monitor_list_current_index].cmw"
|
||||||
@update:model-value="changewidth()"
|
@update:model-value="changewidth()"
|
||||||
:rules="[
|
:rules="[
|
||||||
|
@ -452,7 +452,7 @@
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="monitor_list_current_index > -1"
|
v-if="monitor_list_current_index > -1"
|
||||||
type="number"
|
type="text"
|
||||||
v-model="test_monitor_list[monitor_list_current_index].cmh"
|
v-model="test_monitor_list[monitor_list_current_index].cmh"
|
||||||
@update:model-value="changeHeight()"
|
@update:model-value="changeHeight()"
|
||||||
:rules="[
|
:rules="[
|
||||||
|
@ -644,7 +644,7 @@
|
||||||
no-caps
|
no-caps
|
||||||
:label="$t('revert')"
|
:label="$t('revert')"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="back_all"
|
@click="refresh_all"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
ref="accept"
|
ref="accept"
|
||||||
|
@ -963,8 +963,7 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// $store.commit("setShowMonitorList", monitorList);
|
$store.commit("setShowMonitorList", monitorList);
|
||||||
// console.log($store.state.show_monitor_list)
|
|
||||||
}
|
}
|
||||||
if (!setMagic?.success) {
|
if (!setMagic?.success) {
|
||||||
$q.notify({
|
$q.notify({
|
||||||
|
@ -982,10 +981,8 @@ export default defineComponent({
|
||||||
if (wall_dom) {
|
if (wall_dom) {
|
||||||
lcm.value = (wall_dom.offsetWidth * 0.5) / 1214;
|
lcm.value = (wall_dom.offsetWidth * 0.5) / 1214;
|
||||||
test_monitor_list.value.forEach((ele) => {
|
test_monitor_list.value.forEach((ele) => {
|
||||||
ele.cmw = 1214;
|
ele.cmw = Math.round(ele.w / lcm.value);
|
||||||
ele.cmh = 684;
|
ele.cmh = Math.round(ele.h / lcm.value);
|
||||||
ele.w = wall_dom.offsetWidth * 0.5;
|
|
||||||
ele.h = wall_dom.offsetHeight * 0.5;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -998,13 +995,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const close_magic_switch = () => {
|
const close_magic_switch = () => {
|
||||||
let client = GlobalData.getInstance().getCurrentClient();
|
|
||||||
magic_switch.value = false;
|
magic_switch.value = false;
|
||||||
if (client) {
|
|
||||||
client.setMagicWallList(
|
|
||||||
JSON.parse(JSON.stringify(test_monitor_list.value))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
upload_magic_switch();
|
upload_magic_switch();
|
||||||
};
|
};
|
||||||
const radians = (item: test_monitor) => {
|
const radians = (item: test_monitor) => {
|
||||||
|
@ -1109,7 +1100,7 @@ export default defineComponent({
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
if (wall_dom) {
|
if (wall_dom) {
|
||||||
const point_list = four_point(item);
|
const point_list = four_point(item);
|
||||||
if (item && item.angle != 0 && point_list) {
|
if (item.angle != 0 && point_list) {
|
||||||
let minx = 0;
|
let minx = 0;
|
||||||
point_list.forEach((element) => {
|
point_list.forEach((element) => {
|
||||||
if (minx > element.x) {
|
if (minx > element.x) {
|
||||||
|
@ -1366,7 +1357,7 @@ export default defineComponent({
|
||||||
test_monitor_list.value[index].isactive = true;
|
test_monitor_list.value[index].isactive = true;
|
||||||
};
|
};
|
||||||
let test_delete_flag = false;
|
let test_delete_flag = false;
|
||||||
const back_all = () => {
|
const refresh_all = () => {
|
||||||
refresh_resize(2);
|
refresh_resize(2);
|
||||||
current_index.value = -1;
|
current_index.value = -1;
|
||||||
monitor_list_current_index.value = -1;
|
monitor_list_current_index.value = -1;
|
||||||
|
@ -1374,14 +1365,7 @@ export default defineComponent({
|
||||||
multiple_select.value = [];
|
multiple_select.value = [];
|
||||||
multiple.value = false;
|
multiple.value = false;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (list_magic) {
|
test_monitor_list.value = JSON.parse(list_magic);
|
||||||
JSON.parse(list_magic).forEach((element: any, index: number) => {
|
|
||||||
if (test_monitor_list.value[index].uuid == element.uuid) {
|
|
||||||
test_monitor_list.value[index].cmw = element.cmw;
|
|
||||||
test_monitor_list.value[index].cmh = element.cmh;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
realtime_upload(last_wall.value, last_percenter.value, 2);
|
realtime_upload(last_wall.value, last_percenter.value, 2);
|
||||||
};
|
};
|
||||||
let sort_index: any = ref([]);
|
let sort_index: any = ref([]);
|
||||||
|
@ -1516,6 +1500,9 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (a.length == 0) {
|
if (a.length == 0) {
|
||||||
|
test_monitor_list.value.forEach((ele) => {
|
||||||
|
ele.isHide = false;
|
||||||
|
});
|
||||||
test_monitor_wall.value = [];
|
test_monitor_wall.value = [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1655,9 +1642,11 @@ export default defineComponent({
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
};
|
};
|
||||||
let list_magic: any = [];
|
let list_magic: any = [];
|
||||||
const detect = (list: any) => {
|
const detect=(list:any)=>{
|
||||||
list.forEach((ele: any) => {});
|
list.forEach((ele:any)=>{
|
||||||
};
|
|
||||||
|
})
|
||||||
|
}
|
||||||
EventBus.getInstance().on(
|
EventBus.getInstance().on(
|
||||||
EventNamesDefine.NotifyMessage,
|
EventNamesDefine.NotifyMessage,
|
||||||
(notify: NotifyMessage) => {
|
(notify: NotifyMessage) => {
|
||||||
|
@ -1700,7 +1689,7 @@ export default defineComponent({
|
||||||
upload_magic_switch,
|
upload_magic_switch,
|
||||||
magic_switch,
|
magic_switch,
|
||||||
magic_isbutton,
|
magic_isbutton,
|
||||||
back_all,
|
refresh_all,
|
||||||
getpx,
|
getpx,
|
||||||
lcm,
|
lcm,
|
||||||
model,
|
model,
|
||||||
|
@ -1753,7 +1742,11 @@ export default defineComponent({
|
||||||
const SetMagicWallGridState = await client.setMagicWallGridState(
|
const SetMagicWallGridState = await client.setMagicWallGridState(
|
||||||
magic_switch.value
|
magic_switch.value
|
||||||
);
|
);
|
||||||
|
list_magic = (await client.getApplicationSettins())?.config
|
||||||
|
?.magic_list;
|
||||||
|
if (list_magic) {
|
||||||
|
test_monitor_list.value = JSON.parse(list_magic);
|
||||||
|
}
|
||||||
if (wall_dom) {
|
if (wall_dom) {
|
||||||
offsetHeight.value = wall_dom.offsetHeight;
|
offsetHeight.value = wall_dom.offsetHeight;
|
||||||
offsetWidth.value = wall_dom.offsetWidth;
|
offsetWidth.value = wall_dom.offsetWidth;
|
||||||
|
@ -1779,15 +1772,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
getpx();
|
getpx();
|
||||||
}
|
}
|
||||||
list_magic = (await client.getApplicationSettins())?.config
|
|
||||||
?.magic_list;
|
|
||||||
if (list_magic) {
|
|
||||||
test_monitor_list.value = JSON.parse(list_magic);
|
|
||||||
}
|
|
||||||
test_monitor_list.value.forEach((element) => {
|
|
||||||
element.isHide = false;
|
|
||||||
element.isactive=false
|
|
||||||
});
|
|
||||||
if (
|
if (
|
||||||
output_length.value !=
|
output_length.value !=
|
||||||
response.config.col * response.config.row
|
response.config.col * response.config.row
|
||||||
|
@ -2011,16 +1995,6 @@ export default defineComponent({
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
item.isShow = true;
|
item.isShow = true;
|
||||||
if (wall_dom) {
|
if (wall_dom) {
|
||||||
if (item.cmw == 1214) {
|
|
||||||
item.w = wall_dom.offsetWidth * 0.5;
|
|
||||||
} else {
|
|
||||||
item.w = (item.cmw / 1214) * (wall_dom.offsetWidth * 0.5);
|
|
||||||
}
|
|
||||||
if (item.cmh == 684) {
|
|
||||||
item.h = wall_dom.offsetHeight * 0.5;
|
|
||||||
} else {
|
|
||||||
item.h = (item.cmh / 684) * (wall_dom.offsetHeight * 0.5);
|
|
||||||
}
|
|
||||||
item.InitialH = item.h;
|
item.InitialH = item.h;
|
||||||
item.InitialW = item.w;
|
item.InitialW = item.w;
|
||||||
item.resizew = item.w / wall_dom.offsetWidth;
|
item.resizew = item.w / wall_dom.offsetWidth;
|
||||||
|
@ -2063,6 +2037,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragEnter(e: DragEvent, index: string) {
|
onDragEnter(e: DragEvent, index: string) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
let target: HTMLElement | null = e.target as HTMLElement;
|
let target: HTMLElement | null = e.target as HTMLElement;
|
||||||
|
@ -2096,16 +2071,11 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
const temp_index = sort_index.value.indexOf(item.uuid);
|
const temp_index = sort_index.value.indexOf(item.uuid);
|
||||||
sort_index.value.splice(temp_index, 1);
|
sort_index.value.splice(temp_index, 1);
|
||||||
test_monitor_wall.value.forEach((ele, ind) => {
|
|
||||||
if (ele.uuid == item.uuid) {
|
|
||||||
test_monitor_wall.value.splice(ind, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
test_monitor_list.value[item.id].isHide = false;
|
test_monitor_list.value[item.id].isHide = false;
|
||||||
// test_monitor_wall.value[temp_index].isShow = false;
|
test_monitor_wall.value[index].isShow = false;
|
||||||
multiple_select.value = [];
|
multiple_select.value = [];
|
||||||
|
test_monitor_wall.value.splice(temp_index, 1);
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
current_index.value = -1;
|
|
||||||
},
|
},
|
||||||
closeOtherWindows(item: test_monitor, index: number) {
|
closeOtherWindows(item: test_monitor, index: number) {
|
||||||
current_index.value = index;
|
current_index.value = index;
|
||||||
|
@ -2128,7 +2098,6 @@ export default defineComponent({
|
||||||
closeAllWindows() {
|
closeAllWindows() {
|
||||||
sort_index.value = [];
|
sort_index.value = [];
|
||||||
current_index.value = -1;
|
current_index.value = -1;
|
||||||
monitor_list_current_index.value = -1;
|
|
||||||
// test_monitor_wall.value.forEach((ele) => {
|
// test_monitor_wall.value.forEach((ele) => {
|
||||||
// ele.cmh = Math.round(ele.h / lcm.value);
|
// ele.cmh = Math.round(ele.h / lcm.value);
|
||||||
// ele.cmw = Math.round(ele.w / lcm.value);
|
// ele.cmw = Math.round(ele.w / lcm.value);
|
||||||
|
@ -2137,9 +2106,7 @@ export default defineComponent({
|
||||||
// });
|
// });
|
||||||
test_monitor_list.value.forEach((element) => {
|
test_monitor_list.value.forEach((element) => {
|
||||||
element.isHide = false;
|
element.isHide = false;
|
||||||
element.isactive=false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test_monitor_wall.value = [];
|
test_monitor_wall.value = [];
|
||||||
multiple_select.value = [];
|
multiple_select.value = [];
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
|
@ -2241,22 +2208,12 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
changewidth() {
|
changewidth() {
|
||||||
const wall_dom = wall.value;
|
|
||||||
let item = test_monitor_list.value[monitor_list_current_index.value];
|
let item = test_monitor_list.value[monitor_list_current_index.value];
|
||||||
// if (wall_dom) {
|
item.w = Number(item.cmw) * lcm.value;
|
||||||
// if(item.cmw==1214){
|
|
||||||
// item.w = 0.5 * wall_dom.offsetWidth;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
changeHeight() {
|
changeHeight() {
|
||||||
const wall_dom = wall.value;
|
|
||||||
let item = test_monitor_list.value[monitor_list_current_index.value];
|
let item = test_monitor_list.value[monitor_list_current_index.value];
|
||||||
// if (wall_dom) {
|
item.h = item.cmh * lcm.value;
|
||||||
// if(item.cmh==684){
|
|
||||||
// item.h = 0.5 * wall_dom?.offsetHeight;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
alignTop() {
|
alignTop() {
|
||||||
let item = test_monitor_wall.value[multiple_select.value[0]];
|
let item = test_monitor_wall.value[multiple_select.value[0]];
|
||||||
|
@ -2266,7 +2223,7 @@ export default defineComponent({
|
||||||
tep_item.currenty = item.currenty;
|
tep_item.currenty = item.currenty;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
multiple_select.value = [];
|
multiple_select.value=[]
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
},
|
},
|
||||||
alignBottom() {
|
alignBottom() {
|
||||||
|
@ -2277,7 +2234,7 @@ export default defineComponent({
|
||||||
tep_item.currenty = item.currenty + item.h - tep_item.h;
|
tep_item.currenty = item.currenty + item.h - tep_item.h;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
multiple_select.value = [];
|
multiple_select.value=[]
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
},
|
},
|
||||||
alignRight() {
|
alignRight() {
|
||||||
|
@ -2288,7 +2245,7 @@ export default defineComponent({
|
||||||
tep_item.currentx = item.currentx + item.w - tep_item.w;
|
tep_item.currentx = item.currentx + item.w - tep_item.w;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
multiple_select.value = [];
|
multiple_select.value=[]
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
},
|
},
|
||||||
alignLeft() {
|
alignLeft() {
|
||||||
|
@ -2299,7 +2256,7 @@ export default defineComponent({
|
||||||
tep_item.currentx = item.currentx;
|
tep_item.currentx = item.currentx;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
multiple_select.value = [];
|
multiple_select.value=[]
|
||||||
realtime_upload();
|
realtime_upload();
|
||||||
},
|
},
|
||||||
testLog(a: any) {
|
testLog(a: any) {
|
||||||
|
|
|
@ -318,7 +318,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
<style>
|
||||||
input::-webkit-outer-spin-button,
|
input::-webkit-outer-spin-button,
|
||||||
input::-webkit-inner-spin-button {
|
input::-webkit-inner-spin-button {
|
||||||
|
@ -361,9 +360,7 @@ export default defineComponent({
|
||||||
let $store = useStore();
|
let $store = useStore();
|
||||||
let $t = useI18n();
|
let $t = useI18n();
|
||||||
const ste_status = ref(0);
|
const ste_status = ref(0);
|
||||||
/**
|
|
||||||
* 计算当前的投影机
|
|
||||||
*/
|
|
||||||
const configselsect = computed(() => {
|
const configselsect = computed(() => {
|
||||||
return $store.state.selected_projector;
|
return $store.state.selected_projector;
|
||||||
});
|
});
|
||||||
|
@ -385,43 +382,15 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1]
|
$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 当前的参数
|
|
||||||
*/
|
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
||||||
/**
|
|
||||||
* 控制页面上当前显示垂直校正还是水平
|
|
||||||
*/
|
|
||||||
const now_v_h = ref("")
|
const now_v_h = ref("")
|
||||||
/**
|
|
||||||
* 水平校正 点的个数 默认取配置文件的第一个参数
|
|
||||||
*/
|
|
||||||
const value_h_point_amount = ref(Number(Object.keys(config.multi_hor_density)[0]))
|
const value_h_point_amount = ref(Number(Object.keys(config.multi_hor_density)[0]))
|
||||||
/**
|
|
||||||
* 垂直校正 点的个数 默认取配置文件的第一个参数
|
|
||||||
*/
|
|
||||||
const value_v_point_amount = ref(Number(Object.keys(config.multi_ver_density)[0]))
|
const value_v_point_amount = ref(Number(Object.keys(config.multi_ver_density)[0]))
|
||||||
/**
|
|
||||||
* 添加点的弹窗
|
|
||||||
*/
|
|
||||||
const add_dialog = ref(false)
|
const add_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 当前数量 好像没有用
|
|
||||||
*/
|
|
||||||
const now_amount = ref(0)
|
const now_amount = ref(0)
|
||||||
/**
|
|
||||||
* 可供选择的 水平 点的数量 绑定 select
|
|
||||||
*/
|
|
||||||
const options_value_h_point_amount = ref(<string[]>[])
|
const options_value_h_point_amount = ref(<string[]>[])
|
||||||
/**
|
|
||||||
* 可供选择的 垂直 点的数量 绑定 select
|
|
||||||
*/
|
|
||||||
const options_value_v_point_amount = ref(<string[]>[])
|
const options_value_v_point_amount = ref(<string[]>[])
|
||||||
/**
|
|
||||||
* 深度copy
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
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") {
|
||||||
|
@ -432,9 +401,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 使用服务器端的配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
value_h_point_amount.value = Number(Object.keys(config.multi_hor_density)[0])
|
value_h_point_amount.value = Number(Object.keys(config.multi_hor_density)[0])
|
||||||
value_v_point_amount.value = Number(Object.keys(config.multi_ver_density)[0])
|
value_v_point_amount.value = Number(Object.keys(config.multi_ver_density)[0])
|
||||||
|
@ -475,9 +442,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用缓存的配置
|
|
||||||
*/
|
|
||||||
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]);
|
||||||
|
@ -495,16 +460,11 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存缓存配置
|
|
||||||
*/
|
|
||||||
const save_set_cache = () => {
|
const save_set_cache = () => {
|
||||||
let tmp = { value_h: value_h.value, value_v: value_v.value, value_v_point_amount: value_v_point_amount.value, value_h_point_amount: value_h_point_amount.value, value_v_point: value_v_point.value, value_h_point: value_h_point.value }
|
let tmp = { value_h: value_h.value, value_v: value_v.value, value_v_point_amount: value_v_point_amount.value, value_h_point_amount: value_h_point_amount.value, value_v_point: value_v_point.value, value_h_point: value_h_point.value }
|
||||||
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 是否开启辅助线 变量
|
|
||||||
*/
|
|
||||||
const auxiliary_line = ref(false)
|
const auxiliary_line = ref(false)
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
|
@ -534,48 +494,25 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存 变量
|
|
||||||
*/
|
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
/**
|
//值
|
||||||
* 垂直点的值
|
|
||||||
*/
|
|
||||||
let value_h = ref(<DensityCorrection[]>[]);
|
let value_h = ref(<DensityCorrection[]>[]);
|
||||||
/**
|
|
||||||
* 水平点的值
|
|
||||||
*/
|
|
||||||
let value_v = ref(<DensityCorrection[]>[]);
|
let value_v = ref(<DensityCorrection[]>[]);
|
||||||
/**
|
//位置
|
||||||
* 水平点的位置
|
|
||||||
*/
|
|
||||||
let value_h_point = ref(<DensityCorrectionPoint[]>[]);
|
let value_h_point = ref(<DensityCorrectionPoint[]>[]);
|
||||||
/**
|
|
||||||
* 垂直点的位置
|
|
||||||
*/
|
|
||||||
let value_v_point = ref(<DensityCorrectionPoint[]>[]);
|
let value_v_point = ref(<DensityCorrectionPoint[]>[]);
|
||||||
/**
|
/**
|
||||||
* 当前选中 垂直的点的索引
|
* 当前选中的点的索引
|
||||||
*/
|
*/
|
||||||
const options_model_v = ref(0)
|
const options_model_v = ref(0)
|
||||||
/**
|
|
||||||
* 当前选中 水平的点的索引
|
|
||||||
*/
|
|
||||||
const options_model_h = ref(0)
|
const options_model_h = ref(0)
|
||||||
|
|
||||||
const div = ref();
|
const div = ref();
|
||||||
/**
|
|
||||||
* 用于限制分辨率最大值 会在渲染时 自动赋值
|
|
||||||
*/
|
|
||||||
const max = ref({ x: 0, y: 0 })
|
const max = ref({ x: 0, y: 0 })
|
||||||
/**
|
|
||||||
* 点的大小
|
|
||||||
*/
|
|
||||||
const point = ref({ w: 20, h: 20 })
|
const point = ref({ w: 20, h: 20 })
|
||||||
|
|
||||||
/**
|
|
||||||
* 监听垂直和水平界面切换
|
|
||||||
*/
|
|
||||||
watch(() => now_v_h, (newval, oldval) => {
|
watch(() => now_v_h, (newval, oldval) => {
|
||||||
if (newval.value == 'level') {
|
if (newval.value == 'level') {
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
|
set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
|
||||||
|
@ -587,9 +524,6 @@ export default defineComponent({
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `${options_model_v.value + 1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `${options_model_v.value + 1}`)
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
/**
|
|
||||||
* 监听垂直点 的数量
|
|
||||||
*/
|
|
||||||
watch(() => value_v_point_amount, (newval, oldval) => {
|
watch(() => value_v_point_amount, (newval, oldval) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -602,9 +536,6 @@ export default defineComponent({
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}, 100);
|
}, 100);
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
/**
|
|
||||||
* 监听水平点的数量
|
|
||||||
*/
|
|
||||||
watch(() => value_h_point_amount, (newval, oldval) => {
|
watch(() => value_h_point_amount, (newval, oldval) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -617,15 +548,10 @@ export default defineComponent({
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
/**
|
|
||||||
* 发送 select 选择的水平点数
|
|
||||||
*/
|
|
||||||
watch(() => options_model_h, (newval, oldval) => {
|
watch(() => options_model_h, (newval, oldval) => {
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `${value_h_point.value[newval.value].control_point}`)
|
set?.SetBlendingOption("blending_grids_select_point", `${value_h_point.value[newval.value].control_point}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
/**
|
|
||||||
* 发送 select 选择的垂直点数
|
|
||||||
*/
|
|
||||||
watch(() => options_model_v, (newval, oldval) => {
|
watch(() => options_model_v, (newval, oldval) => {
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `${value_v_point.value[newval.value].control_point}`)
|
set?.SetBlendingOption("blending_grids_select_point", `${value_v_point.value[newval.value].control_point}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
@ -644,12 +570,7 @@ export default defineComponent({
|
||||||
start_point(val, type)
|
start_point(val, type)
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 拖拽组件移动回调
|
|
||||||
* @param $event
|
|
||||||
* @param index
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const dragStartHandle = ($event: any, index: number, type: string) => {
|
const dragStartHandle = ($event: any, index: number, type: string) => {
|
||||||
let obj_x = $event.x
|
let obj_x = $event.x
|
||||||
let obj_y = $event.y
|
let obj_y = $event.y
|
||||||
|
@ -722,11 +643,7 @@ export default defineComponent({
|
||||||
y = (max.value.y - y - point.value.h) * Proportion.value.y
|
y = (max.value.y - y - point.value.h) * Proportion.value.y
|
||||||
return { x, y }
|
return { x, y }
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 给初始点赋值
|
|
||||||
* @param a
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const start_point = (a: number, type: string) => {
|
const start_point = (a: number, type: string) => {
|
||||||
if (type == 'h' || type == 'all') {
|
if (type == 'h' || type == 'all') {
|
||||||
value_h.value = []
|
value_h.value = []
|
||||||
|
@ -777,9 +694,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
start()
|
start()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
/**
|
|
||||||
* 计算比例
|
|
||||||
*/
|
|
||||||
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
||||||
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
||||||
options_value_h_point_amount.value = Object.keys(config.multi_hor_density)
|
options_value_h_point_amount.value = Object.keys(config.multi_hor_density)
|
||||||
|
@ -809,12 +723,7 @@ export default defineComponent({
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
sessionStorage.DensityCorrection = JSON.stringify(set_cache.value);
|
sessionStorage.DensityCorrection = JSON.stringify(set_cache.value);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 重置单个点的数据
|
|
||||||
* @param index 索引
|
|
||||||
* @param send
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const reset = (index: number, send: boolean, type: string) => {
|
const reset = (index: number, send: boolean, type: string) => {
|
||||||
if (type == 'v') {
|
if (type == 'v') {
|
||||||
value_v.value[index].x = value_v.value[index].def_x
|
value_v.value[index].x = value_v.value[index].def_x
|
||||||
|
@ -828,13 +737,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 发送数据
|
|
||||||
* @param index
|
|
||||||
* @param type
|
|
||||||
* @param value
|
|
||||||
* @param send
|
|
||||||
*/
|
|
||||||
const send_value = (index: number, type: string, value: number, send: boolean = true) => {
|
const send_value = (index: number, type: string, value: number, send: boolean = true) => {
|
||||||
if (!send) return;
|
if (!send) return;
|
||||||
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||||
|
@ -846,9 +748,6 @@ export default defineComponent({
|
||||||
set?.SetBlendingHorDensity(row, col, Number(value_h_point_amount.value), index + 1, Number(value));
|
set?.SetBlendingHorDensity(row, col, Number(value_h_point_amount.value), index + 1, Number(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 重置 多点数据
|
|
||||||
*/
|
|
||||||
const resetall = () => {
|
const resetall = () => {
|
||||||
switch (now_v_h.value) {
|
switch (now_v_h.value) {
|
||||||
case 'vertical':
|
case 'vertical':
|
||||||
|
@ -905,17 +804,9 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 删除点 弹窗
|
|
||||||
*/
|
|
||||||
const del_dialog = ref(false)
|
const del_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 添加点
|
|
||||||
* @param amount
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const add_control_points = (amount: number, type: string) => {
|
const add_control_points = (amount: number, type: string) => {
|
||||||
if (amount < 5||amount >=60) return
|
if (amount < 5) return
|
||||||
let tmpconfig: any = null
|
let tmpconfig: any = null
|
||||||
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||||
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
|
@ -1043,11 +934,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除 点数配置
|
|
||||||
* @param amount
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const reduce_control_points = (amount: number, type: string) => {
|
const reduce_control_points = (amount: number, type: string) => {
|
||||||
if (amount <= 5) return
|
if (amount <= 5) return
|
||||||
let tmpconfig: any = null
|
let tmpconfig: any = null
|
||||||
|
@ -1222,7 +1109,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* v数据 滚轮交互
|
* v数据
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const details_selsect_val = (details: any, type: string) => {
|
const details_selsect_val = (details: any, type: string) => {
|
||||||
|
@ -1247,13 +1134,10 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 增加 垂直校正点数
|
|
||||||
* @param val 数量
|
|
||||||
*/
|
|
||||||
const preview_v = (val: number) => {
|
const preview_v = (val: number) => {
|
||||||
val = Number(val)
|
val = Number(val)
|
||||||
if (val < 5 ||val>=60) return
|
if (val < 5) return
|
||||||
let width = allconfig.projector_width / (val - 1)
|
let width = allconfig.projector_width / (val - 1)
|
||||||
let height = allconfig.projector_height / (val - 1)
|
let height = allconfig.projector_height / (val - 1)
|
||||||
value_v.value = []
|
value_v.value = []
|
||||||
|
@ -1279,13 +1163,9 @@ export default defineComponent({
|
||||||
value_v_point_amount.value = val
|
value_v_point_amount.value = val
|
||||||
options_model_v.value = 1
|
options_model_v.value = 1
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 水平校正点的数量
|
|
||||||
* @param val 数量
|
|
||||||
*/
|
|
||||||
const preview_h = (val: number) => {
|
const preview_h = (val: number) => {
|
||||||
val = Number(val)
|
val = Number(val)
|
||||||
if (val < 5 ||val>=60) return
|
if (val < 5) return
|
||||||
let width = allconfig.projector_width / (val - 1)
|
let width = allconfig.projector_width / (val - 1)
|
||||||
let height = allconfig.projector_height / (val - 1)
|
let height = allconfig.projector_height / (val - 1)
|
||||||
value_h.value = []
|
value_h.value = []
|
||||||
|
@ -1397,17 +1277,11 @@ export default defineComponent({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手写长按和的那几实现
|
|
||||||
*/
|
|
||||||
|
|
||||||
let loop_start: NodeJS.Timeout
|
let loop_start: NodeJS.Timeout
|
||||||
let loop_finish: NodeJS.Timeout
|
let loop_finish: NodeJS.Timeout
|
||||||
/**
|
|
||||||
* 平板弹出来的操作 函数
|
|
||||||
* @param fun 加法还是减法+ -
|
|
||||||
* @param type x or y
|
|
||||||
*/
|
|
||||||
const mousedown = (fun: string, type: string) => {
|
const mousedown = (fun: string, type: string) => {
|
||||||
loop_start = setTimeout(() => {
|
loop_start = setTimeout(() => {
|
||||||
loop_finish = setInterval(() => {
|
loop_finish = setInterval(() => {
|
||||||
|
@ -1460,13 +1334,8 @@ export default defineComponent({
|
||||||
clearInterval(loop_finish)
|
clearInterval(loop_finish)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 控制 自定义 input x 箭头的显示
|
|
||||||
*/
|
|
||||||
const input_x_focus=ref(false)
|
const input_x_focus=ref(false)
|
||||||
/**
|
|
||||||
* 控制 自定义 input y 箭头的显示
|
|
||||||
*/
|
|
||||||
const input_y_focus=ref(false)
|
const input_y_focus=ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
<style>
|
||||||
input::-webkit-outer-spin-button,
|
input::-webkit-outer-spin-button,
|
||||||
input::-webkit-inner-spin-button {
|
input::-webkit-inner-spin-button {
|
||||||
|
@ -132,7 +131,6 @@ input::-webkit-inner-spin-button {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
defineComponent,
|
defineComponent,
|
||||||
|
@ -205,20 +203,10 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1]
|
$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 当前配置文件
|
|
||||||
*/
|
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
||||||
/**
|
|
||||||
* 当前点的数量
|
|
||||||
*/
|
|
||||||
const value_point_amount = ref(5)
|
const value_point_amount = ref(5)
|
||||||
|
|
||||||
/**
|
|
||||||
* 深度copy函数
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
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") {
|
||||||
|
@ -229,9 +217,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 使用服务器配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
|
@ -251,9 +237,7 @@ export default defineComponent({
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用缓存
|
|
||||||
*/
|
|
||||||
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]);
|
||||||
|
@ -262,16 +246,12 @@ export default defineComponent({
|
||||||
recalculate_coordinates()
|
recalculate_coordinates()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 保存缓存
|
|
||||||
*/
|
|
||||||
const save_set_cache = () => {
|
const save_set_cache = () => {
|
||||||
let tmp = { value: value.value, value_point: value_point.value }
|
let tmp = { value: value.value, value_point: value_point.value }
|
||||||
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 监听是否切换了投影机
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
@ -298,9 +278,7 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存 变量
|
|
||||||
*/
|
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
//值
|
//值
|
||||||
let value = ref(<DensityCorrection[]>[]);
|
let value = ref(<DensityCorrection[]>[]);
|
||||||
|
@ -310,21 +288,11 @@ export default defineComponent({
|
||||||
* 当前选中的点的索引
|
* 当前选中的点的索引
|
||||||
*/
|
*/
|
||||||
const options_model = ref(0)
|
const options_model = ref(0)
|
||||||
/**
|
|
||||||
* html div元素用来计算
|
|
||||||
*/
|
|
||||||
const div = ref();
|
const div = ref();
|
||||||
/**
|
|
||||||
* 最大值
|
|
||||||
*/
|
|
||||||
const max = ref({ x: 0, y: 0 })
|
const max = ref({ x: 0, y: 0 })
|
||||||
/**
|
|
||||||
* 点大小
|
|
||||||
*/
|
|
||||||
const point = ref({ w: 20, h: 20 })
|
const point = ref({ w: 20, h: 20 })
|
||||||
/**
|
|
||||||
* 监听点的切换
|
|
||||||
*/
|
|
||||||
watch(() => options_model, (newval, oldval) => {
|
watch(() => options_model, (newval, oldval) => {
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `4:${options_model.value + 1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `4:${options_model.value + 1}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
@ -337,9 +305,7 @@ export default defineComponent({
|
||||||
max.value.x = div.value.offsetWidth
|
max.value.x = div.value.offsetWidth
|
||||||
max.value.y = div.value.offsetHeight
|
max.value.y = div.value.offsetHeight
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 计算可供选择的点
|
|
||||||
*/
|
|
||||||
const options = computed(() => {
|
const options = computed(() => {
|
||||||
let tmp = []
|
let tmp = []
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
@ -350,18 +316,11 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
return tmp
|
return tmp
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 修改点数量函数
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const chang_point_amount = (val: number) => {
|
const chang_point_amount = (val: number) => {
|
||||||
start_point()
|
start_point()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 小点移动回调
|
|
||||||
* @param $event
|
|
||||||
* @param index
|
|
||||||
*/
|
|
||||||
const dragStartHandle = ($event: any, index: number) => {
|
const dragStartHandle = ($event: any, index: number) => {
|
||||||
let obj_x = $event.x
|
let obj_x = $event.x
|
||||||
let obj_y = $event.y
|
let obj_y = $event.y
|
||||||
|
@ -386,12 +345,7 @@ export default defineComponent({
|
||||||
send_value(index, value.value[index].x , value.value[index].y)
|
send_value(index, value.value[index].x , value.value[index].y)
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 点的数据发生修改时计算位置
|
|
||||||
* @param index
|
|
||||||
* @param $event
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const chang = (index: number, $event: any, type: string) => {
|
const chang = (index: number, $event: any, type: string) => {
|
||||||
index = Number(index)
|
index = Number(index)
|
||||||
if (now_selsect_projector?.value == '0-0'&&props.col=='2') {
|
if (now_selsect_projector?.value == '0-0'&&props.col=='2') {
|
||||||
|
|
|
@ -182,14 +182,14 @@
|
||||||
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
|
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
|
||||||
@update:model-value="chang('alpha')"
|
@update:model-value="chang('alpha')"
|
||||||
@click="() => { now_apg = 'alpha'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
@click="() => { now_apg = 'alpha'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
||||||
@focus="input_focus_apg[0] = true" @blur="input_focus_apg[0] = false" v-model.number="array[group].alpha"
|
@focus="input_focus_apg[0]=true" @blur="input_focus_apg[0]=false"
|
||||||
lazy-rules :rules="[
|
v-model.number="array[group].alpha" lazy-rules :rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val <= 1) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 1) || $t('Please enter a value within the range'),
|
||||||
]">
|
]" >
|
||||||
<template v-if="input_focus_apg[0]" v-slot:append>
|
<template v-if="input_focus_apg[0]" v-slot:append>
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
||||||
|
@ -214,15 +214,15 @@
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
||||||
@focus="input_focus_apg[1] = true" @blur="input_focus_apg[1] = false" @update:model-value="chang('p')"
|
@focus="input_focus_apg[1]=true" @blur="input_focus_apg[1]=false"
|
||||||
@click="() => { now_apg = 'p'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
@update:model-value="chang('p')" @click="() => { now_apg = 'p'; ispad ? ipad_chang_input = true : '' }"
|
||||||
v-model.number="array[group].p" lazy-rules :rules="[
|
:readonly="ispad" v-model.number="array[group].p" lazy-rules :rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
||||||
]">
|
]" >
|
||||||
<template v-if="input_focus_apg[1]" v-slot:append>
|
<template v-if="input_focus_apg[1]" v-slot:append>
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
||||||
|
@ -249,7 +249,8 @@
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
<q-input v-show="!ispad" :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
||||||
@update:model-value="chang('gamma')" @focus="input_focus_apg[2] = true" @blur="input_focus_apg[2] = false"
|
@update:model-value="chang('gamma')"
|
||||||
|
@focus="input_focus_apg[2]=true" @blur="input_focus_apg[2]=false"
|
||||||
@click="() => { now_apg = 'gamma'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
@click="() => { now_apg = 'gamma'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
||||||
v-model.number="array[group].gamma" lazy-rules :rules="[
|
v-model.number="array[group].gamma" lazy-rules :rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
|
@ -257,7 +258,7 @@
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
||||||
]">
|
]" >
|
||||||
<template v-if="input_focus_apg[2]" v-slot:append>
|
<template v-if="input_focus_apg[2]" v-slot:append>
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
||||||
|
@ -309,16 +310,17 @@
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<!-- <div class="text-h6">{{ $t('fusion zone') + (group + 1) }}</div> -->
|
<!-- <div class="text-h6">{{ $t('fusion zone') + (group + 1) }}</div> -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone')" :dense="true" filled v-model="group"
|
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone')" :dense="true" filled
|
||||||
@update:model-value="(val) => { group = val }" :options="options" emit-value map-options /></div>
|
v-model="group" @update:model-value="(val) => { group = val }" :options="options" emit-value
|
||||||
|
map-options /></div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="row q-pb-md">
|
<div class="row q-pb-md" >
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
|
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
|
||||||
@touchstart="handlerTouchstart('+')" @touchend="handlerTouchend" /></div>
|
@touchstart="handlerTouchstart('+')" @touchend="handlerTouchend" /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-pt-md">
|
<div class="row q-pt-md" >
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
|
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
|
||||||
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div>
|
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -331,11 +333,8 @@
|
||||||
<q-dialog v-model="ipad_chang_input">
|
<q-dialog v-model="ipad_chang_input">
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
<q-card style="width: 40vw; max-width: 80vw;">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<!-- <div class="text-h6">{{ $t('fusion zone') + options[group].label + ` ${now_apg}` }}</div> -->
|
<div class="text-h6">{{ $t('fusion zone') + options[group].label + ` ${now_apg}` }}</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone') + ` ${now_apg}`" :dense="true" filled v-model="group"
|
|
||||||
@update:model-value="(val) => { group = val }" :options="options" emit-value map-options /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="row q-pb-md">
|
<div class="row q-pb-md">
|
||||||
|
@ -371,7 +370,7 @@ p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
<style>
|
||||||
input::-webkit-outer-spin-button,
|
input::-webkit-outer-spin-button,
|
||||||
input::-webkit-inner-spin-button {
|
input::-webkit-inner-spin-button {
|
||||||
|
@ -432,10 +431,6 @@ export default defineComponent({
|
||||||
let url = window.location.href;
|
let url = window.location.href;
|
||||||
return url.indexOf("pad") != -1
|
return url.indexOf("pad") != -1
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 重置数据
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const reset = (type: string) => {
|
const reset = (type: string) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'gamma':
|
case 'gamma':
|
||||||
|
@ -452,24 +447,13 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
chang(type)
|
chang(type)
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 是否在切换数据 避免切换投影机是发送不该发送的数据
|
|
||||||
*/
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 深度拷贝
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
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") {
|
||||||
|
@ -480,23 +464,14 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 保存缓存
|
|
||||||
*/
|
|
||||||
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[selectedprojector.value];
|
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
||||||
/**
|
|
||||||
* 当前选择的投影机
|
|
||||||
*/
|
|
||||||
const configselsect = computed(() => {
|
const configselsect = computed(() => {
|
||||||
return $store.state.selected_projector;
|
return $store.state.selected_projector;
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 监听投影机切换
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
@ -527,10 +502,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
/**
|
|
||||||
* 输入inpu数据 时发送到后端
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const chang = (type: string) => {
|
const chang = (type: string) => {
|
||||||
if (ste_status.value == 1) return
|
if (ste_status.value == 1) return
|
||||||
if (type == "alpha") {
|
if (type == "alpha") {
|
||||||
|
@ -563,9 +535,6 @@ export default defineComponent({
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
};
|
};
|
||||||
//左上右下
|
//左上右下
|
||||||
/**
|
|
||||||
* 初始化数据时 自动获取焦点 的判断
|
|
||||||
*/
|
|
||||||
const setnowindex = () => {
|
const setnowindex = () => {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
let indexx = 4;
|
let indexx = 4;
|
||||||
|
@ -609,9 +578,6 @@ export default defineComponent({
|
||||||
}, 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 = Number(config.params[index].gamma.toFixed(2));
|
array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
|
||||||
|
@ -626,9 +592,6 @@ export default defineComponent({
|
||||||
use_set_cache();
|
use_set_cache();
|
||||||
setnowindex();
|
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 = Number(config.params[index].gamma.toFixed(2));
|
array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
|
||||||
|
@ -802,9 +765,6 @@ export default defineComponent({
|
||||||
const changenablefusion = () => {
|
const changenablefusion = () => {
|
||||||
$store.commit("setenablefusion", enablefusion.value);
|
$store.commit("setenablefusion", enablefusion.value);
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 利用缓存手动同步
|
|
||||||
*/
|
|
||||||
// const left_right_auto_add = (difference: number) => {
|
// const left_right_auto_add = (difference: number) => {
|
||||||
// let tmpobjall = JSON.parse($store.state.fusion_configuration)
|
// let tmpobjall = JSON.parse($store.state.fusion_configuration)
|
||||||
// if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0&&group.value==2) {
|
// if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0&&group.value==2) {
|
||||||
|
@ -902,7 +862,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 处理平板模式下 伽马校正操作
|
* 处理平板模式下 伽马校正操作
|
||||||
* 手写实现pad长按点击
|
|
||||||
*/
|
*/
|
||||||
const ipad_chang_input = ref(false)
|
const ipad_chang_input = ref(false)
|
||||||
const now_apg = ref("");
|
const now_apg = ref("");
|
||||||
|
@ -916,7 +875,6 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
|
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
|
||||||
}
|
}
|
||||||
chang(now_apg.value)
|
|
||||||
}, 30)
|
}, 30)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
if (fun == '+') {
|
if (fun == '+') {
|
||||||
|
@ -924,7 +882,6 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
|
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
|
||||||
}
|
}
|
||||||
chang(now_apg.value)
|
|
||||||
}
|
}
|
||||||
const handlerTouchend_apg = () => {
|
const handlerTouchend_apg = () => {
|
||||||
clearTimeout(loop__apg_end)
|
clearTimeout(loop__apg_end)
|
||||||
|
@ -944,16 +901,16 @@ export default defineComponent({
|
||||||
loop_start = setTimeout(() => {
|
loop_start = setTimeout(() => {
|
||||||
loop_finish = setInterval(() => {
|
loop_finish = setInterval(() => {
|
||||||
if (fun == '+') {
|
if (fun == '+') {
|
||||||
array[index].value += 2
|
array[index].value+=2
|
||||||
} else {
|
} else {
|
||||||
array[index].value -= 2
|
array[index].value-=2
|
||||||
}
|
}
|
||||||
}, 30)
|
}, 30)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
if (fun == '+') {
|
if (fun == '+') {
|
||||||
array[index].value += 2
|
array[index].value+=2
|
||||||
} else {
|
} else {
|
||||||
array[index].value -= 2
|
array[index].value-=2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -963,14 +920,12 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const input_focus_apg = ref([false, false, false,])
|
const input_focus_apg=ref([false,false,false,])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const ["上","左","右","下"]
|
// const ["上","左","右","下"]
|
||||||
/**
|
|
||||||
* 可供选择的
|
|
||||||
*/
|
|
||||||
const options = [{
|
const options = [{
|
||||||
label: $t.t('up'),
|
label: $t.t('up'),
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -983,6 +938,9 @@ export default defineComponent({
|
||||||
}, {
|
}, {
|
||||||
label: $t.t('down'),
|
label: $t.t('down'),
|
||||||
value: 3
|
value: 3
|
||||||
|
}, {
|
||||||
|
label: $t.t('down'),
|
||||||
|
value: 4
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1001,7 +959,7 @@ export default defineComponent({
|
||||||
array,
|
array,
|
||||||
chang,
|
chang,
|
||||||
enablefusion,
|
enablefusion,
|
||||||
// changenablefusion,
|
changenablefusion,
|
||||||
selectedprojector,
|
selectedprojector,
|
||||||
set_cache,
|
set_cache,
|
||||||
auxiliary_line,
|
auxiliary_line,
|
||||||
|
|
|
@ -110,9 +110,6 @@ export default defineComponent({
|
||||||
let model = reactive([20, 40, 20]);
|
let model = reactive([20, 40, 20]);
|
||||||
let options = ref([10, 20, 30, 40, 50, 60 ,80]);
|
let options = ref([10, 20, 30, 40, 50, 60 ,80]);
|
||||||
let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]);
|
let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]);
|
||||||
/**
|
|
||||||
* 发送颜色 根据index不同确定是那个接口
|
|
||||||
*/
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
switch (index.value) {
|
switch (index.value) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -131,11 +128,6 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 修改 横纵 线的数量
|
|
||||||
* @param type 类型
|
|
||||||
* @param value 值
|
|
||||||
*/
|
|
||||||
const update_row_col = (type: number, value: number) => {
|
const update_row_col = (type: number, value: number) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -151,10 +143,6 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 修改 单选 发送数据 使用switch 匹配多个
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const send_off = (type: number) => {
|
const send_off = (type: number) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -176,9 +164,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用服务端配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
let server_conf = JSON.parse($store.state.fusion_configuration).options
|
let server_conf = JSON.parse($store.state.fusion_configuration).options
|
||||||
model[0] = server_conf.blending_grids_row ?? 20;
|
model[0] = server_conf.blending_grids_row ?? 20;
|
||||||
|
@ -196,16 +181,10 @@ export default defineComponent({
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
set_sessionStorage()
|
set_sessionStorage()
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 保存缓存到sessionStorage
|
|
||||||
*/
|
|
||||||
const set_sessionStorage = () => {
|
const set_sessionStorage = () => {
|
||||||
let tmp = { RowsColumns: RowsColumns, color: color, model: model }
|
let tmp = { RowsColumns: RowsColumns, color: color, model: model }
|
||||||
sessionStorage.GridSettings = JSON.stringify(tmp)
|
sessionStorage.GridSettings = JSON.stringify(tmp)
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 获取sessionStorage
|
|
||||||
*/
|
|
||||||
const get_sessionStorage = () => {
|
const get_sessionStorage = () => {
|
||||||
let tmp = JSON.parse(sessionStorage.GridSettings)
|
let tmp = JSON.parse(sessionStorage.GridSettings)
|
||||||
for (let index = 0; index < tmp.RowsColumns.length; index++) {
|
for (let index = 0; index < tmp.RowsColumns.length; index++) {
|
||||||
|
|
|
@ -204,7 +204,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
<style>
|
||||||
input::-webkit-outer-spin-button,
|
input::-webkit-outer-spin-button,
|
||||||
input::-webkit-inner-spin-button {
|
input::-webkit-inner-spin-button {
|
||||||
|
@ -213,7 +212,6 @@ input::-webkit-inner-spin-button {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
defineComponent,
|
defineComponent,
|
||||||
|
@ -272,35 +270,13 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1]
|
$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 当前投影机的数据
|
|
||||||
*/
|
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
||||||
/**
|
|
||||||
* 当前点的个数
|
|
||||||
*/
|
|
||||||
const value_point_amount = ref(9)
|
const value_point_amount = ref(9)
|
||||||
/**
|
|
||||||
* 删除 弹窗
|
|
||||||
*/
|
|
||||||
const del_dialog = ref(false)
|
const del_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 添加弹窗
|
|
||||||
*/
|
|
||||||
const add_dialog = ref(false)
|
const add_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 当前点的个数
|
|
||||||
*/
|
|
||||||
const now_amount = ref(9)
|
const now_amount = ref(9)
|
||||||
/**
|
|
||||||
* 可以选择点数的列表
|
|
||||||
*/
|
|
||||||
const options_value_point_amount = ref(<string[]>[])
|
const options_value_point_amount = ref(<string[]>[])
|
||||||
/**
|
|
||||||
* 深度copy
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
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") {
|
||||||
|
@ -312,9 +288,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 使用服务端获取的配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
value_point_amount.value = Number(Object.keys(config.multi_curved_surface)[0])
|
value_point_amount.value = Number(Object.keys(config.multi_curved_surface)[0])
|
||||||
let a = value_point_amount.value
|
let a = value_point_amount.value
|
||||||
|
@ -335,9 +309,7 @@ export default defineComponent({
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用本地缓存配置
|
|
||||||
*/
|
|
||||||
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]);
|
||||||
|
@ -347,17 +319,13 @@ export default defineComponent({
|
||||||
recalculate_coordinates()
|
recalculate_coordinates()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 保存本地缓存
|
|
||||||
*/
|
|
||||||
const save_set_cache = () => {
|
const save_set_cache = () => {
|
||||||
let tmp = { value: value.value, value_point_amount: value_point_amount.value, value_point: value_point.value }
|
let tmp = { value: value.value, value_point_amount: value_point_amount.value, value_point: value_point.value }
|
||||||
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 监听投影机是否切换
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
@ -387,9 +355,7 @@ export default defineComponent({
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存 变量
|
|
||||||
*/
|
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
//值
|
//值
|
||||||
let value = ref(<DensityCorrection[]>[]);
|
let value = ref(<DensityCorrection[]>[]);
|
||||||
|
@ -401,23 +367,13 @@ export default defineComponent({
|
||||||
const options_model = ref(0)
|
const options_model = ref(0)
|
||||||
|
|
||||||
const div = ref();
|
const div = ref();
|
||||||
/**
|
|
||||||
* 分辨率最大值
|
|
||||||
*/
|
|
||||||
const max = ref({ x: 0, y: 0 })
|
const max = ref({ x: 0, y: 0 })
|
||||||
/**
|
|
||||||
* 点的大小
|
|
||||||
*/
|
|
||||||
const point = ref({ w: 20, h: 20 })
|
const point = ref({ w: 20, h: 20 })
|
||||||
/**
|
|
||||||
* 发送当前选择的点
|
|
||||||
*/
|
|
||||||
watch(() => options_model, (newval, oldval) => {
|
watch(() => options_model, (newval, oldval) => {
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `9:${newval.value + 1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `9:${newval.value + 1}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
/**
|
|
||||||
* 发送当前点的数量
|
|
||||||
*/
|
|
||||||
watch(() => value_point_amount, (newval, oldval) => {
|
watch(() => value_point_amount, (newval, oldval) => {
|
||||||
if (ste_status.value == 0) set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
|
if (ste_status.value == 0) set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
|
||||||
options_model.value = 0
|
options_model.value = 0
|
||||||
|
@ -433,19 +389,12 @@ export default defineComponent({
|
||||||
max.value.y = div.value.offsetHeight
|
max.value.y = div.value.offsetHeight
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
|
||||||
* 变更点数
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const chang_point_amount = (val: number) => {
|
const chang_point_amount = (val: number) => {
|
||||||
start_point(val)
|
start_point(val)
|
||||||
//use_set_cache()
|
//use_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 拖拽组件移动回调
|
|
||||||
* @param $event
|
|
||||||
* @param index
|
|
||||||
*/
|
|
||||||
const dragStartHandle = ($event: any, index: number) => {
|
const dragStartHandle = ($event: any, index: number) => {
|
||||||
let obj_x = $event.x
|
let obj_x = $event.x
|
||||||
let obj_y = $event.y
|
let obj_y = $event.y
|
||||||
|
@ -455,12 +404,7 @@ export default defineComponent({
|
||||||
send_value(index, Math.trunc(tmp.x), Math.trunc(tmp.y))
|
send_value(index, Math.trunc(tmp.x), Math.trunc(tmp.y))
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 修改input 手动计算拖拽组件的位置
|
|
||||||
* @param index
|
|
||||||
* @param $event
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const chang = (index: number, $event: any, type: string) => {
|
const chang = (index: number, $event: any, type: string) => {
|
||||||
index = Number(index)
|
index = Number(index)
|
||||||
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
||||||
|
@ -470,9 +414,6 @@ export default defineComponent({
|
||||||
|
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 计算可供选择的点
|
|
||||||
*/
|
|
||||||
const options = computed(() => {
|
const options = computed(() => {
|
||||||
let tmp = []
|
let tmp = []
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
@ -507,10 +448,7 @@ export default defineComponent({
|
||||||
y = (max.value.y - (y + point.value.h)) * Proportion.value.y
|
y = (max.value.y - (y + point.value.h)) * Proportion.value.y
|
||||||
return { x, y }
|
return { x, y }
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 初始化 赋值
|
|
||||||
* @param a
|
|
||||||
*/
|
|
||||||
const start_point = (a: number) => {
|
const start_point = (a: number) => {
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
|
@ -531,9 +469,7 @@ export default defineComponent({
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 用于模拟数据让dom先渲染
|
|
||||||
*/
|
|
||||||
const start = () => {
|
const start = () => {
|
||||||
let tmp: DensityCorrectionPoint = { control_point: 0, x: 0, y: 0, def_x: 0, def_y: 0 };
|
let tmp: DensityCorrectionPoint = { control_point: 0, x: 0, y: 0, def_x: 0, def_y: 0 };
|
||||||
value.value.push(tmp)
|
value.value.push(tmp)
|
||||||
|
@ -541,9 +477,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
start()
|
start()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
/**
|
|
||||||
* 计算比例
|
|
||||||
*/
|
|
||||||
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
||||||
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
||||||
|
|
||||||
|
@ -567,38 +500,22 @@ export default defineComponent({
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 注销组件时 把当前修改的数据存入sessionStorage
|
|
||||||
*/
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
sessionStorage.SurfaceCorrection = JSON.stringify(set_cache.value);
|
sessionStorage.SurfaceCorrection = JSON.stringify(set_cache.value);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 重置
|
|
||||||
* @param index 索引
|
|
||||||
* @param send 是否发送给后端
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const reset = (index: number, send: boolean, type: string) => {
|
const reset = (index: number, send: boolean, type: string) => {
|
||||||
value.value[index].x = value.value[index].def_x
|
value.value[index].x = value.value[index].def_x
|
||||||
value.value[index].y = value.value[index].def_y
|
value.value[index].y = value.value[index].def_y
|
||||||
chang(index, value.value[index].def_y, type)
|
chang(index, value.value[index].def_y, type)
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 发送点的数据
|
|
||||||
* @param index 当前点的索引
|
|
||||||
* @param x x值
|
|
||||||
* @param y y值
|
|
||||||
*/
|
|
||||||
const send_value = (index: number, x: number, y: number) => {
|
const send_value = (index: number, x: number, y: number) => {
|
||||||
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||||
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
set?.setBlendingCorrection(row, col, 9, value_point.value.length, index + 1, Number(x), Number(y));
|
set?.setBlendingCorrection(row, col, 9, value_point.value.length, index + 1, Number(x), Number(y));
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 重置全部点的参数
|
|
||||||
*/
|
|
||||||
const resetall = () => {
|
const resetall = () => {
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
value.value[index].x = value.value[index].def_x
|
value.value[index].x = value.value[index].def_x
|
||||||
|
@ -610,9 +527,6 @@ export default defineComponent({
|
||||||
send_value(-1, 0, 0)
|
send_value(-1, 0, 0)
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 重置所有配置方案的 配置
|
|
||||||
*/
|
|
||||||
const resetall_all = () => {
|
const resetall_all = () => {
|
||||||
let amount_tmp = value_point_amount.value
|
let amount_tmp = value_point_amount.value
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
@ -635,9 +549,6 @@ export default defineComponent({
|
||||||
start_point(Number(value_point_amount.value))
|
start_point(Number(value_point_amount.value))
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 窗口改变大小时重新计算 比例
|
|
||||||
*/
|
|
||||||
const recalculate_coordinates = () => {
|
const recalculate_coordinates = () => {
|
||||||
try {
|
try {
|
||||||
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
||||||
|
@ -656,12 +567,8 @@ export default defineComponent({
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 增加点数
|
|
||||||
* @param amount 数量 平方
|
|
||||||
*/
|
|
||||||
const add_control_points = (amount: number) => {
|
const add_control_points = (amount: number) => {
|
||||||
if (amount < 9 ||amount>=169) return
|
if (amount < 9) return
|
||||||
let cardinality = Math.sqrt(amount)
|
let cardinality = Math.sqrt(amount)
|
||||||
amount = (cardinality + 1) ** 2
|
amount = (cardinality + 1) ** 2
|
||||||
let tmpconfig: any = null
|
let tmpconfig: any = null
|
||||||
|
@ -707,14 +614,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
ste_status.value = 0;
|
|
||||||
});
|
});
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 删除点数量
|
|
||||||
* @param amount
|
|
||||||
*/
|
|
||||||
const del_control_points = (amount: number) => {
|
const del_control_points = (amount: number) => {
|
||||||
let tmp = amount
|
let tmp = amount
|
||||||
if (amount <= 9) return
|
if (amount <= 9) return
|
||||||
|
@ -764,7 +666,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
ste_status.value = 0;
|
|
||||||
|
|
||||||
});
|
});
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
|
@ -813,18 +714,13 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
ste_status.value = 0;
|
|
||||||
});
|
});
|
||||||
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
|
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 预览增加点的效果
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const preview = (val: number) => {
|
const preview = (val: number) => {
|
||||||
val = Number(val)
|
val = Number(val)
|
||||||
if (val < 3||val>=13) return
|
if (val < 3) return
|
||||||
let width = allconfig.projector_width / (val - 1)
|
let width = allconfig.projector_width / (val - 1)
|
||||||
let height = allconfig.projector_height / (val - 1)
|
let height = allconfig.projector_height / (val - 1)
|
||||||
value.value = []
|
value.value = []
|
||||||
|
@ -975,17 +871,13 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断是否是平板
|
|
||||||
*/
|
|
||||||
const ispad = computed(() => {
|
const ispad = computed(() => {
|
||||||
let url = window.location.href;
|
let url = window.location.href;
|
||||||
return url.indexOf("pad") != -1
|
return url.indexOf("pad") != -1
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
|
||||||
* 针对平板的 手动实现单机和长按
|
|
||||||
*/
|
|
||||||
let loop_start: NodeJS.Timeout
|
let loop_start: NodeJS.Timeout
|
||||||
let loop_finish: NodeJS.Timeout
|
let loop_finish: NodeJS.Timeout
|
||||||
|
|
||||||
|
@ -1037,13 +929,8 @@ export default defineComponent({
|
||||||
clearInterval(loop_finish)
|
clearInterval(loop_finish)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 控制是否显示 input x 的自定义监听
|
|
||||||
*/
|
|
||||||
const input_x_focus=ref(false)
|
const input_x_focus=ref(false)
|
||||||
/**
|
|
||||||
* 控制是否显示 input y 的自定义监听
|
|
||||||
*/
|
|
||||||
const input_y_focus=ref(false)
|
const input_y_focus=ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1054,6 +941,7 @@ export default defineComponent({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
options_model,
|
options_model,
|
||||||
});
|
});
|
||||||
|
|
|
@ -88,12 +88,12 @@
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<span>{{ $t("disable blending params") }}</span>
|
<!-- <span>{{ $t("disable blending params") }}</span>
|
||||||
<q-checkbox style="justify-content: flex-start" v-model="disable_blending_params"
|
<q-checkbox style="justify-content: flex-start" v-model="disable_blending_params"
|
||||||
@click="send_disable_blending_params" />
|
@click="send_disable_blending_params" />
|
||||||
<span>{{ $t("show blending grids") }}</span>
|
<span>{{ $t("show blending grids") }}</span>
|
||||||
<q-checkbox style="justify-content: flex-start" v-model="show_blending_grids"
|
<q-checkbox style="justify-content: flex-start" v-model="show_blending_grids"
|
||||||
@click="send_show_blending_grids" />
|
@click="send_show_blending_grids" /> -->
|
||||||
<div class="q-space" data-v-39efcd1f=""></div>
|
<div class="q-space" data-v-39efcd1f=""></div>
|
||||||
<div class="q-space" data-v-39efcd1f=""></div>
|
<div class="q-space" data-v-39efcd1f=""></div>
|
||||||
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
|
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
{{ $t('Whether to change the projector layout to') + dialog_data_projectorlayout.parameter }}
|
{{ $t('Whether to change the projector layout to') + dialog_data.parameter }}
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn flat :label="$t('Cancel')" @click="()=>{re_match_data();confirm_projectorlayout=false}" color="primary" />
|
<q-btn flat :label="$t('Cancel')" @click="()=>{re_match_data();confirm_projectorlayout=false}" color="primary" />
|
||||||
|
@ -276,9 +276,6 @@ export default defineComponent({
|
||||||
* 当前平板是否全屏
|
* 当前平板是否全屏
|
||||||
*/
|
*/
|
||||||
const is_pad_screen = ref(false);
|
const is_pad_screen = ref(false);
|
||||||
/**
|
|
||||||
* 计算平板和pc的样式
|
|
||||||
*/
|
|
||||||
const is_pad_style = computed(() => {
|
const is_pad_style = computed(() => {
|
||||||
let url = window.location.href
|
let url = window.location.href
|
||||||
if (url.indexOf("pad") != -1 && $t.locale.value == "en-US") {
|
if (url.indexOf("pad") != -1 && $t.locale.value == "en-US") {
|
||||||
|
@ -289,40 +286,19 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
return "60vw"
|
return "60vw"
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 选择配置的弹窗
|
|
||||||
*/
|
|
||||||
const select_configuration = ref(false)
|
const select_configuration = ref(false)
|
||||||
/**
|
|
||||||
* 删除配置时弹窗
|
|
||||||
*/
|
|
||||||
const del_dialog = ref(false)
|
const del_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 后端获取的配置
|
|
||||||
*/
|
|
||||||
const config_projectors = ref(null)
|
const config_projectors = ref(null)
|
||||||
/**
|
|
||||||
* 选择配置文件的名称
|
|
||||||
*/
|
|
||||||
const select_configuration_name = ref("")
|
const select_configuration_name = ref("")
|
||||||
/**
|
|
||||||
* 发送是否禁用融合参数
|
|
||||||
*/
|
|
||||||
const send_disable_blending_params = () => {
|
const send_disable_blending_params = () => {
|
||||||
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
|
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 当前分辨率 在配置文件中的索引
|
|
||||||
*/
|
|
||||||
const now_resolution = ref(1)
|
const now_resolution = ref(1)
|
||||||
// let allconfig = JSON.parse($store.state.fusion_configuration);
|
// let allconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
/**
|
/**
|
||||||
* 模拟数据完成dom渲染再次获取真实后台数据
|
* 模拟数据完成dom渲染再次获取真实后台数据
|
||||||
*/
|
*/
|
||||||
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1920,\"height\": 1080}]}");
|
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1920,\"height\": 1080}]}");
|
||||||
/**
|
|
||||||
* 计算可供选择的分辨率
|
|
||||||
*/
|
|
||||||
const options_resolution = computed(() => {
|
const options_resolution = computed(() => {
|
||||||
let tmp = [];
|
let tmp = [];
|
||||||
if (allconfig.resolution) {
|
if (allconfig.resolution) {
|
||||||
|
@ -335,9 +311,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
return tmp
|
return tmp
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 子组件
|
|
||||||
*/
|
|
||||||
const child: any = ref(null);
|
const child: any = ref(null);
|
||||||
/**
|
/**
|
||||||
* 开启网格时发送全部参数
|
* 开启网格时发送全部参数
|
||||||
|
@ -430,35 +403,15 @@ export default defineComponent({
|
||||||
sessionStorage.removeItem("Debugging");
|
sessionStorage.removeItem("Debugging");
|
||||||
sessionStorage.removeItem("FusionLocale_async");
|
sessionStorage.removeItem("FusionLocale_async");
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 从配置文件中获取的行和列
|
|
||||||
*/
|
|
||||||
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();
|
||||||
optionsstr.value = "";
|
optionsstr.value = "";
|
||||||
/**
|
|
||||||
* 是否禁用融合参数 的参数名称
|
|
||||||
*/
|
|
||||||
const disable_blending_params_id = ref("blending@disable_blending_params");
|
const disable_blending_params_id = ref("blending@disable_blending_params");
|
||||||
/**
|
|
||||||
* 是否禁用融合参数
|
|
||||||
*/
|
|
||||||
const disable_blending_params = ref(false);
|
const disable_blending_params = ref(false);
|
||||||
/**
|
|
||||||
* 是否开启网格的参数名称
|
|
||||||
*/
|
|
||||||
const show_blending_grids_id = ref("blending_grids_show");
|
const show_blending_grids_id = ref("blending_grids_show");
|
||||||
/**
|
|
||||||
* 是否开启网格
|
|
||||||
*/
|
|
||||||
const show_blending_grids = ref(true);
|
const show_blending_grids = ref(true);
|
||||||
/**
|
|
||||||
* 是否保存配置弹窗
|
|
||||||
*/
|
|
||||||
const medium = ref(false);
|
const medium = ref(false);
|
||||||
const options = computed({
|
const options = computed({
|
||||||
get() {
|
get() {
|
||||||
|
@ -563,9 +516,6 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 点击页面取消时调用 恢复默认参数
|
|
||||||
*/
|
|
||||||
const clear = () => {
|
const clear = () => {
|
||||||
record_times.value = 0
|
record_times.value = 0
|
||||||
// show_blending_grids.value = false;
|
// show_blending_grids.value = false;
|
||||||
|
@ -623,9 +573,6 @@ export default defineComponent({
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
optionsstr.value = "FourPointCalibration";
|
optionsstr.value = "FourPointCalibration";
|
||||||
allconfig = JSON.parse($store.state.fusion_configuration);
|
allconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
/**
|
|
||||||
* 匹配当前分辨率的索引 没有匹配到自动加入当前分辨率
|
|
||||||
*/
|
|
||||||
if (allconfig.resolution) {
|
if (allconfig.resolution) {
|
||||||
for (let index = 0; index < allconfig.resolution.length; index++) {
|
for (let index = 0; index < allconfig.resolution.length; index++) {
|
||||||
if (allconfig.resolution[index].width == allconfig.projector_width && allconfig.resolution[index].height == allconfig.projector_height) {
|
if (allconfig.resolution[index].width == allconfig.projector_width && allconfig.resolution[index].height == allconfig.projector_height) {
|
||||||
|
@ -637,9 +584,7 @@ export default defineComponent({
|
||||||
allconfig = { resolution: [{ width: tmp.projector_width, height: tmp.projector_height }] };
|
allconfig = { resolution: [{ width: tmp.projector_width, height: tmp.projector_height }] };
|
||||||
now_resolution.value = 0
|
now_resolution.value = 0
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 计算当前可供选择的 投影机布局
|
|
||||||
*/
|
|
||||||
projectorlayout.value = []
|
projectorlayout.value = []
|
||||||
let cont = 0
|
let cont = 0
|
||||||
for (let index = 1; index <= tmp.max_projector_count; index++) {
|
for (let index = 1; index <= tmp.max_projector_count; index++) {
|
||||||
|
@ -653,9 +598,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 匹配当前投影机布局
|
|
||||||
*/
|
|
||||||
for (let index = 0; index < projectorlayout.value.length; index++) {
|
for (let index = 0; index < projectorlayout.value.length; index++) {
|
||||||
let arr = projectorlayout.value[index].label.split('x');
|
let arr = projectorlayout.value[index].label.split('x');
|
||||||
if (tmp.col == Number(arr[1]) && tmp.row == Number(arr[0])) {
|
if (tmp.col == Number(arr[1]) && tmp.row == Number(arr[0])) {
|
||||||
|
@ -673,19 +616,11 @@ export default defineComponent({
|
||||||
}, 1000);
|
}, 1000);
|
||||||
// console.log("已经挂载 ")
|
// console.log("已经挂载 ")
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 保存配置的名称
|
|
||||||
*/
|
|
||||||
const save_cover_name = ref("")
|
const save_cover_name = ref("")
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
const plan_list = [
|
const plan_list = [
|
||||||
''
|
''
|
||||||
]
|
]
|
||||||
/**
|
|
||||||
* 应用当前选择的配置文件
|
|
||||||
*/
|
|
||||||
const apply_the_selected_configuration = () => {
|
const apply_the_selected_configuration = () => {
|
||||||
$q.loading.show({
|
$q.loading.show({
|
||||||
message: 'Loading please wait'
|
message: 'Loading please wait'
|
||||||
|
@ -727,20 +662,12 @@ export default defineComponent({
|
||||||
getconfig()
|
getconfig()
|
||||||
}
|
}
|
||||||
const plan_list_op = ref(plan_list)
|
const plan_list_op = ref(plan_list)
|
||||||
/**
|
|
||||||
* select 自动提示函数
|
|
||||||
* @param val
|
|
||||||
* @param update
|
|
||||||
*/
|
|
||||||
const filterFn = (val: any, update: any) => {
|
const filterFn = (val: any, update: any) => {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLocaleLowerCase()
|
const needle = val.toLocaleLowerCase()
|
||||||
plan_list_op.value = plan_list.filter(v => v.toLocaleLowerCase().indexOf(needle) > -1)
|
plan_list_op.value = plan_list.filter(v => v.toLocaleLowerCase().indexOf(needle) > -1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 当前按下ctrl 次数
|
|
||||||
*/
|
|
||||||
const record_times = ref(0)
|
const record_times = ref(0)
|
||||||
const setModel = (val: string) => {
|
const setModel = (val: string) => {
|
||||||
save_cover_name.value = val
|
save_cover_name.value = val
|
||||||
|
@ -750,9 +677,7 @@ export default defineComponent({
|
||||||
set?.SaveBlendingConfig(save_cover_name.value);
|
set?.SaveBlendingConfig(save_cover_name.value);
|
||||||
medium.value = false
|
medium.value = false
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 是否开启debug页面
|
|
||||||
*/
|
|
||||||
const isdebug = computed(() => {
|
const isdebug = computed(() => {
|
||||||
try {
|
try {
|
||||||
return record_times.value > 2
|
return record_times.value > 2
|
||||||
|
@ -761,21 +686,11 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 需要删除的配置 名称
|
|
||||||
*/
|
|
||||||
const name_to_be_deleted = ref("");
|
const name_to_be_deleted = ref("");
|
||||||
/**
|
|
||||||
* 待删除配置函数
|
|
||||||
* @param name 待删除的名称
|
|
||||||
*/
|
|
||||||
const del_scenes = (name: string) => {
|
const del_scenes = (name: string) => {
|
||||||
del_dialog.value = true;
|
del_dialog.value = true;
|
||||||
name_to_be_deleted.value = name;
|
name_to_be_deleted.value = name;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 正式删除配置的函数
|
|
||||||
*/
|
|
||||||
const dialog_del_scenes = () => {
|
const dialog_del_scenes = () => {
|
||||||
set?.DeleteBlendingScene(name_to_be_deleted.value);
|
set?.DeleteBlendingScene(name_to_be_deleted.value);
|
||||||
plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1)
|
plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1)
|
||||||
|
@ -783,14 +698,7 @@ export default defineComponent({
|
||||||
select_configuration_name.value = ''
|
select_configuration_name.value = ''
|
||||||
save_cover_name.value = ''
|
save_cover_name.value = ''
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 当前选择的投影机
|
|
||||||
*/
|
|
||||||
const now_selsect_projector = ref("0-0")
|
const now_selsect_projector = ref("0-0")
|
||||||
/**
|
|
||||||
* 发送当前选择的投影机
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const currently_selected_projector = (value: string) => {
|
const currently_selected_projector = (value: string) => {
|
||||||
set?.SetBlendingOption('blending_grids_select_projector', value);
|
set?.SetBlendingOption('blending_grids_select_projector', value);
|
||||||
now_selsect_projector.value = value
|
now_selsect_projector.value = value
|
||||||
|
@ -800,17 +708,10 @@ export default defineComponent({
|
||||||
* 依赖注入
|
* 依赖注入
|
||||||
*/
|
*/
|
||||||
provide("now_selsect_projector", now_selsect_projector);
|
provide("now_selsect_projector", now_selsect_projector);
|
||||||
/**
|
|
||||||
* 可以供选择的布局 变量
|
|
||||||
*/
|
|
||||||
let projectorlayout = ref([{ label: '1x1', value: 0 }, { label: '1x2', value: 1 }])
|
let projectorlayout = ref([{ label: '1x1', value: 0 }, { label: '1x2', value: 1 }])
|
||||||
let projectorlayout_tmp = ref(<string[]>[])
|
let projectorlayout_tmp = ref(<string[]>[])
|
||||||
const now_select_projectorlayout = ref(0)
|
const now_select_projectorlayout = ref(0)
|
||||||
const now_select_projectorlayout_tmp = ref("")
|
const now_select_projectorlayout_tmp = ref("")
|
||||||
/**
|
|
||||||
* 发送当前选择的布局
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const send_projectorlayout = (val: number) => {
|
const send_projectorlayout = (val: number) => {
|
||||||
let arr = projectorlayout.value[val].label.split('x');
|
let arr = projectorlayout.value[val].label.split('x');
|
||||||
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
|
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
|
||||||
|
@ -841,10 +742,7 @@ export default defineComponent({
|
||||||
getconfig()
|
getconfig()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 发送当前选择的布局
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const send_projectorlayout2 = (val: string) => {
|
const send_projectorlayout2 = (val: string) => {
|
||||||
let arr = val.split('x');
|
let arr = val.split('x');
|
||||||
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
|
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
|
||||||
|
@ -934,9 +832,7 @@ export default defineComponent({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* select 组件选中就触发修改 这里是通过再次获取数据判断 显示在页面
|
|
||||||
*/
|
|
||||||
const re_match_data = () => {
|
const re_match_data = () => {
|
||||||
let tmp = JSON.parse($store.state.fusion_configuration);
|
let tmp = JSON.parse($store.state.fusion_configuration);
|
||||||
for (let index = 0; index < options_resolution.value.length; index++) {
|
for (let index = 0; index < options_resolution.value.length; index++) {
|
||||||
|
@ -957,9 +853,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const element: any = ref()
|
const element: any = ref()
|
||||||
/**
|
|
||||||
* 手动全屏指定元素
|
|
||||||
*/
|
|
||||||
const element_full_screen = () => {
|
const element_full_screen = () => {
|
||||||
let elem = document.getElementById("element")
|
let elem = document.getElementById("element")
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
|
@ -980,30 +873,15 @@ export default defineComponent({
|
||||||
interface projectorlayoutarray {
|
interface projectorlayoutarray {
|
||||||
label: string; value: number;
|
label: string; value: number;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 经过筛选的 投影机布局
|
|
||||||
*/
|
|
||||||
const show_projectorlayout = ref(<projectorlayoutarray[]>[])
|
const show_projectorlayout = ref(<projectorlayoutarray[]>[])
|
||||||
/**
|
|
||||||
* 筛选投影机函数
|
|
||||||
* @param val
|
|
||||||
* @param update
|
|
||||||
*/
|
|
||||||
const filterFn_projector = (val: any, update: any) => {
|
const filterFn_projector = (val: any, update: any) => {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase()
|
const needle = val.toLowerCase()
|
||||||
show_projectorlayout.value = projectorlayout.value.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
|
show_projectorlayout.value = projectorlayout.value.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 经过筛选的 投影机布局
|
|
||||||
*/
|
|
||||||
const show_projectorlayout2 = ref(<string[]>[])
|
const show_projectorlayout2 = ref(<string[]>[])
|
||||||
/**
|
|
||||||
* 筛选投影机函数
|
|
||||||
* @param val
|
|
||||||
* @param update
|
|
||||||
*/
|
|
||||||
const filterFn_projector2 = (val: any, update: any) => {
|
const filterFn_projector2 = (val: any, update: any) => {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase()
|
const needle = val.toLowerCase()
|
||||||
|
|
|
@ -330,6 +330,7 @@ export default defineComponent({
|
||||||
plan_running,
|
plan_running,
|
||||||
window_rect_edit_dialog,
|
window_rect_edit_dialog,
|
||||||
power_flag,
|
power_flag,
|
||||||
|
getconfig,
|
||||||
|
|
||||||
toogleFullScreen() {
|
toogleFullScreen() {
|
||||||
if (!$q.fullscreen.isCapable) {
|
if (!$q.fullscreen.isCapable) {
|
||||||
|
|
Loading…
Reference in New Issue