融合修改至3.3版本

This commit is contained in:
miao 2023-03-09 13:55:47 +08:00
parent 6105a290b3
commit 4821e2100c
12 changed files with 418 additions and 1109 deletions

View File

@ -1457,8 +1457,7 @@ export default class ClientConnection {
column: number,
location: number,
enable: boolean,
width: number,
auto_sync: boolean,
width: number
) {
return await this.doRpc<Protocol.NoneResponse>(
new Protocol.SetBlendingOverlapRequestEntity(
@ -1466,8 +1465,7 @@ export default class ClientConnection {
column,
location,
enable,
width,
auto_sync
width
)
);
}

View File

@ -981,8 +981,10 @@ export default defineComponent({
if (wall_dom) {
lcm.value = (wall_dom.offsetWidth * 0.5) / 1214;
test_monitor_list.value.forEach((ele) => {
ele.cmw = Math.round(ele.w / lcm.value);
ele.cmh = Math.round(ele.h / lcm.value);
ele.cmw = 1214;
ele.cmh = 684;
ele.w = wall_dom.offsetWidth * 0.5;
ele.h = wall_dom.offsetHeight * 0.5;
});
}
};
@ -1100,7 +1102,7 @@ export default defineComponent({
const wall_dom = wall.value;
if (wall_dom) {
const point_list = four_point(item);
if (item.angle != 0 && point_list) {
if (item && item.angle != 0 && point_list) {
let minx = 0;
point_list.forEach((element) => {
if (minx > element.x) {
@ -1365,7 +1367,9 @@ export default defineComponent({
multiple_select.value = [];
multiple.value = false;
loading.value = false;
test_monitor_list.value = JSON.parse(list_magic);
if (list_magic) {
test_monitor_list.value = JSON.parse(list_magic);
}
realtime_upload(last_wall.value, last_percenter.value, 2);
};
let sort_index: any = ref([]);
@ -1461,8 +1465,8 @@ export default defineComponent({
});
}
test_monitor_list.value.forEach((ele) => {
ele.isHide = false;
});
ele.isHide = false;
});
const wall_dom = wall.value;
if (a && wall_dom) {
test_monitor_wall.value = [];
@ -1642,11 +1646,9 @@ export default defineComponent({
realtime_upload();
};
let list_magic: any = [];
const detect=(list:any)=>{
list.forEach((ele:any)=>{
})
}
const detect = (list: any) => {
list.forEach((ele: any) => {});
};
EventBus.getInstance().on(
EventNamesDefine.NotifyMessage,
(notify: NotifyMessage) => {
@ -1723,7 +1725,7 @@ export default defineComponent({
console.log(a);
},
async showDialog() {
console.log(1)
console.log(1);
initialize();
monitor_list_current_index.value = -1;
show_dialog.value = true;
@ -1743,18 +1745,14 @@ export default defineComponent({
const SetMagicWallGridState = await client.setMagicWallGridState(
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) {
offsetHeight.value = wall_dom.offsetHeight;
offsetWidth.value = wall_dom.offsetWidth;
getpx();
}
test_monitor_list.value.forEach((element) => {
element.isHide = false;
element.isHide = false;
});
if (response && settings) {
const a = response?.config.windows;
@ -1773,6 +1771,14 @@ export default defineComponent({
}
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;
});
if (
output_length.value !=
response.config.col * response.config.row
@ -1787,7 +1793,7 @@ export default defineComponent({
$store.commit("setShowMonitorList", []);
loading.value = false;
} else if (a && wall_dom) {
} else if (a && wall_dom) {
a.forEach((element) => {
let item: test_monitor = new test_monitor(0, "0", 0, 0, 0);
extend(true, item, test_monitor_list.value[element.index]);
@ -1996,6 +2002,12 @@ export default defineComponent({
const wall_dom = wall.value;
item.isShow = true;
if (wall_dom) {
if(item.cmw==1214){
item.w=wall_dom.offsetWidth*0.5
}
if(item.cmh==684){
item.h=wall_dom.offsetHeight*0.5
}
item.InitialH = item.h;
item.InitialW = item.w;
item.resizew = item.w / wall_dom.offsetWidth;
@ -2038,7 +2050,6 @@ export default defineComponent({
}
}
},
onDragEnter(e: DragEvent, index: string) {
e.stopPropagation();
let target: HTMLElement | null = e.target as HTMLElement;
@ -2209,12 +2220,22 @@ export default defineComponent({
},
changewidth() {
const wall_dom = wall.value;
let item = test_monitor_list.value[monitor_list_current_index.value];
item.w = Number(item.cmw) * lcm.value;
// if (wall_dom) {
// if(item.cmw==1214){
// item.w = 0.5 * wall_dom.offsetWidth;
// }
// }
},
changeHeight() {
const wall_dom = wall.value;
let item = test_monitor_list.value[monitor_list_current_index.value];
item.h = item.cmh * lcm.value;
// if (wall_dom) {
// if(item.cmh==684){
// item.h = 0.5 * wall_dom?.offsetHeight;
// }
// }
},
alignTop() {
let item = test_monitor_wall.value[multiple_select.value[0]];
@ -2224,7 +2245,7 @@ export default defineComponent({
tep_item.currenty = item.currenty;
}
});
multiple_select.value=[]
multiple_select.value = [];
realtime_upload();
},
alignBottom() {
@ -2235,7 +2256,7 @@ export default defineComponent({
tep_item.currenty = item.currenty + item.h - tep_item.h;
}
});
multiple_select.value=[]
multiple_select.value = [];
realtime_upload();
},
alignRight() {
@ -2246,7 +2267,7 @@ export default defineComponent({
tep_item.currentx = item.currentx + item.w - tep_item.w;
}
});
multiple_select.value=[]
multiple_select.value = [];
realtime_upload();
},
alignLeft() {
@ -2257,7 +2278,7 @@ export default defineComponent({
tep_item.currentx = item.currentx;
}
});
multiple_select.value=[]
multiple_select.value = [];
realtime_upload();
},
testLog(a: any) {

View File

@ -7,8 +7,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'vertical'" :class="[options_model_v == index ? 'action' : 'point']"
v-for="(item, index) in value_v_point.length" :initW="point.w" :initH="point.h" :resizable="false" :x="0"
v-model:y="value_v_point[index].y" @activated="options_model_v = index; now_v_h = 'vertical'"
@click="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'v')">
@click="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'v')">
<span>v{{
index + 1
}}</span>
@ -16,8 +15,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'vertical'" :class="[options_model_v == index ? 'action' : 'point']"
v-for="(item, index) in value_v_point.length" :initW="point.w" :initH="point.h" :resizable="false"
:x="max.x - 20" @click="options_model_v = index; now_v_h = 'vertical'" v-model:y="value_v_point[index].y"
@activated="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'v')">
@activated="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'v')">
<span>v{{
index + 1
}}</span>
@ -25,8 +23,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'level'" :class="[options_model_h == index ? 'action' : 'point']"
v-for="(item, index) in value_h_point.length" :initW="point.w" :initH="point.h" :resizable="false"
v-model:x="value_h_point[index].x" :y="0" @activated="options_model_h = index; now_v_h = 'level'"
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'h')">
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'h')">
<span>h{{
index + 1
}}</span>
@ -34,8 +31,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'level'" :class="[options_model_h == index ? 'action' : 'point']"
v-for="(item, index) in value_h_point.length" :initW="point.w" :initH="point.h" :resizable="false"
v-model:x="value_h_point[index].x" @activated="options_model_h = index; now_v_h = 'level'" :y="max.y - 20"
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'h')">
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'h')">
<span>h{{
index + 1
}}</span>
@ -44,7 +40,7 @@
</div>
</div>
</div>
<div v-show="ispad">
<div>
<div class="row">
<div class="col-1"></div>
<div class="col-5">
@ -59,12 +55,11 @@
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('vertical point')"
@update:model-value="(val) => { chang_point_amount(val, 'v') }" :dense="true" filled
v-model="value_v_point_amount" :options="options_value_v_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white"
@click="() => { add_dialog = true; value_point_amount_tmp_v = value_v_point_amount }" text-color="black"
<div class="col-2 q-pt-md "><q-btn color="white" @click="()=>{add_dialog=true;value_point_amount_tmp_v=value_v_point_amount}" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_v_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
<div class="q-pt-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
@ -73,147 +68,53 @@
<div class="col-2" @mousewheel="details_selsect_v"> <q-select class="q-pt-md " :label="$t('vertical')"
@update:model-value="(val) => { options_v = val }" :dense="true" filled v-model="options_model_v"
:options="options_v" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input
v-if="value_v[options_model_v]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_v[options_model_v].y" @update:model-value="chang(options_model_v, $event, 'v')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input v-if="value_v[options_model_v]"
filled type="number" class="q-pt-md" :dense="true" v-model="value_v[options_model_v].y"
@update:model-value="chang(options_model_v, $event, 'v')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
</div>
<div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model_v, true, 'v')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_v_point_amount + $t('point')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all')+value_v_point_amount+$t('point')" /></div>
</div>
</div>
<div>
<div class="row q-md-py-md" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
<div class="col-2 q-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
@update:model-value="(val) => { chang_point_amount(val, 'h') }" :dense="true" filled
v-model="value_h_point_amount" :options="options_value_h_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white"
@click="add_dialog = true; value_point_amount_tmp_h = value_h_point_amount" text-color="black"
<div class="col-2 q-pt-md "><q-btn color="white" @click="add_dialog = true;value_point_amount_tmp_h=value_h_point_amount" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_h_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div class="row" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-2 q-md-px-md" @mousewheel="details_selsect_h"> <q-select class="q-pt-md" :label="$t('level')"
<div class="col-2 q-px-md" @mousewheel="details_selsect_h"> <q-select class="q-pt-md" :label="$t('level')"
@update:model-value="(val) => { options_h = val }" :dense="true" filled v-model="options_model_h"
:options="options_h" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input
v-if="value_h[options_model_h]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_h[options_model_h].x" @update:model-value="chang(options_model_h, $event, 'h')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input v-if="value_h[options_model_h]"
filled type="number" class="q-pt-md" :dense="true" v-model="value_h[options_model_h].x"
@update:model-value="chang(options_model_h, $event, 'h')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
</div>
<div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model_h, true, 'h')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_h_point_amount + $t('point')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all')+value_h_point_amount+$t('point')" /></div>
</div>
</div>
</div>
<div v-show="!ispad">
<div class="row">
<div class="col-1"></div>
<div class="col-5">
<q-radio v-model="now_v_h" val="level" :label="$t('level')" />
</div>
<div class="col-5"><q-radio v-model="now_v_h" val="vertical" :label="$t('vertical')" /></div>
</div>
<div>
<div class="row q-md-py-md" v-show="now_v_h == 'vertical'">
<div class="col-1"></div>
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('vertical point')"
@update:model-value="(val) => { chang_point_amount(val, 'v') }" :dense="true" filled
v-model="value_v_point_amount" :options="options_value_v_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white"
@click="() => { add_dialog = true; value_point_amount_tmp_v = value_v_point_amount }" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_v_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div v-show="now_v_h == 'vertical'" style="display: flex;justify-content: space-around;">
<div style="min-width: 100px;" @mousewheel="details_selsect_v"> <q-select class="q-pt-md " :label="$t('vertical')"
@update:model-value="(val) => { options_v = val }" :dense="true" filled v-model="options_model_v"
:options="options_v" emit-value map-options /></div>
<div @mousewheel="details_selsect_val($event, 'v')"> <q-input
v-if="value_v[options_model_v]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_v[options_model_v].y" @update:model-value="chang(options_model_v, $event, 'v')" lazy-rules
@focus="input_y_focus=true" @blur="input_y_focus=false"
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" >
<template v-if="input_y_focus" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+','y')" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-','y')" @mouseup="mouseup" />
</template>
</q-input>
</div>
<div class="q-pt-md ">
<q-btn color="white" @click="reset(options_model_v, true, 'v')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md "> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_v_point_amount + $t('point')" /></div>
</div>
</div>
<div>
<div class="row q-md-py-md" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
@update:model-value="(val) => { chang_point_amount(val, 'h') }" :dense="true" filled
v-model="value_h_point_amount" :options="options_value_h_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white"
@click="add_dialog = true; value_point_amount_tmp_h = value_h_point_amount" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_h_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div v-show="now_v_h == 'level'" style="display: flex;justify-content: space-around;">
<div style="min-width: 100px;" @mousewheel="details_selsect_h"> <q-select class="q-pt-md" :label="$t('level')"
@update:model-value="(val) => { options_h = val }" :dense="true" filled v-model="options_model_h"
:options="options_h" emit-value map-options /></div>
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input
v-if="value_h[options_model_h]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_h[options_model_h].x" @update:model-value="chang(options_model_h, $event, 'h')" lazy-rules
@focus="input_x_focus=true" @blur="input_x_focus=false"
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" >
<template v-if="input_x_focus" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+','x')" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-','x')" @mouseup="mouseup" />
</template>
</q-input>
</div>
<div class="q-pt-md ">
<q-btn color="white" @click="reset(options_model_h, true, 'h')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_h_point_amount + $t('point')" /></div>
</div>
</div>
</div>
<div style="position: absolute;bottom: 0;">
<q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt) => { send_auxiliary_line(value) }"
<q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt) => { send_auxiliary_line(value) }"
:label="$t('auxiliary lines')" />
</div>
@ -240,26 +141,21 @@
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row">
<div v-if="now_v_h == 'vertical'" class="col-10"><q-input filled v-model="value_v_point_amount" min="3" disable
type="number" :label="$t('Please enter the points you need to add')"
@update:model-value="(val: any) => { }" />
<div v-if="now_v_h=='vertical'" class="col-10"><q-input filled v-model="value_v_point_amount" min="3" disable type="number"
:label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
</div>
<div v-else class="col-10"><q-input filled v-model="value_h_point_amount" min="3" disable type="number"
:label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
:label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
</div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↑"
@click="() => { now_v_h == 'vertical' ? preview_v(Number(value_v_point_amount) + 1) : preview_h(Number(value_h_point_amount) + 1) }" />
</div>
@click="() => {now_v_h=='vertical'?preview_v(Number(value_v_point_amount)+1):preview_h(Number(value_h_point_amount)+1)}" /> </div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↓"
@click="() => { now_v_h == 'vertical' ? preview_v(Number(value_v_point_amount) - 1) : preview_h(Number(value_h_point_amount) - 1) }" />
</div>
@click="() => {now_v_h=='vertical'?preview_v(Number(value_v_point_amount)-1):preview_h(Number(value_h_point_amount)-1)}" /></div>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')"
@click="() => { now_v_h == 'vertical' ? preview_v(value_point_amount_tmp_v) : preview_h(value_point_amount_tmp_h) }"
color="primary" v-close-popup />
<q-btn flat :label="$t('Cancel')" @click="()=>{now_v_h=='vertical'?preview_v(value_point_amount_tmp_v):preview_h(value_point_amount_tmp_h)}" color="primary" v-close-popup />
<q-btn flat :label="$t('ok')" @click="add" color="primary" v-close-popup />
</q-card-actions>
</q-card>
@ -269,41 +165,26 @@
<q-dialog v-model="ipad_chang">
<q-card style="width: 40vw; max-width: 80vw;">
<q-card-section>
<!-- <div class="text-h6">{{ $t('point') +(now_v_h == 'level'?options_model_h+1:options_model_v+1)}}</div> -->
<div class="row">
<div class="col-4" v-show="now_v_h != 'level'">
<q-select class="q-pt-md " :label="$t('vertical')" @update:model-value="(val) => { options_v = val }"
:dense="true" filled v-model="options_model_v" :options="options_v" emit-value map-options />
</div>
<div class="col-4" v-show="now_v_h == 'level'">
<q-select class="q-pt-md" :label="$t('level')" @update:model-value="(val) => { options_h = val }"
:dense="true" filled v-model="options_model_h" :options="options_h" emit-value map-options />
</div>
</div>
<div class="text-h6">{{ $t('point') +(now_v_h == 'level'?options_model_h+1:options_model_v+1)}}</div>
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row q-pb-md" v-show="now_v_h != 'level'">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
@touchstart="handlerTouchstart('y', '+')" @touchend="handlerTouchend" /></div>
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up" @touchstart="handlerTouchstart('y','+')" @touchend="handlerTouchend" /></div>
</div>
<div class="row">
<div class="col-6" style="text-align: center;"><q-btn color="white" v-show="now_v_h == 'level'"
text-color="black" icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x', '-')"
@touchend="handlerTouchend" /></div>
<div class="col-6" style="text-align: center;"><q-btn color="white" v-show="now_v_h == 'level'"
text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x', '+')"
@touchend="handlerTouchend" /></div>
<div class="row" >
<div class="col-6" style="text-align: center;"><q-btn color="white" v-show="now_v_h == 'level'" text-color="black" icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x','-')" @touchend="handlerTouchend" /></div>
<div class="col-6" style="text-align: center;"><q-btn color="white" v-show="now_v_h == 'level'" text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x','+')" @touchend="handlerTouchend" /></div>
</div>
<div class="row q-pt-md" v-show="now_v_h != 'level'">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y', '-')" @touchend="handlerTouchend" /></div>
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y','-')" @touchend="handlerTouchend" /></div>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang = false" />
<q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<style scoped>
@ -318,14 +199,6 @@
}
</style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">
import {
defineComponent,
@ -367,7 +240,7 @@ export default defineComponent({
/**
* 平板弹窗修改
*/
const ipad_chang = ref(false)
const ipad_chang=ref(false)
/**
* 当前url路径
*/
@ -527,24 +400,24 @@ export default defineComponent({
watch(() => value_v_point_amount, (newval, oldval) => {
setTimeout(() => {
if (now_v_h.value != 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "ver_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_v.value = 0
}
if (now_v_h.value != 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "ver_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_v.value=0
}
save_set_cache()
save_set_cache()
}, 100);
}, { deep: true })
watch(() => value_h_point_amount, (newval, oldval) => {
setTimeout(() => {
if (now_v_h.value == 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_h.value = 0
}
save_set_cache()
set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_h.value=0
}
save_set_cache()
}, 100);
}, { deep: true })
@ -775,7 +648,7 @@ export default defineComponent({
const resetall_all = () => {
switch (now_v_h.value) {
case 'vertical':
let tmp = value_v_point_amount.value
let tmp =value_v_point_amount.value
for (let key in config.multi_ver_density) {
for (let index = 0; index < config.multi_ver_density[key].length; index++) {
config.multi_ver_density[key][index].x = config.multi_ver_density[key][index].def_x
@ -788,7 +661,7 @@ export default defineComponent({
send_value(-2, 'v', 0);
break;
case 'level':
let tmpp = value_h_point_amount.value
let tmpp =value_h_point_amount.value
for (let key in config.multi_hor_density) {
for (let index = 0; index < config.multi_hor_density[key].length; index++) {
config.multi_hor_density[key][index].x = config.multi_hor_density[key][index].def_x
@ -1144,20 +1017,20 @@ export default defineComponent({
value_v_point.value = []
for (let index = 0; index < val; index++) {
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + 1 };
value_v.value.push(tmp)
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
let tmp_point: DensityCorrectionPoint = {
control_point: tmp.control_point,
x: x_y.x,
y: x_y.y,
def_x: def_x_f.x,
def_y: def_x_f.y
}
value_v_point.value.push(tmp_point)
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + 1 };
value_v.value.push(tmp)
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
let tmp_point: DensityCorrectionPoint = {
control_point: tmp.control_point,
x: x_y.x,
y: x_y.y,
def_x: def_x_f.x,
def_y: def_x_f.y
}
value_v_point.value.push(tmp_point)
}
value_v_point_amount.value = val
@ -1170,190 +1043,92 @@ export default defineComponent({
let height = allconfig.projector_height / (val - 1)
value_h.value = []
value_h_point.value = []
for (let index = 0; index < val; index++) {
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + 1 };
value_h.value.push(tmp)
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
let tmp_point: DensityCorrectionPoint = {
control_point: tmp.control_point,
x: x_y.x,
y: x_y.y,
def_x: def_x_f.x,
def_y: def_x_f.y
for (let index = 0; index < val; index++) {
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point:index + 1 };
value_h.value.push(tmp)
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
let tmp_point: DensityCorrectionPoint = {
control_point: tmp.control_point,
x: x_y.x,
y: x_y.y,
def_x: def_x_f.x,
def_y: def_x_f.y
}
value_h_point.value.push(tmp_point)
}
value_h_point.value.push(tmp_point)
}
value_h_point_amount.value = val
options_model_h.value = 1
}
/**
* 在增加时 实现回退
*/
/**
* 在增加时 实现回退
*/
const value_point_amount_tmp_v = ref(0)
const value_point_amount_tmp_h = ref(0)
/**
* 长按实现
*/
/**
* 长按实现
*/
let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart = (type: string, fun: string) => {
loop_end = setTimeout(() => {
loop = setInterval(() => {
if (type == 'x') {
if (fun == '+') {
value_h.value[options_model_h.value].x++
} else {
value_h.value[options_model_h.value].x--
}
chang(options_model_h.value, value_h.value[options_model_h.value].x, "h")
loop = setInterval(() => {
if (type == 'x') {
if (fun == '+') {
value_h.value[options_model_h.value].x++
} else {
if (fun == '+') {
value_v.value[options_model_v.value].y++
} else {
value_v.value[options_model_v.value].y--
}
chang(options_model_v.value, value_v.value[options_model_v.value].y, "v")
value_h.value[options_model_h.value].x--
}
// chang(options_model.value, 0, '')
}, 15)
}, 1000);
if (type == 'x') {
if (fun == '+') {
value_h.value[options_model_h.value].x++
chang(options_model_h.value, value_h.value[options_model_h.value].x, "h")
} else {
value_h.value[options_model_h.value].x--
if (fun == '+') {
value_v.value[options_model_v.value].y++
} else {
value_v.value[options_model_v.value].y--
}
chang(options_model_v.value, value_v.value[options_model_v.value].y, "v")
}
chang(options_model_h.value, value_h.value[options_model_h.value].x, "h")
} else {
if (fun == '+') {
value_v.value[options_model_v.value].y++
} else {
value_v.value[options_model_v.value].y--
}
chang(options_model_v.value, value_v.value[options_model_v.value].y, "v")
}
// chang(options_model.value, 0, '')
}, 15)
}
const handlerTouchend = () => {
clearTimeout(loop_end)
clearInterval(loop)
}
/**
* 键盘监听
*/
const keyDown = () => {
const keyDown = () => {
document.onkeydown = (e) => {
let lock = 0;
let lock=0;
let e1 = e || window.event || arguments.callee.caller.arguments[0]
switch (e.code) {
case "KeyW":
now_v_h.value == 'vertical' ? value_v.value[options_model_v.value].y++ : ""
now_v_h.value == 'vertical'?value_v.value[options_model_v.value].y++:""
break;
case "KeyA":
now_v_h.value == 'level' ? value_h.value[options_model_h.value].x-- : ""
now_v_h.value == 'level'?value_h.value[options_model_h.value].x--:""
break;
case "KeyS":
now_v_h.value == 'vertical' ? value_v.value[options_model_v.value].y-- : ""
now_v_h.value == 'vertical'?value_v.value[options_model_v.value].y--:""
break;
case "KeyD":
now_v_h.value == 'level' ? value_h.value[options_model_h.value].x++ : ""
now_v_h.value == 'level'?value_h.value[options_model_h.value].x++:""
break;
default:
lock = 1
lock=1
break;
}
if (lock == 0) {
now_v_h.value == 'level' ? chang(options_model_h.value, value_h.value[options_model_h.value].x, 'h') : chang(options_model_v.value, value_v.value[options_model_v.value].y, 'v')
if(lock==0){
now_v_h.value == 'level'?chang(options_model_h.value, value_h.value[options_model_h.value].x, 'h'):chang(options_model_v.value, value_v.value[options_model_v.value].y, 'v')
}
}
}
const ispad = computed(() => {
let url = window.location.href;
return url.indexOf("pad") != -1
})
let loop_start: NodeJS.Timeout
let loop_finish: NodeJS.Timeout
const mousedown = (fun: string, type: string) => {
loop_start = setTimeout(() => {
loop_finish = setInterval(() => {
switch (type) {
case 'x':
if (fun == '+') {
value_h.value[options_model_h.value].x++
} else {
value_h.value[options_model_h.value].x--
}
chang(options_model_h.value,value_h.value[options_model_h.value].x, 'h')
break;
default:
if (fun == '+') {
value_v.value[options_model_v.value].y++
} else {
value_v.value[options_model_v.value].y--
}
chang(options_model_v.value, value_v.value[options_model_v.value].y, "v")
break;
}
}, 30)
}, 1000);
switch (type) {
case 'x':
if (fun == '+') {
value_h.value[options_model_h.value].x++
} else {
value_h.value[options_model_h.value].x--
}
chang(options_model_h.value,value_h.value[options_model_h.value].x, 'h')
break;
default:
if (fun == '+') {
value_v.value[options_model_v.value].y++
} else {
value_v.value[options_model_v.value].y--
}
chang(options_model_v.value, value_v.value[options_model_v.value].y, "v")
break;
}
}
const mouseup = () => {
clearTimeout(loop_start)
clearInterval(loop_finish)
}
const input_x_focus=ref(false)
const input_y_focus=ref(false)
defineExpose({
now_v_h,
options_model_v,
options_model_h
});
return {
mousedown,
mouseup,
input_x_focus,
input_y_focus,
ispad,
config,
value_point_amount_tmp_v,
value_point_amount_tmp_h,

View File

@ -17,16 +17,14 @@
</div>
</div>
<div>
<div class="row" v-show="ispad">
<div class="row">
<div class="col-1"></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'x')">
<q-input filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].x" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="x"
lazy-rules >
</q-input>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'x')"> <q-input filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].x" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="x"
lazy-rules />
</div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'y')"> <q-input filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].y" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="y"
@ -38,59 +36,11 @@
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
</div>
</div>
<div v-show="!ispad" style="display: flex;justify-content: space-around;">
<div class="q-px-md" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
map-options /></div>
<div class="q-px-md" @mousewheel="details_selsect_val($event,'x')">
<q-input filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].x" @focus="input_x_focus=true" @blur="input_x_focus=false" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="x"
lazy-rules >
<template v-if="input_x_focus" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+','x')" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-','x')" @mouseup="mouseup" />
</template>
</q-input>
</div>
<div class="q-px-md" @mousewheel="details_selsect_val($event,'y')"> <q-input filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].y" @focus="input_y_focus=true" @blur="input_y_focus=false" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="y"
lazy-rules >
<template v-if="input_y_focus" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+','y')" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-','y')" @mouseup="mouseup" />
</template>
</q-input>
</div>
<div class="q-pt-md">
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md">
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
</div>
</div>
</div>
<!-- </div> -->
</div>
<q-dialog v-model="ipad_chang">
<q-card style="width: 40vw; max-width: 80vw;">
<q-card-section>
<!-- <div class="text-h6">{{ $t('point') +(options_model+1 )}}</div> -->
<div class="row">
<div class="col-4"><q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
map-options /></div>
</div>
<div class="text-h6">{{ $t('point') +(options_model+1 )}}</div>
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row">
@ -105,7 +55,7 @@
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang=false" />
<q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
@ -123,14 +73,6 @@
}
</style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">
import {
defineComponent,
@ -553,13 +495,10 @@ export default defineComponent({
}
/**
* 长按实现
* 单击实现
*/
let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart=(type:string,fun:string)=>{
loop_end = setTimeout(() => {
loop=setInterval(()=>{
loop=setInterval(()=>{
if(type=='x'){
if(fun=='+'){
value.value[options_model.value].x++
@ -576,25 +515,8 @@ export default defineComponent({
}
chang(options_model.value,0,'')
},10)
}, 1000);
if(type=='x'){
if(fun=='+'){
value.value[options_model.value].x++
}else{
value.value[options_model.value].x--
}
}else{
if(fun=='+'){
value.value[options_model.value].y++
}else{
value.value[options_model.value].y--
}
}
chang(options_model.value,0,'')
}
const handlerTouchend=()=>{
clearTimeout(loop_end)
clearInterval(loop)
}
/**
@ -624,90 +546,10 @@ export default defineComponent({
if(lock==0)chang(options_model.value,"h", 'h')
}
}
const ispad=computed(()=>{
let url = window.location.href;
return url.indexOf("pad")!=-1
})
const add_cut=(fun:string,type:string)=>{
switch (type) {
case 'x':
if(fun=='+'){
value.value[options_model.value].x++
}else{
value.value[options_model.value].x--
}
break;
default:
if(fun=='+'){
value.value[options_model.value].y++
}else{
value.value[options_model.value].y--
}
break;
}
}
let loop_start:NodeJS.Timeout
let loop_finish:NodeJS.Timeout
const input_x_focus=ref(false)
const input_y_focus=ref(false)
const mousedown = (fun:string,type:string) => {
loop_start= setTimeout(() => {
loop_finish=setInterval(()=>{
switch (type) {
case 'x':
if(fun=='+'){
value.value[options_model.value].x++
}else{
value.value[options_model.value].x--
}
break;
default:
if(fun=='+'){
value.value[options_model.value].y++
}else{
value.value[options_model.value].y--
}
break;
}
chang(options_model.value,0,'')
},30)
}, 1000);
switch (type) {
case 'x':
if(fun=='+'){
value.value[options_model.value].x++
}else{
value.value[options_model.value].x--
}
break;
default:
if(fun=='+'){
value.value[options_model.value].y++
}else{
value.value[options_model.value].y--
}
break;
}
chang(options_model.value,0,'')
}
const mouseup = () => {
clearTimeout(loop_start)
clearInterval(loop_finish)
}
defineExpose({
options_model,
});
return {
input_x_focus,
input_y_focus,
mousedown,
mouseup,
add_cut,
now_selsect_projector,
details_selsect,
resetall,
@ -727,8 +569,7 @@ export default defineComponent({
ipad_chang,
url,
handlerTouchstart,
handlerTouchend,
ispad
handlerTouchend
}
}
})

View File

@ -4,8 +4,8 @@
<div class="row">
<div class="col-12">
<div class="row">
<div class="col-4 col-sm-3"></div>
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[0]"
<div class="col-4"></div>
<div class="col-4 q-pt-sm"><q-select outlined v-model="model[0]"
@update:model-value="update_row_col(0, model[0])" :options="options" :dense="true" :options-dense="true"
:label="$t('wall row')" /> </div><q-checkbox @update:model-value="send_off(0)"
v-model="RowsColumns[0]" />
@ -13,8 +13,8 @@
</div>
<div class="col-12">
<div class="row">
<div class="col-4 col-sm-3"></div>
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[1]"
<div class="col-4"></div>
<div class="col-4 q-pt-sm"><q-select outlined v-model="model[1]"
@update:model-value="update_row_col(1, model[1])" :options="options" :dense="true" :options-dense="true"
:label="$t('wall col')" /> </div><q-checkbox @update:model-value="send_off(1)"
v-model="RowsColumns[1]" />
@ -22,16 +22,16 @@
</div>
<div class="col-12">
<div class="row">
<div class="col-4 col-sm-3"></div>
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[2]"
<div class="col-4"></div>
<div class="col-4 q-pt-sm"><q-select outlined v-model="model[2]"
@update:model-value="update_row_col(2, model[2])" :options="line_width_options" :dense="true" :options-dense="true"
:label="$t('line width')" /> </div>
</div>
</div>
<div class="col-12">
<div class="row" style="min-height: 40px;">
<div class="col-4 col-sm-3"></div>
<div class="col-4 col-sm-6 q-pt-sm">
<div class="col-4"></div>
<div class="col-4 q-pt-sm">
<q-item>
<q-item-section avatar class="head_1">
{{ $t("line color") }}
@ -51,11 +51,33 @@
</div>
</div>
</div>
<div class="col-12">
<div class="row" style="min-height: 40px;">
<div class="col-4 col-sm-3"></div>
<div class="col-4 col-sm-6 q-pt-sm">
<div class="col-4"></div>
<div class="col-4 q-pt-sm">
<q-item>
<q-item-section avatar class="head_1">
{{ $t("background color") }}
</q-item-section>
<q-item-section>
<q-input v-model="color[1]" :rules="['anyColor']">
<template v-slot:append>
<q-icon name="colorize" class="cursor-pointer" @click="index = 1">
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
<q-color v-model="color[1]" @change="submit" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</q-item-section>
</q-item>
</div>
</div>
</div>
<div class="col-12">
<div class="row" style="min-height: 40px;">
<div class="col-4"></div>
<div class="col-4 q-pt-sm">
<q-item>
<q-item-section avatar class="head_1">
{{ $t("center circle color") }}

View File

@ -16,8 +16,8 @@
</div>
</div>
</div>
<div v-show="ispad">
<div class="row q-md-py-xl">
<div>
<div class="row row q-md-py-xl">
<div class="col-1"></div>
<div class="col-2 q-px-md">
<div class="col-2"> <q-select class="q-pt-md" :label="$t('point amount')"
@ -47,13 +47,11 @@
:options="options" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'x')"> <q-input v-if="value[options_model]"
filled type="number" class="q-pt-md" :dense="true" v-model="value[options_model].x"
@update:model-value="chang(options_model, $event, 'h')" label="x" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
@update:model-value="chang(options_model, $event, 'h')" label="x" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
</div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]"
filled type="number" class="q-pt-md" :dense="true" v-model="value[options_model].y"
@update:model-value="chang(options_model, $event, 'h')" label="y" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]" filled
type="number" class="q-pt-md" :dense="true" v-model="value[options_model].y"
@update:model-value="chang(options_model, $event, 'h')" label="y" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
</div>
<div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
@ -62,60 +60,9 @@
<div class="q-pt-md q-px-md col-3"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_point_amount + $t('point')" /></div>
</div>
</div>
<div v-show="!ispad">
<div style="display: flex;justify-content: space-around;">
<div style="min-width: 100px;"> <q-select class="q-pt-md" :label="$t('point amount')"
@update:model-value="(val) => { now_amount = val; chang_point_amount(val) }" :dense="true" filled
v-model="value_point_amount" :options="options_value_point_amount" emit-value map-options />
</div>
<div class=" q-pt-md "><q-btn color="white"
@click="() => { add_dialog = true; value_point_amount_tmp = value_point_amount; now_amount = value_point_amount }"
text-color="black" :label="$t('add control points')" /></div>
<div class="q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }" :disable="value_point_amount <= 9"
text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md q-px-md "> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div style="display: flex;justify-content: space-around;">
<div style="min-width: 100px;" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')" :dense="true"
filled v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options"
emit-value map-options /></div>
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'x')"> <q-input v-if="value[options_model]" filled
type="number" class="q-pt-md" :dense="true" v-model="value[options_model].x"
@update:model-value="chang(options_model, $event, 'h')" label="x" lazy-rules
@focus="input_x_focus=true" @blur="input_x_focus=false"
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" >
<template v-if="input_x_focus" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+','x')" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-','x')" @mouseup="mouseup" />
</template>
</q-input>
</div>
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]" filled
type="number" class="q-pt-md" :dense="true" v-model="value[options_model].y"
@update:model-value="chang(options_model, $event, 'h')" label="y" lazy-rules
@focus="input_y_focus=true" @blur="input_y_focus=false"
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" >
<template v-if="input_y_focus" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+','y')" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-','y')" @mouseup="mouseup" />
</template>
</q-input>
</div>
<div class="q-pt-md ">
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md "> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_point_amount + $t('point')" /></div>
</div>
</div>
<q-dialog v-model="del_dialog">
<q-card style="width: 500px; max-width: 80vw;">
<q-card-section>
@ -163,33 +110,26 @@
<q-dialog v-model="ipad_chang">
<q-card style="width: 40vw; max-width: 80vw;">
<q-card-section>
<!-- <div class="text-h6">{{ $t('point') +(options_model+1 )}}</div> -->
<div class="row">
<div class="col-4"><q-select class="q-pt-md" :label="$t('point')" :dense="true" filled v-model="options_model"
@update:model-value="(val) => { options_model = val }" :options="options" emit-value map-options /></div>
</div>
<div class="text-h6">{{ $t('point') +(options_model+1 )}}</div>
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
@touchstart="handlerTouchstart('y', '+')" @touchend="handlerTouchend" /></div>
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up" @touchstart="handlerTouchstart('y','+')" @touchend="handlerTouchend" /></div>
</div>
<div class="row">
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black"
icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x', '-')" @touchend="handlerTouchend" /></div>
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black"
icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x', '+')" @touchend="handlerTouchend" /></div>
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x','-')" @touchend="handlerTouchend" /></div>
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x','+')" @touchend="handlerTouchend" /></div>
</div>
<div class="row">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y', '-')" @touchend="handlerTouchend" /></div>
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y','-')" @touchend="handlerTouchend" /></div>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang = false" />
<q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<style scoped>
@ -204,14 +144,6 @@
}
</style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">
import {
defineComponent,
@ -256,7 +188,7 @@ export default defineComponent({
/**
* 平板弹窗修改
*/
const ipad_chang = ref(false)
const ipad_chang=ref(false)
/**
* 当前url路径
*/
@ -375,9 +307,9 @@ export default defineComponent({
}, { deep: true })
watch(() => value_point_amount, (newval, oldval) => {
if (ste_status.value == 0) set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model.value = 0
save_set_cache()
if(ste_status.value==0)set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model.value=0
save_set_cache()
}, { deep: true })
/**
@ -802,155 +734,59 @@ export default defineComponent({
* 长按实现
*/
let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart = (type: string, fun: string) => {
loop_end = setTimeout(() => {
loop = setInterval(() => {
if (type == 'x') {
if (fun == '+') {
value.value[options_model.value].x++
} else {
value.value[options_model.value].x--
}
loop = setInterval(() => {
if (type == 'x') {
if (fun == '+') {
value.value[options_model.value].x++
} else {
if (fun == '+') {
value.value[options_model.value].y++
} else {
value.value[options_model.value].y--
}
value.value[options_model.value].x--
}
chang(options_model.value, 0, '')
}, 30)
}, 1000);
if (type == 'x') {
if (fun == '+') {
value.value[options_model.value].x++
} else {
value.value[options_model.value].x--
}
} else {
if (fun == '+') {
value.value[options_model.value].y++
} else {
if (fun == '+') {
value.value[options_model.value].y++
} else {
value.value[options_model.value].y--
}
value.value[options_model.value].y--
}
chang(options_model.value, 0, '')
}
chang(options_model.value, 0, '')
}, 15)
}
const handlerTouchend = () => {
clearTimeout(loop_end)
clearInterval(loop)
}
/**
* 键盘监听
*/
const keyDown = () => {
const keyDown = () => {
document.onkeydown = (e) => {
let lock = 0;
let lock=0;
let e1 = e || window.event || arguments.callee.caller.arguments[0]
switch (e.code) {
case "KeyW":
value.value[options_model.value].y++
break;
case "KeyA":
value.value[options_model.value].x--
value.value[options_model.value].x--
break;
case "KeyS":
value.value[options_model.value].y--
value.value[options_model.value].y--
break;
case "KeyD":
value.value[options_model.value].x++
value.value[options_model.value].x++
break;
default:
lock = 1
lock=1
break;
}
if (lock == 0) chang(options_model.value, "h", 'h')
if(lock==0)chang(options_model.value,"h", 'h')
}
}
const ispad = computed(() => {
let url = window.location.href;
return url.indexOf("pad") != -1
})
let loop_start: NodeJS.Timeout
let loop_finish: NodeJS.Timeout
const mousedown = (fun: string, type: string) => {
loop_start = setTimeout(() => {
loop_finish = setInterval(() => {
switch (type) {
case 'x':
if (fun == '+') {
value.value[options_model.value].x++
} else {
value.value[options_model.value].x--
}
break;
default:
if (fun == '+') {
value.value[options_model.value].y++
} else {
value.value[options_model.value].y--
}
break;
}
chang(options_model.value, 0, '')
}, 30)
}, 1000);
switch (type) {
case 'x':
if (fun == '+') {
value.value[options_model.value].x++
} else {
value.value[options_model.value].x--
}
break;
default:
if (fun == '+') {
value.value[options_model.value].y++
} else {
value.value[options_model.value].y--
}
break;
}
chang(options_model.value, 0, '')
}
const mouseup = () => {
clearTimeout(loop_start)
clearInterval(loop_finish)
}
const input_x_focus=ref(false)
const input_y_focus=ref(false)
defineExpose({
options_model,
});
return {
input_x_focus,
input_y_focus,
ispad,
mousedown,
mouseup,
value_point_amount_tmp,
details_selsect,
resetall_all,

View File

@ -9,7 +9,7 @@
}
}
">
<q-card class="" id="element" style="max-width: 90vw;padding: 0;">
<q-card class="" style="max-width: 90vw;padding: 0;">
<q-form>
<q-card-section class="q-ma-none q-pa-sm">
<div class="row">
@ -18,9 +18,6 @@
</div>
<q-space />
<q-btn v-show="ispad" size="sm" dense flat @click="element_full_screen" round :icon="is_pad_screen?'zoom_in_map':'zoom_out_map'" >
</q-btn>
<q-btn size="sm" dense flat round icon="close" color="red" @click="clear()" v-close-popup>
<q-tooltip>
{{ $t("close") }}
@ -31,7 +28,7 @@
<q-separator />
<!-- height: 80vh -->
<q-card-section class="scroll" :style="{ 'width': is_pad_style, padding: 0 }">
<q-card-section class="scroll" :style="{width: is_pad_style,padding: 0}">
<div class="row" style="border: 1px solid #b0bec5; text-align: center">
<div class="col-2" style="border-right: 1px solid #b0bec5">
<p class="text-center">{{ $t("Projector") }}</p>
@ -52,24 +49,19 @@
<hr>
<div>
<div class="col-3 q-px-md "> <q-select class="q-pt-md overflow-hidden" :label="$t('change resolution')"
@update:model-value="(val) => { dialog(val, set_resolution, 'resolution') }" :dense="true" filled
v-model="now_resolution" :options="options_resolution" emit-value map-options /></div>
<!-- <div class="col-3 q-px-md"> <q-select class="q-pt-md " use-input hide-selected fill-input
@filter="filterFn_projector" :label="$t('Change projector layout')"
@update:model-value="(val) => { dialog(val, send_projectorlayout, 'projector') }" :dense="true" filled
v-model="now_select_projectorlayout" :options="show_projectorlayout" emit-value map-options /></div> -->
<div class="col-3 q-px-md"> <q-select class="q-pt-md " use-input hide-selected fill-input
@filter="filterFn_projector2" :label="$t('Change projector layout')"
@update:model-value="(val) => { dialog_projectorlayout(val, send_projectorlayout2) }" :dense="true" filled
v-model="now_select_projectorlayout_tmp" :options="show_projectorlayout2" emit-value /></div>
</div>
<div class="col-12" style="text-align: center">
<div class="col-3 q-px-md "> <q-select class="q-pt-md overflow-hidden" :label="$t('change resolution')"
@update:model-value="(val) => { dialog(val,set_resolution,'resolution') }" :dense="true" filled v-model="now_resolution"
:options="options_resolution" emit-value map-options /></div>
<div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('Change projector layout')"
@update:model-value="(val) => { dialog(val,send_projectorlayout,'projector') }" :dense="true" filled v-model="now_select_projectorlayout"
:options="projectorlayout" emit-value map-options /></div>
</div>
<div class="col-12" style="text-align: center">
{{
$t("Enable projection mode")
}}<q-checkbox v-model="EnableBlending" />
</div>
</div>
</div>
<div class="col-10">
<div class="q-ta-md">
<q-btn-toggle :disable="!$store.state.enablefusion" no-caps v-model="options" toggle-color="primary"
@ -88,20 +80,20 @@
<q-separator />
<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"
@click="send_disable_blending_params" />
<span>{{ $t("show blending grids") }}</span>
<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>
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
<div class="q-space" data-v-39efcd1f=""></div>
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary"
@click="select_configuration = true; select_configuration_name = ''; get_scenes()" />
@click="select_configuration = true;select_configuration_name=''; get_scenes()" />
<q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup
@click="$store.commit('setSelectedProjector', '0/0'); clear()" />
@click="$store.commit('setSelectedProjector', '0/0');clear()" />
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
</q-card-actions>
</q-form>
@ -128,8 +120,8 @@
</q-select>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')" color="primary" @click="medium = false"/>
<q-btn flat :label="$t('save')" @click="saveconfig" color="primary" />
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
<q-btn flat :label="$t('save')" @click="saveconfig" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
@ -155,8 +147,8 @@
</q-select>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')" color="primary" @click="select_configuration=false" />
<q-btn flat :label="$t('load')" @click="apply_the_selected_configuration" color="primary" />
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
<q-btn flat :label="$t('load')" @click="apply_the_selected_configuration" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
@ -170,8 +162,8 @@
{{ $t('Whether to delete') + name_to_be_deleted }}
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')" color="primary" @click="del_dialog=false" />
<q-btn flat :label="$t('ok')" @click="()=>{dialog_del_scenes();del_dialog=false}" color="primary" />
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
<q-btn flat :label="$t('ok')" @click="dialog_del_scenes" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
@ -183,29 +175,11 @@
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
</q-card-section>
<q-card-section class="q-pt-none">
{{ dialog_data.type == 'resolution' ? $t('Whether to modify the resolution to') +
options_resolution[dialog_data.parameter].label : $t('Whether to change the projector layout to') +
projectorlayout[dialog_data.parameter].label }}
{{ dialog_data.type=='resolution'?$t('Whether to modify the resolution to') + options_resolution[dialog_data.parameter].label:$t('Whether to change the projector layout to') + projectorlayout[dialog_data.parameter].label }}
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')" @click="()=>{re_match_data();confirm=false}" color="primary" />
<q-btn flat :label="$t('ok')" @click="()=>{trigger_dialog();confirm=false}" color="primary" />
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog v-model="confirm_projectorlayout">
<q-card style="width: 40vw; max-width: 80vw;">
<q-card-section>
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
</q-card-section>
<q-card-section class="q-pt-none">
{{ $t('Whether to change the projector layout to') + dialog_data.parameter }}
</q-card-section>
<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('ok')" @click="()=>{trigger_dialog_projectorlayout();confirm_projectorlayout=false}" color="primary" />
<q-btn flat :label="$t('Cancel')" @click="re_match_data" color="primary" v-close-popup />
<q-btn flat :label="$t('ok')" @click="trigger_dialog" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
@ -232,7 +206,7 @@ import {
computed,
onMounted,
onBeforeMount,
provide,
provide,
} from "vue";
import { useStore } from "src/store";
import { useQuasar, copyToClipboard } from "quasar";
@ -272,106 +246,99 @@ export default defineComponent({
const showDialog = async () => {
show_dialog.value = true;
};
/**
* 当前平板是否全屏
*/
const is_pad_screen = ref(false);
const is_pad_style = computed(() => {
let url = window.location.href
if (url.indexOf("pad") != -1 && $t.locale.value == "en-US") {
const is_pad_style=computed(()=>{
let url=window.location.href
if(url.indexOf("pad")!=-1&&$t.locale.value=="en-US"){
return ""
}
if (url.indexOf("pad") != -1 && is_pad_screen.value) {
return "100vw"
}
return "60vw"
})
const select_configuration = ref(false)
const del_dialog = ref(false)
const config_projectors = ref(null)
const config_projectors=ref(null)
const select_configuration_name = ref("")
const send_disable_blending_params = () => {
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);
/**
* 模拟数据完成dom渲染再次获取真实后台数据
*/
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1920,\"height\": 1080}]}");
const options_resolution = computed(() => {
let tmp = [];
if (allconfig.resolution) {
for (let index = 0; index < allconfig.resolution.length; index++) {
tmp.push({
label: `${allconfig.resolution[index].width}*${allconfig.resolution[index].height}`,
value: index,
})
}
let tmp=[];
if(allconfig.resolution){
for (let index = 0; index < allconfig.resolution.length; index++) {
tmp.push({
label: `${allconfig.resolution[index].width}*${allconfig.resolution[index].height}`,
value: index,
})
}
}
return tmp
})
const child: any = ref(null);
const child :any = ref(null);
/**
* 开启网格时发送全部参数
*
*/
const send_show_blending_grids = () => {
let tmp = ""
switch (optionsstr.value) {
case 'FusionLocale':
tmp = '0'
break;
case 'FourPointCalibration':
tmp = '4'
break;
case 'SurfaceCorrection':
tmp = '9'
break;
case 'DensityCorrection':
if (child.value!.now_v_h == 'vertical') {
tmp = 'ver_density'
} else {
tmp = 'hor_density'
}
switch (optionsstr.value) {
case 'FusionLocale':
tmp = '0'
break;
case 'FourPointCalibration':
tmp = '4'
break;
case 'SurfaceCorrection':
tmp = '9'
break;
case 'DensityCorrection':
if(child.value!.now_v_h=='vertical'){
tmp = 'ver_density'
}else{
tmp = 'hor_density'
}
break;
default:
break;
}
break;
default:
break;
}
set?.SetBlendingOption("blending_grids_select_ui", tmp)
set?.SetBlendingOption('blending_grids_select_projector', now_selsect_projector.value);
set?.SetBlendingOption(show_blending_grids_id.value, show_blending_grids.value ? "1" : "0");
switch (optionsstr.value) {
case 'FusionLocale':
case 'FusionLocale':
break;
case 'FourPointCalibration':
set?.SetBlendingOption("blending_grids_select_point", `4:${child.value!.options_model + 1}`)
break;
case 'SurfaceCorrection':
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model + 1}`)
break;
case 'FourPointCalibration':
set?.SetBlendingOption("blending_grids_select_point", `4:${child.value!.options_model+1}`)
break;
case 'SurfaceCorrection':
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`)
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
break;
case 'DensityCorrection':
if (child.value!.now_v_h == 'vertical') {
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_v + 1}`)
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_v_point_amount}`)
} else {
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_h + 1}`)
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_h_point_amount}`)
}
break;
default:
break;
}
break;
case 'DensityCorrection':
if(child.value!.now_v_h=='vertical'){
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_v+1}`)
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_v_point_amount}`)
}else{
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_h+1}`)
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_h_point_amount}`)
}
break;
default:
break;
}
};
/**
* 重置全部参数
*/
const tmp_options = ref("")
const tmp_options=ref("")
const resetall = () => {
set?.ResetBlendingConfig().then((res) => {
let tmp = JSON.parse(res ? res.config : "");
@ -381,7 +348,7 @@ export default defineComponent({
config.value.row = tmp.row;
$store.commit("setfusion_configuration", res?.config);
});
if (options.value.length != 0) {
if(options.value.length!=0){
tmp_options.value = options.value
}
options.value = ""
@ -411,7 +378,7 @@ export default defineComponent({
const disable_blending_params_id = ref("blending@disable_blending_params");
const disable_blending_params = ref(false);
const show_blending_grids_id = ref("blending_grids_show");
const show_blending_grids = ref(true);
const show_blending_grids = ref(false);
const medium = ref(false);
const options = computed({
get() {
@ -437,13 +404,13 @@ export default defineComponent({
* 设置分辨率
* @param index 索引号
*/
const set_resolution = (index: number) => {
const set_resolution=(index:number)=>{
$q.loading.show({
message: 'Loading please wait'
})
let w = allconfig.resolution[index].width
let h = allconfig.resolution[index].height
set?.SetProjectorResolution(w, h).then((res) => {
message: 'Loading please wait'
})
let w =allconfig.resolution[index].width
let h =allconfig.resolution[index].height
set?.SetProjectorResolution(w,h).then((res)=>{
$store.commit("setfusion_configuration", res?.config);
})
let tmp = options.value
@ -478,7 +445,7 @@ export default defineComponent({
/**
* 延迟发送不然获取不到值
*/
set?.SetBlendingOption("blending_grids_select_ui", tmp)
set?.SetBlendingOption("blending_grids_select_ui", tmp)
setTimeout(() => {
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.value_point_amount}:1`)
@ -492,7 +459,7 @@ export default defineComponent({
default:
break;
}
// if (tmp.length) set?.SetBlendingOption("blending_grids_select_ui", tmp)
// if (tmp.length) set?.SetBlendingOption("blending_grids_select_ui", tmp)
},
{ deep: true })
@ -500,7 +467,7 @@ export default defineComponent({
const save = () => {
medium.value = true
save_cover_name.value = ''
save_cover_name.value=''
//
get_scenes()
};
@ -518,11 +485,9 @@ export default defineComponent({
};
const clear = () => {
record_times.value = 0
// show_blending_grids.value = false;
is_pad_screen.value = false
show_blending_grids.value = false;
send_show_blending_grids();
$store.commit("setSelectedProjector", "0/0");
set?.SetBlendingOption("blending_grids_show", "0");
setTimeout(() => {
clear_sessionStorage()
}, 500);
@ -532,7 +497,7 @@ export default defineComponent({
} else {
optionsstr.value = "FourPointCalibration";
}
now_selsect_projector.value = "0-0"
now_selsect_projector.value="0-0"
};
/**
@ -552,7 +517,7 @@ export default defineComponent({
setTimeout(() => {
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");
config_projectors.value = tmp
config_projectors.value=tmp
let local_options = [
[disable_blending_params_id, disable_blending_params],
[show_blending_grids_id, show_blending_grids]
@ -565,7 +530,6 @@ export default defineComponent({
local_opt[1].value = ("0" == opt || "false" == opt.toLowerCase() ? false : true);
}
}
show_blending_grids.value = true
EnableBlending.value = tmp.enable;
$store.commit("setEnablefusion", tmp.enable);
config.value.col = tmp.col;
@ -573,58 +537,49 @@ export default defineComponent({
$store.commit("setfusion_configuration", res?.config);
optionsstr.value = "FourPointCalibration";
allconfig = JSON.parse($store.state.fusion_configuration);
if (allconfig.resolution) {
for (let index = 0; index < allconfig.resolution.length; index++) {
if (allconfig.resolution[index].width == allconfig.projector_width && allconfig.resolution[index].height == allconfig.projector_height) {
now_resolution.value = index
if(allconfig.resolution){
for (let index = 0; index < allconfig.resolution.length; index++) {
if(allconfig.resolution[index].width==allconfig.projector_width&&allconfig.resolution[index].height==allconfig.projector_height){
now_resolution.value=index
}
}
} else {
allconfig = { resolution: [{ width: tmp.projector_width, height: tmp.projector_height }] };
now_resolution.value = 0
}
}else{
allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]};
now_resolution.value=0
}
projectorlayout.value = []
let cont = 0
for (let index = 1; index <= tmp.max_projector_count; index++) {
for (let indexx = 1; indexx <= tmp.max_projector_count; indexx++) {
if (index * indexx > tmp.max_projector_count) {
projectorlayout.value=[]
for (let index = 0; index < tmp.max_projector_count; index++) {
for (let indexx = 0; indexx < tmp.max_projector_count; indexx++) {
if(index*tmp.max_projector_count+indexx>tmp.max_projector_count){
continue
} else {
projectorlayout.value.push({ label: `${index}x${indexx}`, value: cont })
cont++
projectorlayout_tmp.value.push(`${index}x${indexx}`)
}else{
projectorlayout.value.push({ label: `${index+1}x${indexx+1}`, value: index*tmp.max_projector_count+indexx })
}
}
}
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if (tmp.col == Number(arr[1]) && tmp.row == Number(arr[0])) {
now_select_projectorlayout.value = index
}
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
}
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if(tmp.col==Number(arr[1])&&tmp.row==Number(arr[0])){
now_select_projectorlayout.value=index
}
}
});
get_scenes()
set?.SetBlendingOption("blending_grids_select_ui", "blending")
// show_blending_grids.value=true
// send_show_blending_grids()
}, 1000);
// console.log(" ")
});
}, 1000);
});
const save_cover_name = ref("")
const plan_list = [
''
]
const apply_the_selected_configuration = () => {
$q.loading.show({
message: 'Loading please wait'
})
message: 'Loading please wait'
})
set?.ApplyBlendingScene(select_configuration_name.value).then((res) => {
let tmp = JSON.parse(res ? res.config : "{}");
EnableBlending.value = tmp.enable;
@ -633,22 +588,18 @@ export default defineComponent({
config.value.row = tmp.row;
$store.commit("setfusion_configuration", res?.config);
allconfig = tmp
for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*');
if (tmp.projector_width == Number(arr[1]) && tmp.projector_height == Number(arr[0])) {
now_resolution.value = index
for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*');
if(tmp.projector_width==Number(arr[1])&&tmp.projector_height==Number(arr[0])){
now_resolution.value=index
}
}
}
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if (tmp.row == Number(arr[1]) && tmp.col == Number(arr[0])) {
now_select_projectorlayout.value = index
}
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
if(tmp.row==Number(arr[1])&&tmp.col==Number(arr[0])){
now_select_projectorlayout.value=index
}
}
select_configuration.value=false
});
let tmp = options.value
@ -675,7 +626,6 @@ export default defineComponent({
const saveconfig = () => {
set?.SaveBlendingConfig(save_cover_name.value);
medium.value = false
}
const isdebug = computed(() => {
@ -694,207 +644,103 @@ export default defineComponent({
const dialog_del_scenes = () => {
set?.DeleteBlendingScene(name_to_be_deleted.value);
plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1)
name_to_be_deleted.value = ''
select_configuration_name.value = ''
save_cover_name.value = ''
name_to_be_deleted.value=''
select_configuration_name.value=''
save_cover_name.value=''
}
const now_selsect_projector = ref("0-0")
const now_selsect_projector=ref("0-0")
const currently_selected_projector = (value: string) => {
set?.SetBlendingOption('blending_grids_select_projector', value);
now_selsect_projector.value = value
now_selsect_projector.value=value
}
/**
* 依赖注入
*/
provide("now_selsect_projector", now_selsect_projector);
let projectorlayout = ref([{ label: '1x1', value: 0 }, { label: '1x2', value: 1 }])
let projectorlayout_tmp = ref(<string[]>[])
const now_select_projectorlayout = ref(0)
const now_select_projectorlayout_tmp = ref("")
const send_projectorlayout = (val: number) => {
provide("now_selsect_projector",now_selsect_projector);
let projectorlayout=ref([{label:'1x1',value:0},{label:'1x2',value:1}])
const now_select_projectorlayout=ref(1)
const send_projectorlayout=(val:number) => {
let arr = projectorlayout.value[val].label.split('x');
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
let tmpp = JSON.parse(res!.config)
set?.SetProjectorLayout(Number(arr[0]),Number(arr[1])).then(res => {
let tmpp=JSON.parse(res!.config)
config.value.row = tmpp.row;
config.value.col = tmpp.col;
$q.loading.show({
message: 'Loading please wait'
})
$store.commit("setfusion_configuration", res?.config);
for (let index = 0; index < projectorlayout.value.length; index++) {
$store.commit("setfusion_configuration", res?.config);
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if (tmpp.col == Number(arr[1]) && tmpp.row == Number(arr[0])) {
now_select_projectorlayout.value = index
}
if(`${tmpp.row}x${tmpp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
if(tmpp.col==Number(arr[1])&&tmpp.row==Number(arr[0])){
now_select_projectorlayout.value=index
}
}
let tmp = options.value
options.value = ""
$store.commit("setSelectedProjector", "0/0");
setTimeout(() => {
clear_sessionStorage()
options.value = tmp
$q.loading.hide()
}, 800);
getconfig()
})
}
const send_projectorlayout2 = (val: string) => {
let arr = val.split('x');
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
let tmpp = JSON.parse(res!.config)
config.value.row = tmpp.row;
config.value.col = tmpp.col;
$q.loading.show({
message: 'Loading please wait'
})
$store.commit("setfusion_configuration", res?.config);
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if (tmpp.col == Number(arr[1]) && tmpp.row == Number(arr[0])) {
now_select_projectorlayout.value = index
}
if(`${tmpp.row}x${tmpp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
}
}
let tmp = options.value
options.value = ""
$store.commit("setSelectedProjector", "0/0");
setTimeout(() => {
clear_sessionStorage()
options.value = tmp
$q.loading.hide()
}, 800);
getconfig()
let tmp = options.value
options.value = ""
$store.commit("setSelectedProjector", "0/0");
setTimeout(() => {
clear_sessionStorage()
options.value = tmp
$q.loading.hide()
}, 800);
getconfig()
})
}
const btn_options = computed(() => {
let tmp = []
tmp.push({ label: $t.t('FourPointCalibration'), value: 'FourPointCalibration' })
tmp.push({ label: $t.t('SurfaceCorrection'), value: 'SurfaceCorrection', })
if (now_select_projectorlayout.value != 0) {
let tmp=[]
tmp.push({label: $t.t('FourPointCalibration'), value: 'FourPointCalibration'})
tmp.push({label: $t.t('SurfaceCorrection'),value: 'SurfaceCorrection',})
if(now_select_projectorlayout.value!=0){
tmp.push({ label: $t.t('FusionLocale'), value: 'FusionLocale' })
} else {
}else{
optionsstr.value = "FourPointCalibration";
}
tmp.push({ label: $t.t('DensityCorrection'), value: 'DensityCorrection', })
tmp.push({label: $t.t('DensityCorrection'),value: 'DensityCorrection',})
tmp.push({ label: $t.t('GridSettings'), value: 'GridSettings' })
return tmp
})
/**
* 计算可以显示的投影机数量
*/
const projectors_that_can_display = computed(() => {
const projectors_that_can_display=computed(()=>{
let allconfig = JSON.parse($store.state.fusion_configuration);
let col = allconfig.projectors.length
return { col }
return {col}
})
/**
* 弹窗
* 浅拷贝
*/
const confirm = ref(false)
let dialog_data: any = { parameter: "", fun: "", type: "" }
const dialog = (parameter: any, fun: any, type: string) => {
confirm.value = true
dialog_data.parameter = parameter
dialog_data.fun = fun
dialog_data.type = type
const confirm=ref(false)
let dialog_data:any={parameter:"",fun:"",type:""}
const dialog=(parameter:any,fun:any,type:string)=>{
confirm.value=true
dialog_data.parameter=parameter
dialog_data.fun=fun
dialog_data.type=type
}
const trigger_dialog = () => {
const trigger_dialog=()=>{
dialog_data.fun(dialog_data.parameter)
}
const confirm_projectorlayout=ref(false);
let dialog_data_projectorlayout: any = { parameter: "", fun: ""}
const dialog_projectorlayout = (parameter: any, fun: any) => {
confirm_projectorlayout.value = true
dialog_data_projectorlayout.parameter = parameter
dialog_data_projectorlayout.fun = fun
}
const trigger_dialog_projectorlayout = () => {
dialog_data_projectorlayout.fun(dialog_data_projectorlayout.parameter)
}
const re_match_data = () => {
const re_match_data=()=>{
let tmp = JSON.parse($store.state.fusion_configuration);
for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*');
if (tmp.projector_width == Number(arr[0]) && tmp.projector_height == Number(arr[1])) {
now_resolution.value = index
}
}
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if (tmp.row == Number(arr[0]) && tmp.col == Number(arr[1])) {
now_select_projectorlayout.value = index
}
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*');
if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){
now_resolution.value=index
}
}
}
}
const element: any = ref()
const element_full_screen = () => {
let elem = document.getElementById("element")
if (!document.fullscreenElement) {
elem!.requestFullscreen().catch((err) => {
});
is_pad_screen.value = true
} else {
document.exitFullscreen();
is_pad_screen.value = false
}
for (let index = 0; index < projectorlayout.value.length; index++) {
let arr = projectorlayout.value[index].label.split('x');
if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){
now_select_projectorlayout.value=index
}
}
}
const ispad = computed(() => {
let url = window.location.href;
return url.indexOf("pad") != -1
})
interface projectorlayoutarray {
label: string; value: number;
}
const show_projectorlayout = ref(<projectorlayoutarray[]>[])
const filterFn_projector = (val: any, update: any) => {
update(() => {
const needle = val.toLowerCase()
show_projectorlayout.value = projectorlayout.value.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
})
}
const show_projectorlayout2 = ref(<string[]>[])
const filterFn_projector2 = (val: any, update: any) => {
update(() => {
const needle = val.toLowerCase()
show_projectorlayout2.value = projectorlayout_tmp.value.filter(v => v.toLowerCase().indexOf(needle) > -1)
})
}
return {
now_select_projectorlayout_tmp,
show_projectorlayout2,
filterFn_projector2,
is_pad_screen,
dialog_data,
allconfig,
now_selsect_projector,
@ -939,21 +785,11 @@ export default defineComponent({
now_resolution,
set_resolution,
send_projectorlayout,
send_projectorlayout2,
now_select_projectorlayout,
projectorlayout,
btn_options,
projectors_that_can_display,
is_pad_style,
element,
element_full_screen,
ispad,
filterFn_projector,
show_projectorlayout,
confirm_projectorlayout,
dialog_data_projectorlayout,
dialog_projectorlayout,
trigger_dialog_projectorlayout
is_pad_style
};
},
});

View File

@ -3460,7 +3460,6 @@ export namespace Protocol {
location: number,
enable: boolean,
width: number,
auto_sync:boolean,
rpc_id = 0
) {
super();
@ -3473,15 +3472,12 @@ export namespace Protocol {
this.location = location ?? 0;
this.enable = enable ?? false;
this.width = width ?? 0;
this.auto_sync = auto_sync ?? false;
}
row = 0;
column = 0;
location = 0; //0左融合带1上融合带2右融合带3下融合带
enable = false;
width = 0;
auto_sync=false;
}
export class GetBlendingConfigResponseEntity extends PacketEntity {

View File

@ -417,7 +417,7 @@ export default {
FourPointCalibration: "Four Pint Calibration",
SurfaceCorrection: "Surface Correction",
DensityCorrection: "Density Correction",
GridSettings: "Auxiliary Settings",
GridSettings: "Grid Settings",
point: "dot",
reset: "reset",
"upper fusion zone parameters": "Upper Fusion Zone Parameters",
@ -509,9 +509,5 @@ export default {
"Whether to change the projector layout to",
"after upgrade, please clear browser cache Or refresh hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)":
"After Upgrade, Please Clear Browser Cache Or Refresh Hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)",
"fusion zone":"fusion zone",
"up":"up",
"left":"left",
"right":"right",
"down":"down"
"fusion zone":"fusion zone"
};

View File

@ -686,7 +686,7 @@ export default {
FourPointCalibration: "四点校正",
SurfaceCorrection: "曲面校正",
DensityCorrection: "疏密校正",
GridSettings: "辅助设置",
GridSettings: "网格设置",
point: "点",
reset: "重置",
"upper fusion zone parameters": "上融合带参数",
@ -776,9 +776,5 @@ export default {
"Whether to change the projector layout to": "是否更改投影机布局为",
"after upgrade, please clear browser cache Or refresh hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)":
"升级完成后请清空浏览器缓存或者进行硬刷新(Ctrl/Shift + F5 或者 CTRL + SHIFT + R)",
"fusion zone":"融合带",
"up":"上",
"left":"左",
"right":"右",
"down":"下"
"fusion zone":"融合带"
};

View File

@ -314,10 +314,6 @@ export default defineComponent({
}
);
const getconfig = () => {
set?.SetBlendingOption("blending_grids_select_ui", '4')
set?.SetBlendingOption('blending_grids_select_projector',"0-0");
set?.SetBlendingOption("blending_grids_select_point", `4:1`)
set?.SetBlendingOption("blending_grids_show", "1");
try {
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");

View File

@ -653,10 +653,6 @@ export default defineComponent({
return "rotate " + sulv + "s linear infinite";
});
const getconfig = () => {
set?.SetBlendingOption("blending_grids_select_ui", '4')
set?.SetBlendingOption('blending_grids_select_projector',"0-0");
set?.SetBlendingOption("blending_grids_select_point", `4:1`)
set?.SetBlendingOption("blending_grids_show", "1");
try {
set?.GetBlendingConfig("").then((res) => {});
set?.GetBlendingConfig("").then((res) => {