Compare commits

..

No commits in common. "eb6cf76f6969c0a77be01a3f1fb96eebab338602" and "ea5f50ff8e2da791e0b00fb02061d76b3c88e0f8" have entirely different histories.

13 changed files with 517 additions and 1547 deletions

View File

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

View File

@ -1292,11 +1292,9 @@ export default defineComponent({
((item.currenty + item.h / 2) / wall_dom?.offsetHeight) * 2160 ((item.currenty + item.h / 2) / wall_dom?.offsetHeight) * 2160
); );
} }
test_monitor_wall.value = ordination( test_monitor_wall.value=ordination(JSON.parse(JSON.stringify(test_monitor_wall.value)))
JSON.parse(JSON.stringify(test_monitor_wall.value))
);
realtime_upload(); realtime_upload();
item.active = true; item.active=true
}; };
const exceedrange = (item: test_monitor) => { const exceedrange = (item: test_monitor) => {
const wall_dom = wall.value; const wall_dom = wall.value;
@ -1484,7 +1482,7 @@ export default defineComponent({
); );
item.angle = element.angle; item.angle = element.angle;
item.isShow = true; item.isShow = true;
item.active = false; item.active=false;
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item))); test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
sort_index.value.push(test_monitor_list.value[element.index].uuid); sort_index.value.push(test_monitor_list.value[element.index].uuid);
@ -1495,11 +1493,11 @@ export default defineComponent({
}); });
}); });
} }
if (a.length == 0) { if(a.length==0){
test_monitor_list.value.forEach((ele) => { test_monitor_list.value.forEach((ele) => {
ele.isHide = false; ele.isHide = false;
}); })
test_monitor_wall.value = []; test_monitor_wall.value=[]
} }
}; };
const sub_x = () => { const sub_x = () => {
@ -1721,7 +1719,7 @@ export default defineComponent({
sort_index.value = []; sort_index.value = [];
old_sort_index = []; old_sort_index = [];
last_wall.value = []; last_wall.value = [];
last_percenter.value = 1; last_percenter.value=1
let client = GlobalData.getInstance().getCurrentClient(); let client = GlobalData.getInstance().getCurrentClient();
if (client) { if (client) {
const settings = await GlobalData.getInstance() const settings = await GlobalData.getInstance()
@ -1743,9 +1741,6 @@ export default defineComponent({
offsetWidth.value = wall_dom.offsetWidth; offsetWidth.value = wall_dom.offsetWidth;
getpx(); getpx();
} }
test_monitor_list.value.forEach((element) => {
element.isHide = false;
});
if (response && settings) { if (response && settings) {
const a = response?.config.windows; const a = response?.config.windows;
output_length.value = output_length.value =
@ -1774,7 +1769,9 @@ export default defineComponent({
multiple.value = false; multiple.value = false;
last_wall.value = []; last_wall.value = [];
sort_index.value = []; sort_index.value = [];
test_monitor_list.value.forEach((element) => {
element.isHide = false;
});
$store.commit("setShowMonitorList", []); $store.commit("setShowMonitorList", []);
loading.value = false; loading.value = false;
} else if (a && wall_dom) { } else if (a && wall_dom) {
@ -1801,7 +1798,7 @@ export default defineComponent({
); );
item.angle = element.angle; item.angle = element.angle;
item.isShow = true; item.isShow = true;
item.active = false; item.active=false
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item))); test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
last_wall.value.push(JSON.parse(JSON.stringify(item))); last_wall.value.push(JSON.parse(JSON.stringify(item)));
sort_index.value.push( sort_index.value.push(
@ -1818,13 +1815,6 @@ export default defineComponent({
current_index.value = -1; current_index.value = -1;
} }
} }
if (a.length == 0) {
test_monitor_list.value.forEach((ele) => {
ele.isHide = false;
});
sort_index.value = [];
test_monitor_wall.value = [];
}
} }
} }
}, },
@ -2027,6 +2017,7 @@ export default defineComponent({
} }
} }
} }
}, },
onDragEnter(e: DragEvent, index: string) { onDragEnter(e: DragEvent, index: string) {
@ -2214,7 +2205,7 @@ export default defineComponent({
tep_item.currenty = item.currenty; tep_item.currenty = item.currenty;
} }
}); });
multiple_select.value=[]
realtime_upload(); realtime_upload();
}, },
alignBottom() { alignBottom() {
@ -2225,7 +2216,6 @@ 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=[]
realtime_upload(); realtime_upload();
}, },
alignRight() { alignRight() {
@ -2236,7 +2226,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=[]
realtime_upload(); realtime_upload();
}, },
alignLeft() { alignLeft() {
@ -2247,7 +2237,6 @@ export default defineComponent({
tep_item.currentx = item.currentx; tep_item.currentx = item.currentx;
} }
}); });
multiple_select.value=[]
realtime_upload(); realtime_upload();
}, },
testLog(a: any) { testLog(a: any) {

View File

@ -7,8 +7,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'vertical'" :class="[options_model_v == index ? 'action' : 'point']" <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-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'" 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" @click="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'v')">
@dragging="dragStartHandle($event, index, 'v')">
<span>v{{ <span>v{{
index + 1 index + 1
}}</span> }}</span>
@ -16,8 +15,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'vertical'" :class="[options_model_v == index ? 'action' : 'point']" <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" 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" :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" @activated="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'v')">
@dragging="dragStartHandle($event, index, 'v')">
<span>v{{ <span>v{{
index + 1 index + 1
}}</span> }}</span>
@ -25,8 +23,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'level'" :class="[options_model_h == index ? 'action' : 'point']" <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-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'" 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" @click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'h')">
@dragging="dragStartHandle($event, index, 'h')">
<span>h{{ <span>h{{
index + 1 index + 1
}}</span> }}</span>
@ -34,8 +31,7 @@
<Vue3DraggableResizable v-show="now_v_h == 'level'" :class="[options_model_h == index ? 'action' : 'point']" <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-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" 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" @click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'h')">
@dragging="dragStartHandle($event, index, 'h')">
<span>h{{ <span>h{{
index + 1 index + 1
}}</span> }}</span>
@ -44,7 +40,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="ispad"> <div>
<div class="row"> <div class="row">
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-5"> <div class="col-5">
@ -59,8 +55,7 @@
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('vertical point')" <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 @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> 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" <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"
@click="() => { add_dialog = true; value_point_amount_tmp_v = value_v_point_amount }" text-color="black"
:label="$t('add control points')" /></div> :label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }" <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> :disable="value_v_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
@ -73,29 +68,26 @@
<div class="col-2" @mousewheel="details_selsect_v"> <q-select class="q-pt-md " :label="$t('vertical')" <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" @update:model-value="(val) => { options_v = val }" :dense="true" filled v-model="options_model_v"
:options="options_v" emit-value map-options /></div> :options="options_v" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input <div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input v-if="value_v[options_model_v]"
v-if="value_v[options_model_v]" filled type="number" class="q-pt-md" :dense="true" filled type="number" class="q-pt-md" :dense="true" v-model="value_v[options_model_v].y"
v-model="value_v[options_model_v].y" @update:model-value="chang(options_model_v, $event, 'v')" lazy-rules @update:model-value="chang(options_model_v, $event, 'v')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
</div> </div>
<div class="q-pt-md col-2"> <div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model_v, true, 'v')" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(options_model_v, true, 'v')" text-color="black" :label="$t('reset')" />
</div> </div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black" <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> :label="$t('reset all')+value_v_point_amount+$t('point')" /></div>
</div> </div>
</div> </div>
<div> <div>
<div class="row q-md-py-md" v-show="now_v_h == 'level'"> <div class="row q-md-py-md" v-show="now_v_h == 'level'">
<div class="col-1"></div> <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 @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> 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" <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"
@click="add_dialog = true; value_point_amount_tmp_h = value_h_point_amount" text-color="black"
:label="$t('add control points')" /></div> :label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }" <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> :disable="value_h_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
@ -105,113 +97,22 @@
<div class="row" v-show="now_v_h == 'level'"> <div class="row" v-show="now_v_h == 'level'">
<div class="col-1"></div> <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" @update:model-value="(val) => { options_h = val }" :dense="true" filled v-model="options_model_h"
:options="options_h" emit-value map-options /></div> :options="options_h" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input <div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input v-if="value_h[options_model_h]"
v-if="value_h[options_model_h]" filled type="number" class="q-pt-md" :dense="true" filled type="number" class="q-pt-md" :dense="true" v-model="value_h[options_model_h].x"
v-model="value_h[options_model_h].x" @update:model-value="chang(options_model_h, $event, 'h')" lazy-rules @update:model-value="chang(options_model_h, $event, 'h')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
</div> </div>
<div class="q-pt-md col-2"> <div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model_h, true, 'h')" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(options_model_h, true, 'h')" text-color="black" :label="$t('reset')" />
</div> </div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black" <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> :label="$t('reset all')+value_h_point_amount+$t('point')" /></div>
</div> </div>
</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;"> <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')" /> :label="$t('auxiliary lines')" />
@ -240,26 +141,21 @@
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<div class="row"> <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 <div v-if="now_v_h=='vertical'" class="col-10"><q-input filled v-model="value_v_point_amount" min="3" disable type="number"
type="number" :label="$t('Please enter the points you need to add')" :label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
@update:model-value="(val: any) => { }" />
</div> </div>
<div v-else class="col-10"><q-input filled v-model="value_h_point_amount" min="3" disable type="number" <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>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↑" <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) }" /> @click="() => {now_v_h=='vertical'?preview_v(Number(value_v_point_amount)+1):preview_h(Number(value_h_point_amount)+1)}" /> </div>
</div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↓" <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) }" /> @click="() => {now_v_h=='vertical'?preview_v(Number(value_v_point_amount)-1):preview_h(Number(value_h_point_amount)-1)}" /></div>
</div>
</div> </div>
</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')" <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 />
@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-btn flat :label="$t('ok')" @click="add" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
@ -269,41 +165,26 @@
<q-dialog v-model="ipad_chang"> <q-dialog v-model="ipad_chang">
<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('point') +(now_v_h == 'level'?options_model_h+1:options_model_v+1)}}</div> --> <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>
</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" v-show="now_v_h != 'level'"> <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" <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>
@touchstart="handlerTouchstart('y', '+')" @touchend="handlerTouchend" /></div>
</div> </div>
<div class="row"> <div class="row" >
<div class="col-6" style="text-align: center;"><q-btn color="white" v-show="now_v_h == 'level'" <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>
text-color="black" icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x', '-')" <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>
@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>
<div class="row q-pt-md" v-show="now_v_h != 'level'"> <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" <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>
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y', '-')" @touchend="handlerTouchend" /></div>
</div> </div>
</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('close')" color="primary" @click="ipad_chang = false" /> <q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<style scoped> <style scoped>
@ -318,14 +199,6 @@
} }
</style> </style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts"> <script lang="ts">
import { import {
defineComponent, defineComponent,
@ -367,7 +240,7 @@ export default defineComponent({
/** /**
* 平板弹窗修改 * 平板弹窗修改
*/ */
const ipad_chang = ref(false) const ipad_chang=ref(false)
/** /**
* 当前url路径 * 当前url路径
*/ */
@ -530,7 +403,7 @@ export default defineComponent({
if (now_v_h.value != 'level') { if (now_v_h.value != 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "ver_density") set?.SetBlendingOption("blending_grids_select_ui", "ver_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`) set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_v.value = 0 options_model_v.value=0
} }
save_set_cache() save_set_cache()
@ -542,7 +415,7 @@ export default defineComponent({
if (now_v_h.value == 'level') { if (now_v_h.value == 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "hor_density") set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`) set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_h.value = 0 options_model_h.value=0
} }
save_set_cache() save_set_cache()
}, 100); }, 100);
@ -775,7 +648,7 @@ export default defineComponent({
const resetall_all = () => { const resetall_all = () => {
switch (now_v_h.value) { switch (now_v_h.value) {
case 'vertical': 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 key in config.multi_ver_density) {
for (let index = 0; index < config.multi_ver_density[key].length; index++) { 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 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); send_value(-2, 'v', 0);
break; break;
case 'level': 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 key in config.multi_hor_density) {
for (let index = 0; index < config.multi_hor_density[key].length; index++) { 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 config.multi_hor_density[key][index].x = config.multi_hor_density[key][index].def_x
@ -1173,7 +1046,7 @@ export default defineComponent({
for (let index = 0; index < val; index++) { for (let index = 0; index < val; index++) {
let y = allconfig.projector_height - height * index let y = allconfig.projector_height - height * index
let x = width * index let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + 1 }; let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point:index + 1 };
value_h.value.push(tmp) value_h.value.push(tmp)
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y) 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 def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
@ -1195,12 +1068,10 @@ export default defineComponent({
const value_point_amount_tmp_v = ref(0) const value_point_amount_tmp_v = ref(0)
const value_point_amount_tmp_h = ref(0) const value_point_amount_tmp_h = ref(0)
/** /**
* 长按实现 * 长按实现
*/ */
let loop: NodeJS.Timeout let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart = (type: string, fun: string) => { const handlerTouchstart = (type: string, fun: string) => {
loop_end = setTimeout(() => {
loop = setInterval(() => { loop = setInterval(() => {
if (type == 'x') { if (type == 'x') {
if (fun == '+') { if (fun == '+') {
@ -1219,25 +1090,8 @@ export default defineComponent({
} }
// chang(options_model.value, 0, '') // chang(options_model.value, 0, '')
}, 15) }, 15)
}, 1000);
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")
} 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")
}
} }
const handlerTouchend = () => { const handlerTouchend = () => {
clearTimeout(loop_end)
clearInterval(loop) clearInterval(loop)
} }
/** /**
@ -1245,115 +1099,36 @@ export default defineComponent({
*/ */
const keyDown = () => { const keyDown = () => {
document.onkeydown = (e) => { document.onkeydown = (e) => {
let lock = 0; let lock=0;
let e1 = e || window.event || arguments.callee.caller.arguments[0] let e1 = e || window.event || arguments.callee.caller.arguments[0]
switch (e.code) { switch (e.code) {
case "KeyW": 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; break;
case "KeyA": 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; break;
case "KeyS": 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; break;
case "KeyD": 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; break;
default: default:
lock = 1 lock=1
break; break;
} }
if (lock == 0) { 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') 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({ defineExpose({
now_v_h, now_v_h,
options_model_v, options_model_v,
options_model_h options_model_h
}); });
return { return {
mousedown,
mouseup,
input_x_focus,
input_y_focus,
ispad,
config, config,
value_point_amount_tmp_v, value_point_amount_tmp_v,
value_point_amount_tmp_h, value_point_amount_tmp_h,

View File

@ -17,16 +17,14 @@
</div> </div>
</div> </div>
<div> <div>
<div class="row" v-show="ispad"> <div class="row">
<div class="col-1"></div> <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 <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 v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
map-options /></div> map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'x')"> <div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'x')"> <q-input filled type="number" class="q-pt-md" :dense="true"
<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" 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 > lazy-rules />
</q-input>
</div> </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" <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" 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><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
</div> </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>
<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> -->
<q-dialog v-model="ipad_chang"> <q-dialog v-model="ipad_chang">
<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('point') +(options_model+1 )}}</div> --> <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>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<div class="row"> <div class="row">
@ -105,7 +55,7 @@
</div> </div>
</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('close')" color="primary" @click="ipad_chang=false" /> <q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
@ -123,14 +73,6 @@
} }
</style> </style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts"> <script lang="ts">
import { import {
defineComponent, defineComponent,
@ -553,12 +495,9 @@ export default defineComponent({
} }
/** /**
* 长按实现 * 长按实现
* 单击实现
*/ */
let loop: NodeJS.Timeout let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart=(type:string,fun:string)=>{ const handlerTouchstart=(type:string,fun:string)=>{
loop_end = setTimeout(() => {
loop=setInterval(()=>{ loop=setInterval(()=>{
if(type=='x'){ if(type=='x'){
if(fun=='+'){ if(fun=='+'){
@ -576,25 +515,8 @@ export default defineComponent({
} }
chang(options_model.value,0,'') chang(options_model.value,0,'')
},10) },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=()=>{ const handlerTouchend=()=>{
clearTimeout(loop_end)
clearInterval(loop) clearInterval(loop)
} }
/** /**
@ -624,90 +546,10 @@ export default defineComponent({
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
})
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({ defineExpose({
options_model, options_model,
}); });
return { return {
input_x_focus,
input_y_focus,
mousedown,
mouseup,
add_cut,
now_selsect_projector, now_selsect_projector,
details_selsect, details_selsect,
resetall, resetall,
@ -727,8 +569,7 @@ export default defineComponent({
ipad_chang, ipad_chang,
url, url,
handlerTouchstart, handlerTouchstart,
handlerTouchend, handlerTouchend
ispad
} }
} }
}) })

View File

@ -11,33 +11,15 @@
<q-toggle class="float-right" v-model="array[0].isshow" label="" /> <q-toggle class="float-right" v-model="array[0].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 0" <q-input dense filled type="number" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''"
:bg-color="group == 0 ? 'cyan-1' : ''" @focus="group = 0" v-model.number="array[0].value" @focus="group = 0" v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=0}" :readonly="url.indexOf('pad')!=-1"
:label="$t('upper fusion zone parameters')" lazy-rules :rules="[
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 0 }"
:readonly="url.indexOf('pad') != -1" :rules="[
(val) => (val) =>
(val !== null && val !== '') || (val !== null && val !== '') ||
$t('Please enter a number'), $t('Please enter a number'),
(val) => (val) =>
(val >= 0 && val < config.height) || $t('Please enter 0-100'), (val >= 0 && val < config.height) || $t('Please enter 0-100'),
]" /> ]" />
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 0"
:bg-color="group == 0 ? 'cyan-1' : ''" @focus="() => { group = 0; input_focus[0] = true }"
v-model.number="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 0 }"
:readonly="url.indexOf('pad') != -1" @blur="input_focus[0] = false" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
]">
<template v-if="input_focus[0]" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+', 0)" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-', 0)" @mouseup="mouseup" />
</template>
</q-input>
</div> </div>
</div> </div>
</div> </div>
@ -51,33 +33,15 @@
<q-toggle class="float-right" @click="group = 1" v-model="array[1].isshow" label="" /> <q-toggle class="float-right" @click="group = 1" v-model="array[1].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 1" <q-input dense filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''"
:bg-color="group == 1 ? 'cyan-1' : ''" @focus="group = 1" v-model.number="array[1].value" @focus="group = 1" v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=1}" :readonly="url.indexOf('pad')!=-1"
:label="$t('Left fusion Band Parameters')" lazy-rules :rules="[
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 1 }"
:readonly="url.indexOf('pad') != -1" :rules="[
(val) => (val) =>
(val !== null && val !== '') || (val !== null && val !== '') ||
$t('Please enter a number'), $t('Please enter a number'),
(val) => (val) =>
(val >= 0 && val < config.width) || $t('Please enter 0-100'), (val >= 0 && val < config.width) || $t('Please enter 0-100'),
]" /> ]" />
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 1"
:bg-color="group == 1 ? 'cyan-1' : ''" @focus="() => { group = 1; input_focus[1] = true }"
v-model.number="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 1 }"
:readonly="url.indexOf('pad') != -1" @blur="input_focus[1] = false" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
]">
<template v-if="input_focus[1]" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+', 1)" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-', 1)" @mouseup="mouseup" />
</template>
</q-input>
</div> </div>
</div> </div>
</div> </div>
@ -87,36 +51,18 @@
<q-toggle class="float-right" @click="group = 2" v-model="array[2].isshow" label="" /> <q-toggle class="float-right" @click="group = 2" v-model="array[2].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 2" <q-input dense filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''"
:bg-color="group == 2 ? 'cyan-1' : ''" @focus="group = 2" v-model.number="array[2].value" @focus="group = 2" v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=2}" :readonly="url.indexOf('pad')!=-1"
:label="$t('Right fusion Band Parameters')" lazy-rules :rules="[
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 2 }"
:readonly="url.indexOf('pad') != -1" :rules="[
(val) => (val) =>
(val !== null && val !== '') || (val !== null && val !== '') ||
$t('Please enter a number'), $t('Please enter a number'),
(val) => (val) =>
(val >= 0 && val < config.width) || $t('Please enter 0-100'), (val >= 0 && val < config.width) || $t('Please enter 0-100'),
]" /> ]" />
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 2"
:bg-color="group == 2 ? 'cyan-1' : ''" @focus="() => { group = 2; input_focus[2] = true }"
v-model.number="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 2 }"
:readonly="url.indexOf('pad') != -1" @blur="input_focus[2] = false" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
]">
<template v-if="input_focus[2]" v-slot:append>
<q-icon name="arrow_upward" @mousedown="mousedown('+', 2)" @mouseup="mouseup" />
<q-icon name="arrow_downward" @mousedown="mousedown('-', 2)" @mouseup="mouseup" />
</template>
</q-input>
</div> </div>
<div class="col-3"><span>{{ $t('Whether to operate synchronously') }}</span><q-checkbox <div class="col-3"><span>{{ $t('Whether to operate synchronously') }}</span><q-checkbox
v-model="auto_sync" @update:model-value="() => { }" /></div> v-model="auto_sync" @update:model-value="()=>{}" /></div>
</div> </div>
</div> </div>
</div> </div>
@ -129,33 +75,15 @@
<q-toggle class="float-right" v-model="array[3].isshow" label="" /> <q-toggle class="float-right" v-model="array[3].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 3" <q-input dense filled type="number" :autofocus="group == 3" :bg-color="group == 3 ? 'cyan-1' : ''"
:bg-color="group == 3 ? 'cyan-1' : ''" @focus="group = 3" v-model.number="array[3].value" @focus="group = 3" v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=3}" :readonly="url.indexOf('pad')!=-1"
:label="$t('Lower fusion Zone Parameters')" lazy-rules :rules="[
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 3 }"
:readonly="url.indexOf('pad') != -1" :rules="[
(val) => (val) =>
(val !== null && val !== '') || (val !== null && val !== '') ||
$t('Please enter a number'), $t('Please enter a number'),
(val) => (val) =>
(val >= 0 && val < config.height) || $t('Please enter 0-100'), (val >= 0 && val < config.height) || $t('Please enter 0-100'),
]" /> ]" />
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 3"
:bg-color="group == 3 ? 'cyan-1' : ''" @focus="() => { group = 3; input_focus[3] = true }"
v-model.number="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 3 }"
:readonly="url.indexOf('pad') != -1" @blur="input_focus[3] = false" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
]">
<template v-if="input_focus[3]" v-slot:append>
<q-icon name="arrow_upward" @mousedown="handlerTouchstart('+')" @mouseup="handlerTouchend" />
<q-icon name="arrow_downward" @mousedown="handlerTouchstart('-')" @mouseup="handlerTouchend" />
</template>
</q-input>
</div> </div>
</div> </div>
</div> </div>
@ -163,38 +91,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-12" v-show="group != 4 || ispad"> <div class="col-12" v-if="group != 4">
<p class="text-center" style="margin: 0 0 8;">{{ $t("Set Fusion Band Parameters") }}</p> <p class="text-center" style="margin: 0 0 8;">{{ $t("Set Fusion Band Parameters") }}</p>
<div style="display: flex; justify-content: space-evenly"> <div style="display: flex; justify-content: space-evenly">
<div> <div>
<q-slider v-model="array[group].alpha" v-show="!ispad" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" <q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
color="green" vertical reverse label-always /> vertical reverse label-always />
<div> <q-input v-show="ispad" dense filled hide-bottom-space type="number" max="1" min="0" step="0.1" <div> <q-input dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
@update:model-value="chang('alpha')" @update:model-value="chang('alpha')" v-model="array[group].alpha" lazy-rules :rules="[
@click="() => { now_apg = 'alpha'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
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'),
]" /> ]" />
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
@update:model-value="chang('alpha')"
@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" lazy-rules :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val <= 1) || $t('Please enter a value within the range'),
]" >
<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_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
</template>
</q-input>
<p style="text-align: center;">Alpha</p> <p style="text-align: center;">Alpha</p>
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('alpha')" text-color="black" <q-btn style="margin-top: 0.5rem;" color="white" @click="reset('alpha')" text-color="black"
:label="$t('reset')" /> :label="$t('reset')" />
@ -202,32 +112,16 @@
</div> </div>
<div> <div>
<q-slider v-model="array[group].p" v-show="!ispad" :min="0" @change="chang('p')" :max="16" :step="0.01" <q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="16" :step="0.01" color="green" vertical
color="green" vertical reverse label-always /> reverse label-always />
<div> <q-input v-show="ispad" dense filled hide-bottom-space type="number" max="16" min="0" step="0.1" <div> <q-input dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
@update:model-value="chang('p')" @click="() => { now_apg = 'p'; ispad ? ipad_chang_input = true : '' }" @update:model-value="chang('p')" v-model="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'),
]" /> ]" />
<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')" @click="() => { now_apg = 'p'; ispad ? ipad_chang_input = true : '' }"
:readonly="ispad" v-model.number="array[group].p" lazy-rules :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
]" >
<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_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
</template>
</q-input>
<p style="text-align: center;">Power</p> <p style="text-align: center;">Power</p>
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('p')" text-color="black" <q-btn style="margin-top: 0.5rem;" color="white" @click="reset('p')" text-color="black"
:label="$t('reset')" /> :label="$t('reset')" />
@ -235,35 +129,17 @@
</div> </div>
<div> <div>
<q-slider v-model="array[group].gamma" v-show="!ispad" :min="0" @change="chang('gamma')" :max="16" :step="0.01" <q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="16" :step="0.01" color="green"
color="green" vertical reverse label-always /> vertical reverse label-always />
<div> <div>
<q-input v-show="ispad" :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1" <q-input :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
@update:model-value="chang('gamma')" @update:model-value="chang('gamma')" v-model="array[group].gamma" lazy-rules :rules="[
@click="() => { now_apg = 'gamma'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
v-model.number="array[group].gamma" 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'),
]" /> ]" />
<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"
@click="() => { now_apg = 'gamma'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
v-model.number="array[group].gamma" lazy-rules :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
]" >
<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_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
</template>
</q-input>
<p style="text-align: center;">Gamma</p> <p style="text-align: center;">Gamma</p>
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('gamma')" text-color="black" <q-btn style="margin-top: 0.5rem;" color="white" @click="reset('gamma')" text-color="black"
:label="$t('reset')" /> :label="$t('reset')" />
@ -271,86 +147,37 @@
</div> </div>
</div> </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">
<q-item>
<q-item-section avatar class="head_1">
{{ $t("background color") }}
</q-item-section>
<q-item-section>
<q-input v-model="color" :rules="['anyColor']">
<template v-slot:append>
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
<q-color v-model="color" @change="submit" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</q-item-section>
</q-item>
</div> </div>
</div>
</div>
</div>
<div style="position: absolute;bottom: 0;"> <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')" /> :label="$t('auxiliary lines')" />
</div> </div>
<q-dialog v-model="ipad_chang" ref="ipadref"> <q-dialog v-model="ipad_chang">
<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') + (group + 1) }}</div> --> <div class="text-h6">{{ $t('fusion zone') +(group+1 )}}</div>
<div class="row">
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone')" :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" v-show="group==0||group==3">
<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" v-show="group==1||group==2">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" <div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_left" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div>
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div> <div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('+')" @touchend="handlerTouchend" /></div>
</div>
<div class="row q-pt-md" v-show="group==0||group==3">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_down" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div>
</div> </div>
</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('close')" color="primary" @click="ipad_chang = false" /> <q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
<q-dialog v-model="ipad_chang_input">
<q-card style="width: 40vw; max-width: 80vw;">
<q-card-section>
<div class="text-h6">{{ $t('fusion zone') + options[group].label + ` ${now_apg}` }}</div>
</q-card-section>
<q-card-section class="q-pt-none">
<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"
@touchstart="handlerTouchstart_apg('+')" @touchend="handlerTouchend_apg" /></div>
</div>
<div class="row q-pt-md">
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
icon="keyboard_arrow_down" @touchstart="handlerTouchstart_apg('-')" @touchend="handlerTouchend_apg" /></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_input = false" />
</q-card-actions>
</q-card>
</q-dialog>
</template> </template>
<style> <style>
@ -371,14 +198,6 @@ p {
} }
</style> </style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts"> <script lang="ts">
import { import {
defineComponent, defineComponent,
@ -390,7 +209,7 @@ import {
onBeforeUnmount, onBeforeUnmount,
reactive, reactive,
onMounted, onMounted,
toRefs, toRefs,
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@ -402,7 +221,7 @@ export default defineComponent({
let set = GlobalData.getInstance().getCurrentClient(); let set = GlobalData.getInstance().getCurrentClient();
let $store = useStore(); let $store = useStore();
let $t = useI18n(); let $t = useI18n();
const group = ref(2); const group = ref(4);
const set_cache: any = ref([]); const set_cache: any = ref([]);
const enablefusion = ref(false); const enablefusion = ref(false);
let array: any = reactive([ let array: any = reactive([
@ -426,11 +245,6 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1] $store.getters.GetTheCurrentlySelectedCamera[1]
); );
}); });
const color = ref("#ffffff");
const ispad = computed(() => {
let url = window.location.href;
return url.indexOf("pad") != -1
})
const reset = (type: string) => { const reset = (type: string) => {
switch (type) { switch (type) {
case 'gamma': case 'gamma':
@ -475,9 +289,7 @@ export default defineComponent({
watch( watch(
() => configselsect, () => configselsect,
(newVal, oldVal) => { (newVal, oldVal) => {
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse($store.state.fusion_configuration);
let tmp = JSON.parse(res ? res.config : "");
// let tmp = JSON.parse($store.state.fusion_configuration);
let fortmp = null; let fortmp = null;
let i; let i;
for (i of tmp.projectors) { for (i of tmp.projectors) {
@ -492,13 +304,11 @@ export default defineComponent({
config = JSON.parse(JSON.stringify(fortmp)); config = JSON.parse(JSON.stringify(fortmp));
use_server_config(); use_server_config();
// use_set_cache(); use_set_cache();
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
setnowindex(); setnowindex();
});
}, },
{ deep: true } { deep: true }
); );
@ -587,7 +397,7 @@ export default defineComponent({
array[arr[index]].value = Number(config.params[index].size); array[arr[index]].value = Number(config.params[index].size);
} }
let tmp = JSON.parse($store.state.fusion_configuration).options; let tmp = JSON.parse($store.state.fusion_configuration).options;
auxiliary_line.value = tmp.blending_grids_assistant_lines == "1" auxiliary_line.value=tmp.blending_grids_assistant_lines=="1"
if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale);
use_set_cache(); use_set_cache();
setnowindex(); setnowindex();
@ -606,18 +416,16 @@ export default defineComponent({
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");
config = tmp.projectors[selectedprojector.value]; config = tmp.projectors[selectedprojector.value];
ste_status.value = 1; ste_status.value = 1;
color.value = tmp.blending_grids_background_color ?? "#7f7f7f"
// console.log(tmp.blending_grids_background_color )
startconfig(); startconfig();
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
}) })
if (sessionStorage.FusionLocale_async) auto_sync.value = sessionStorage.FusionLocale_async == 'true' if(sessionStorage.FusionLocale_async)auto_sync.value=sessionStorage.FusionLocale_async=='true'
}), }),
onBeforeUnmount(() => { onBeforeUnmount(() => {
sessionStorage.FusionLocale = JSON.stringify(set_cache.value); sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
sessionStorage.FusionLocale_async = auto_sync.value sessionStorage.FusionLocale_async=auto_sync.value
}); });
watch( watch(
@ -629,7 +437,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
1, 1,
array[0].isshow, array[0].isshow,
Number(array[0].value), auto_sync.value Number(array[0].value)
); );
save_set_cache(); save_set_cache();
@ -645,13 +453,13 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
0, 0,
array[1].isshow, array[1].isshow,
Number(array[1].value), auto_sync.value Number(array[1].value)
); );
if (auto_sync.value) { if (auto_sync.value){
// left_right_auto_add(Number(newVal)%2==0?newVal:Number(newVal)+1); left_right_auto_add(Number(newVal)%2==0?newVal:Number(newVal)+1);
} }
Number(newVal) % 2 != 0 ? array[1].value = Number(array[1].value) + 1 : '' Number(newVal)%2!=0?array[1].value=Number(array[1].value)+1:''
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -665,10 +473,10 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
2, 2,
array[2].isshow, array[2].isshow,
Number(array[2].value), auto_sync.value Number(array[2].value)
); );
// if (auto_sync.value) left_right_auto_add(Number(newVal)%2==0?newVal:Number(newVal)+1); if (auto_sync.value) left_right_auto_add(Number(newVal)%2==0?newVal:Number(newVal)+1);
Number(newVal) % 2 != 0 ? array[2].value = Number(array[2].value) + 1 : '' Number(newVal)%2!=0?array[2].value=Number(array[2].value)+1:''
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -682,7 +490,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
3, 3,
array[3].isshow, array[3].isshow,
Number(array[3].value), auto_sync.value Number(array[3].value)
); );
save_set_cache(); save_set_cache();
}, },
@ -699,7 +507,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
1, 1,
array[0].isshow, array[0].isshow,
Number(array[0].value), auto_sync.value Number(array[0].value)
); );
save_set_cache(); save_set_cache();
}, },
@ -714,9 +522,9 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
0, 0,
array[1].isshow, array[1].isshow,
Number(array[1].value), auto_sync.value Number(array[1].value)
); );
// if (auto_sync.value) left_right_auto_add(-1); if (auto_sync.value) left_right_auto_add(-1);
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -730,9 +538,9 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
2, 2,
array[2].isshow, array[2].isshow,
Number(array[2].value), auto_sync.value Number(array[2].value)
); );
// if (auto_sync.value) left_right_auto_add(-1); if (auto_sync.value) left_right_auto_add(-1);
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -746,7 +554,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
3, 3,
array[3].isshow, array[3].isshow,
Number(array[3].value), auto_sync.value Number(array[3].value)
); );
save_set_cache(); save_set_cache();
}, },
@ -765,65 +573,59 @@ 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) {
// let tmp = set_cache.value[1] == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]); let tmp = set_cache.value[1] == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]);
// let set_cache_tmp: any = [] let set_cache_tmp: any = []
// if (tmp[1].hasOwnProperty("power")) { if (tmp[1].hasOwnProperty("power")) {
// for (let index = 0; index < 4; index++) { for (let index = 0; index < 4; index++) {
// let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) } let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) }
// set_cache_tmp.push(tmpobj) set_cache_tmp.push(tmpobj)
// } }
// } else { } else {
// set_cache_tmp = tmp set_cache_tmp = tmp
// } }
// if (ste_status.value == 0) { if (ste_status.value == 0) {
// if (difference == -1) { if (difference == -1) {
// set_cache_tmp[1].isshow = array[2].isshow set_cache_tmp[1].isshow = array[2].isshow
// } else { } else {
// set_cache_tmp[1].value = difference set_cache_tmp[1].value = difference
// } }
// set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value)); set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value));
// set_cache.value[1] = JSON.stringify(set_cache_tmp); set_cache.value[1] = JSON.stringify(set_cache_tmp);
// } }
// } }
// if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1&&group.value==1) { if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1&&group.value==1) {
// let tmp = set_cache.value[0] == null ? tmpobjall.projectors[0].params : JSON.parse(set_cache.value[0]); let tmp = set_cache.value[0] == null ? tmpobjall.projectors[0].params : JSON.parse(set_cache.value[0]);
// let set_cache_tmp: any = [] let set_cache_tmp: any = []
// if (tmp[0].hasOwnProperty("power")) { if (tmp[0].hasOwnProperty("power")) {
// for (let index = 0; index < 4; index++) { for (let index = 0; index < 4; index++) {
// let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) } let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) }
// set_cache_tmp.push(tmpobj) set_cache_tmp.push(tmpobj)
// } }
// } else { } else {
// set_cache_tmp = tmp set_cache_tmp = tmp
// } }
// if (ste_status.value == 0) { if (ste_status.value == 0) {
// //set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference //set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference
// if (difference == -1) { if (difference == -1) {
// set_cache_tmp[2].isshow = array[1].isshow set_cache_tmp[2].isshow = array[1].isshow
// } else { } else {
// set_cache_tmp[2].value = difference set_cache_tmp[2].value = difference
// } }
// set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value)); set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value));
// set_cache.value[0] = JSON.stringify(set_cache_tmp); set_cache.value[0] = JSON.stringify(set_cache_tmp);
// } }
// } }
// } }
// watch(()=>auto_sync,()=>{
// console.log(auto_sync.value)
// set?.SetBlendingOption("fusion_with_automatic_sync", auto_sync.value?'1':'0');
// },{deep:true})
/** /**
* 平板弹窗修改 * 平板弹窗修改
*/ */
const ipad_chang = ref(false) const ipad_chang=ref(false)
/** /**
* 当前url路径 * 当前url路径
*/ */
@ -832,128 +634,22 @@ export default defineComponent({
/** /**
* 长按实现 * 长按实现
* 单击实现
*/ */
let loop: NodeJS.Timeout let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart = (fun: string) => { const handlerTouchstart = (fun: string) => {
loop_end = setTimeout(() => {
loop = setInterval(() => { loop = setInterval(() => {
if (fun == '+') { if (fun == '+') {
array[group.value].value += 2 array[group.value].value+=2
} else { } else {
array[group.value].value -= 2 array[group.value].value-=2
}
}, 30)
}, 100);
if (fun == '+') {
array[group.value].value += 2
} else {
array[group.value].value -= 2
} }
}, 15)
} }
const handlerTouchend = () => { const handlerTouchend = () => {
clearInterval(loop) clearInterval(loop)
clearTimeout(loop_end)
} }
const submit = () => {
set?.SetBlendingOption("blending_grids_background_color", color.value);
}
/**
* 处理平板模式下 伽马校正操作
*/
const ipad_chang_input = ref(false)
const now_apg = ref("");
let loop__apg: NodeJS.Timeout
let loop__apg_end: NodeJS.Timeout
const handlerTouchstart_apg = (fun: string) => {
loop__apg_end = setTimeout(() => {
loop__apg = setInterval(() => {
if (fun == '+') {
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] + 0.1)
} else {
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
}
}, 30)
}, 1000);
if (fun == '+') {
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] + 0.1)
} else {
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
}
}
const handlerTouchend_apg = () => {
clearTimeout(loop__apg_end)
clearInterval(loop__apg)
}
const toDecimal = (num: number): number => {
return Math.round(num * 100) / 100;
}
let loop_start: NodeJS.Timeout
let loop_finish: NodeJS.Timeout
const input_focus = ref([false, false, false, false,])
const mousedown = (fun: string, index: number) => {
loop_start = setTimeout(() => {
loop_finish = setInterval(() => {
if (fun == '+') {
array[index].value+=2
} else {
array[index].value-=2
}
}, 30)
}, 1000);
if (fun == '+') {
array[index].value+=2
} else {
array[index].value-=2
}
}
const mouseup = () => {
clearTimeout(loop_start)
clearInterval(loop_finish)
}
const input_focus_apg=ref([false,false,false,])
// const ["","","",""]
const options = [{
label: $t.t('up'),
value: 0
}, {
label: $t.t('left'),
value: 1
}, {
label: $t.t('right'),
value: 2
}, {
label: $t.t('down'),
value: 3
}, {
label: $t.t('down'),
value: 4
}]
return { return {
options,
input_focus_apg,
input_focus,
mousedown,
mouseup,
now_apg,
handlerTouchstart_apg,
handlerTouchend_apg,
ipad_chang_input,
send_auxiliary_line, send_auxiliary_line,
group, group,
array, array,
@ -970,10 +666,7 @@ export default defineComponent({
ipad_chang, ipad_chang,
url, url,
handlerTouchstart, handlerTouchstart,
handlerTouchend, handlerTouchend
ispad,
color,
submit
}; };
}, },
}); });

View File

@ -4,8 +4,8 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="row"> <div class="row">
<div class="col-4 col-sm-3"></div> <div class="col-4"></div>
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[0]" <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" @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)" :label="$t('wall row')" /> </div><q-checkbox @update:model-value="send_off(0)"
v-model="RowsColumns[0]" /> v-model="RowsColumns[0]" />
@ -13,8 +13,8 @@
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="row"> <div class="row">
<div class="col-4 col-sm-3"></div> <div class="col-4"></div>
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[1]" <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" @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)" :label="$t('wall col')" /> </div><q-checkbox @update:model-value="send_off(1)"
v-model="RowsColumns[1]" /> v-model="RowsColumns[1]" />
@ -22,16 +22,16 @@
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="row"> <div class="row">
<div class="col-4 col-sm-3"></div> <div class="col-4"></div>
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[2]" <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" @update:model-value="update_row_col(2, model[2])" :options="line_width_options" :dense="true" :options-dense="true"
:label="$t('line width')" /> </div> :label="$t('line width')" /> </div>
</div> </div>
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="row" style="min-height: 40px;"> <div class="row" style="min-height: 40px;">
<div class="col-4 col-sm-3"></div> <div class="col-4"></div>
<div class="col-4 col-sm-6 q-pt-sm"> <div class="col-4 q-pt-sm">
<q-item> <q-item>
<q-item-section avatar class="head_1"> <q-item-section avatar class="head_1">
{{ $t("line color") }} {{ $t("line color") }}
@ -51,11 +51,33 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="row" style="min-height: 40px;"> <div class="row" style="min-height: 40px;">
<div class="col-4 col-sm-3"></div> <div class="col-4"></div>
<div class="col-4 col-sm-6 q-pt-sm"> <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>
<q-item-section avatar class="head_1"> <q-item-section avatar class="head_1">
{{ $t("center circle color") }} {{ $t("center circle color") }}

View File

@ -16,8 +16,8 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="ispad"> <div>
<div class="row q-md-py-xl"> <div class="row row q-md-py-xl">
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-2 q-px-md"> <div class="col-2 q-px-md">
<div class="col-2"> <q-select class="q-pt-md" :label="$t('point amount')" <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> :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]" <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" 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 @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" />
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
</div> </div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]" <div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]" filled
filled type="number" class="q-pt-md" :dense="true" v-model="value[options_model].y" 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 @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" />
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
</div> </div>
<div class="q-pt-md col-2"> <div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" /> <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" <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> :label="$t('reset all') + value_point_amount + $t('point')" /></div>
</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>
</div>
<q-dialog v-model="del_dialog"> <q-dialog v-model="del_dialog">
<q-card style="width: 500px; max-width: 80vw;"> <q-card style="width: 500px; max-width: 80vw;">
<q-card-section> <q-card-section>
@ -163,33 +110,26 @@
<q-dialog v-model="ipad_chang"> <q-dialog v-model="ipad_chang">
<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('point') +(options_model+1 )}}</div> --> <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>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<div class="row"> <div class="row">
<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('y','+')" @touchend="handlerTouchend" /></div>
@touchstart="handlerTouchstart('y', '+')" @touchend="handlerTouchend" /></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" <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>
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_right" @touchstart="handlerTouchstart('x', '+')" @touchend="handlerTouchend" /></div>
</div> </div>
<div class="row"> <div class="row">
<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('y','-')" @touchend="handlerTouchend" /></div>
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y', '-')" @touchend="handlerTouchend" /></div>
</div> </div>
</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('close')" color="primary" @click="ipad_chang = false" /> <q-btn flat :label="$t('close')" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<style scoped> <style scoped>
@ -204,14 +144,6 @@
} }
</style> </style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts"> <script lang="ts">
import { import {
defineComponent, defineComponent,
@ -256,7 +188,7 @@ export default defineComponent({
/** /**
* 平板弹窗修改 * 平板弹窗修改
*/ */
const ipad_chang = ref(false) const ipad_chang=ref(false)
/** /**
* 当前url路径 * 当前url路径
*/ */
@ -375,8 +307,8 @@ export default defineComponent({
}, { 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
save_set_cache() save_set_cache()
}, { deep: true }) }, { deep: true })
@ -802,9 +734,7 @@ export default defineComponent({
* 长按实现 * 长按实现
*/ */
let loop: NodeJS.Timeout let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart = (type: string, fun: string) => { const handlerTouchstart = (type: string, fun: string) => {
loop_end = setTimeout(() => {
loop = setInterval(() => { loop = setInterval(() => {
if (type == 'x') { if (type == 'x') {
if (fun == '+') { if (fun == '+') {
@ -821,26 +751,9 @@ export default defineComponent({
} }
} }
chang(options_model.value, 0, '') chang(options_model.value, 0, '')
}, 30) }, 15)
}, 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 = () => { const handlerTouchend = () => {
clearTimeout(loop_end)
clearInterval(loop) clearInterval(loop)
} }
/** /**
@ -848,7 +761,7 @@ export default defineComponent({
*/ */
const keyDown = () => { const keyDown = () => {
document.onkeydown = (e) => { document.onkeydown = (e) => {
let lock = 0; let lock=0;
let e1 = e || window.event || arguments.callee.caller.arguments[0] let e1 = e || window.event || arguments.callee.caller.arguments[0]
switch (e.code) { switch (e.code) {
case "KeyW": case "KeyW":
@ -864,93 +777,16 @@ export default defineComponent({
value.value[options_model.value].x++ value.value[options_model.value].x++
break; break;
default: default:
lock = 1 lock=1
break; 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({ defineExpose({
options_model, options_model,
}); });
return { return {
input_x_focus,
input_y_focus,
ispad,
mousedown,
mouseup,
value_point_amount_tmp, value_point_amount_tmp,
details_selsect, details_selsect,
resetall_all, 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-form>
<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">
@ -18,9 +18,6 @@
</div> </div>
<q-space /> <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-btn size="sm" dense flat round icon="close" color="red" @click="clear()" v-close-popup>
<q-tooltip> <q-tooltip>
{{ $t("close") }} {{ $t("close") }}
@ -31,7 +28,7 @@
<q-separator /> <q-separator />
<!-- height: 80vh --> <!-- 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="row" style="border: 1px solid #b0bec5; text-align: center">
<div class="col-2" style="border-right: 1px solid #b0bec5"> <div class="col-2" style="border-right: 1px solid #b0bec5">
<p class="text-center">{{ $t("Projector") }}</p> <p class="text-center">{{ $t("Projector") }}</p>
@ -53,16 +50,11 @@
<div> <div>
<div class="col-3 q-px-md "> <q-select class="q-pt-md overflow-hidden" :label="$t('change resolution')" <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 @update:model-value="(val) => { dialog(val,set_resolution,'resolution') }" :dense="true" filled v-model="now_resolution"
v-model="now_resolution" :options="options_resolution" emit-value map-options /></div> :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 <div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('Change projector layout')"
@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"
@update:model-value="(val) => { dialog(val, send_projectorlayout, 'projector') }" :dense="true" filled :options="projectorlayout" emit-value map-options /></div>
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>
<div class="col-12" style="text-align: center"> <div class="col-12" style="text-align: center">
{{ {{
@ -88,20 +80,20 @@
<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')" />
<div class="q-space" data-v-39efcd1f=""></div> <div class="q-space" data-v-39efcd1f=""></div>
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary" <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 <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-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
</q-card-actions> </q-card-actions>
</q-form> </q-form>
@ -128,8 +120,8 @@
</q-select> </q-select>
</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')" color="primary" @click="medium = false"/> <q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
<q-btn flat :label="$t('save')" @click="saveconfig" color="primary" /> <q-btn flat :label="$t('save')" @click="saveconfig" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
@ -155,8 +147,8 @@
</q-select> </q-select>
</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')" color="primary" @click="select_configuration=false" /> <q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
<q-btn flat :label="$t('load')" @click="apply_the_selected_configuration" color="primary" /> <q-btn flat :label="$t('load')" @click="apply_the_selected_configuration" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
@ -170,8 +162,8 @@
{{ $t('Whether to delete') + name_to_be_deleted }} {{ $t('Whether to delete') + name_to_be_deleted }}
</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')" color="primary" @click="del_dialog=false" /> <q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
<q-btn flat :label="$t('ok')" @click="()=>{dialog_del_scenes();del_dialog=false}" color="primary" /> <q-btn flat :label="$t('ok')" @click="dialog_del_scenes" color="primary" v-close-popup />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
@ -183,29 +175,11 @@
<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">
{{ dialog_data.type == 'resolution' ? $t('Whether to modify the resolution to') + {{ 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 }}
options_resolution[dialog_data.parameter].label : $t('Whether to change the projector layout to') +
projectorlayout[dialog_data.parameter].label }}
</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=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();confirm=false}" color="primary" /> <q-btn flat :label="$t('ok')" @click="trigger_dialog" color="primary" v-close-popup />
</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-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
@ -232,7 +206,7 @@ import {
computed, computed,
onMounted, onMounted,
onBeforeMount, onBeforeMount,
provide, provide,
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useQuasar, copyToClipboard } from "quasar"; import { useQuasar, copyToClipboard } from "quasar";
@ -272,36 +246,29 @@ export default defineComponent({
const showDialog = async () => { const showDialog = async () => {
show_dialog.value = true; show_dialog.value = true;
}; };
/** const is_pad_style=computed(()=>{
* 当前平板是否全屏 let url=window.location.href
*/ if(url.indexOf("pad")!=-1&&$t.locale.value=="en-US"){
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") {
return "" return ""
} }
if (url.indexOf("pad") != -1 && is_pad_screen.value) {
return "100vw"
}
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){
for (let index = 0; index < allconfig.resolution.length; index++) { for (let index = 0; index < allconfig.resolution.length; index++) {
tmp.push({ tmp.push({
label: `${allconfig.resolution[index].width}*${allconfig.resolution[index].height}`, label: `${allconfig.resolution[index].width}*${allconfig.resolution[index].height}`,
@ -311,7 +278,7 @@ export default defineComponent({
} }
return tmp return tmp
}) })
const child: any = ref(null); const child :any = ref(null);
/** /**
* 开启网格时发送全部参数 * 开启网格时发送全部参数
* *
@ -329,9 +296,9 @@ export default defineComponent({
tmp = '9' tmp = '9'
break; break;
case 'DensityCorrection': case 'DensityCorrection':
if (child.value!.now_v_h == 'vertical') { if(child.value!.now_v_h=='vertical'){
tmp = 'ver_density' tmp = 'ver_density'
} else { }else{
tmp = 'hor_density' tmp = 'hor_density'
} }
@ -348,18 +315,18 @@ export default defineComponent({
break; break;
case 'FourPointCalibration': case 'FourPointCalibration':
set?.SetBlendingOption("blending_grids_select_point", `4:${child.value!.options_model + 1}`) set?.SetBlendingOption("blending_grids_select_point", `4:${child.value!.options_model+1}`)
break; break;
case 'SurfaceCorrection': case 'SurfaceCorrection':
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model + 1}`) set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`)
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`) set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
break; break;
case 'DensityCorrection': case 'DensityCorrection':
if (child.value!.now_v_h == 'vertical') { if(child.value!.now_v_h=='vertical'){
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_v + 1}`) 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}`) set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_v_point_amount}`)
} else { }else{
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.options_model_h + 1}`) 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}`) set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_h_point_amount}`)
} }
break; break;
@ -371,7 +338,7 @@ export default defineComponent({
/** /**
* 重置全部参数 * 重置全部参数
*/ */
const tmp_options = ref("") const tmp_options=ref("")
const resetall = () => { const resetall = () => {
set?.ResetBlendingConfig().then((res) => { set?.ResetBlendingConfig().then((res) => {
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");
@ -381,7 +348,7 @@ export default defineComponent({
config.value.row = tmp.row; config.value.row = tmp.row;
$store.commit("setfusion_configuration", res?.config); $store.commit("setfusion_configuration", res?.config);
}); });
if (options.value.length != 0) { if(options.value.length!=0){
tmp_options.value = options.value tmp_options.value = 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_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(false);
const medium = ref(false); const medium = ref(false);
const options = computed({ const options = computed({
get() { get() {
@ -437,13 +404,13 @@ export default defineComponent({
* 设置分辨率 * 设置分辨率
* @param index 索引号 * @param index 索引号
*/ */
const set_resolution = (index: number) => { const set_resolution=(index:number)=>{
$q.loading.show({ $q.loading.show({
message: 'Loading please wait' message: 'Loading please wait'
}) })
let w = allconfig.resolution[index].width let w =allconfig.resolution[index].width
let h = allconfig.resolution[index].height let h =allconfig.resolution[index].height
set?.SetProjectorResolution(w, h).then((res) => { set?.SetProjectorResolution(w,h).then((res)=>{
$store.commit("setfusion_configuration", res?.config); $store.commit("setfusion_configuration", res?.config);
}) })
let tmp = options.value let tmp = options.value
@ -500,7 +467,7 @@ export default defineComponent({
const save = () => { const save = () => {
medium.value = true medium.value = true
save_cover_name.value = '' save_cover_name.value=''
// //
get_scenes() get_scenes()
}; };
@ -518,11 +485,9 @@ export default defineComponent({
}; };
const clear = () => { const clear = () => {
record_times.value = 0 record_times.value = 0
// show_blending_grids.value = false; show_blending_grids.value = false;
is_pad_screen.value = false
send_show_blending_grids(); send_show_blending_grids();
$store.commit("setSelectedProjector", "0/0"); $store.commit("setSelectedProjector", "0/0");
set?.SetBlendingOption("blending_grids_show", "0");
setTimeout(() => { setTimeout(() => {
clear_sessionStorage() clear_sessionStorage()
}, 500); }, 500);
@ -532,7 +497,7 @@ export default defineComponent({
} else { } else {
optionsstr.value = "FourPointCalibration"; optionsstr.value = "FourPointCalibration";
} }
now_selsect_projector.value = "0-0" now_selsect_projector.value="0-0"
}; };
/** /**
@ -552,7 +517,7 @@ export default defineComponent({
setTimeout(() => { setTimeout(() => {
set?.GetBlendingConfig("").then((res) => { set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");
config_projectors.value = tmp config_projectors.value=tmp
let local_options = [ let local_options = [
[disable_blending_params_id, disable_blending_params], [disable_blending_params_id, disable_blending_params],
[show_blending_grids_id, show_blending_grids] [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); local_opt[1].value = ("0" == opt || "false" == opt.toLowerCase() ? false : true);
} }
} }
show_blending_grids.value = true
EnableBlending.value = tmp.enable; EnableBlending.value = tmp.enable;
$store.commit("setEnablefusion", tmp.enable); $store.commit("setEnablefusion", tmp.enable);
config.value.col = tmp.col; config.value.col = tmp.col;
@ -573,50 +537,41 @@ 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){
now_resolution.value = index now_resolution.value=index
} }
} }
} else { }else{
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 for (let index = 0; index < tmp.max_projector_count; index++) {
for (let index = 1; index <= tmp.max_projector_count; index++) { for (let indexx = 0; indexx < tmp.max_projector_count; indexx++) {
for (let indexx = 1; indexx <= tmp.max_projector_count; indexx++) { if(index*tmp.max_projector_count+indexx>tmp.max_projector_count){
if (index * indexx > tmp.max_projector_count) {
continue continue
} else { }else{
projectorlayout.value.push({ label: `${index}x${indexx}`, value: cont }) projectorlayout.value.push({ label: `${index+1}x${indexx+1}`, value: index*tmp.max_projector_count+indexx })
cont++
projectorlayout_tmp.value.push(`${index}x${indexx}`)
} }
} }
} }
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])){
now_select_projectorlayout.value = index now_select_projectorlayout.value=index
}
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
} }
} }
}); });
get_scenes() get_scenes()
set?.SetBlendingOption("blending_grids_select_ui", "blending") 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 save_cover_name = ref("")
const plan_list = [ const plan_list = [
'' ''
@ -635,20 +590,16 @@ export default defineComponent({
allconfig = tmp allconfig = tmp
for (let index = 0; index < options_resolution.value.length; index++) { for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*'); let arr = options_resolution.value[index].label.split('*');
if (tmp.projector_width == Number(arr[1]) && tmp.projector_height == Number(arr[0])) { if(tmp.projector_width==Number(arr[1])&&tmp.projector_height==Number(arr[0])){
now_resolution.value = index now_resolution.value=index
} }
} }
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.row == Number(arr[1]) && tmp.col == Number(arr[0])) { if(tmp.row==Number(arr[1])&&tmp.col==Number(arr[0])){
now_select_projectorlayout.value = index now_select_projectorlayout.value=index
}
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
} }
} }
select_configuration.value=false
}); });
let tmp = options.value let tmp = options.value
@ -675,7 +626,6 @@ export default defineComponent({
const saveconfig = () => { const saveconfig = () => {
set?.SaveBlendingConfig(save_cover_name.value); set?.SaveBlendingConfig(save_cover_name.value);
medium.value = false
} }
const isdebug = computed(() => { const isdebug = computed(() => {
@ -694,28 +644,26 @@ export default defineComponent({
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)
name_to_be_deleted.value = '' name_to_be_deleted.value=''
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")
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
} }
/** /**
* 依赖注入 * 依赖注入
*/ */
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[]>[]) const now_select_projectorlayout=ref(1)
const now_select_projectorlayout = ref(0) const send_projectorlayout=(val:number) => {
const now_select_projectorlayout_tmp = ref("")
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 => {
let tmpp = JSON.parse(res!.config) let tmpp=JSON.parse(res!.config)
config.value.row = tmpp.row; config.value.row = tmpp.row;
config.value.col = tmpp.col; config.value.col = tmpp.col;
$q.loading.show({ $q.loading.show({
@ -724,42 +672,8 @@ export default defineComponent({
$store.commit("setfusion_configuration", res?.config); $store.commit("setfusion_configuration", res?.config);
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 (tmpp.col == Number(arr[1]) && tmpp.row == Number(arr[0])) { if(tmpp.col==Number(arr[1])&&tmpp.row==Number(arr[0])){
now_select_projectorlayout.value = index 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()
})
}
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 let tmp = options.value
@ -775,126 +689,58 @@ export default defineComponent({
} }
const btn_options = computed(() => { const btn_options = computed(() => {
let tmp = [] let tmp=[]
tmp.push({ label: $t.t('FourPointCalibration'), value: 'FourPointCalibration' }) tmp.push({label: $t.t('FourPointCalibration'), value: 'FourPointCalibration'})
tmp.push({ label: $t.t('SurfaceCorrection'), value: 'SurfaceCorrection', }) tmp.push({label: $t.t('SurfaceCorrection'),value: 'SurfaceCorrection',})
if (now_select_projectorlayout.value != 0) { if(now_select_projectorlayout.value!=0){
tmp.push({ label: $t.t('FusionLocale'), value: 'FusionLocale' }) tmp.push({ label: $t.t('FusionLocale'), value: 'FusionLocale' })
} else { }else{
optionsstr.value = "FourPointCalibration"; 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' }) tmp.push({ label: $t.t('GridSettings'), value: 'GridSettings' })
return tmp return tmp
}) })
/** /**
* 计算可以显示的投影机数量 * 计算可以显示的投影机数量
*/ */
const projectors_that_can_display = computed(() => { const projectors_that_can_display=computed(()=>{
let allconfig = JSON.parse($store.state.fusion_configuration); let allconfig = JSON.parse($store.state.fusion_configuration);
let col = allconfig.projectors.length let col = allconfig.projectors.length
return { col } return {col}
}) })
/** /**
* 弹窗 * 弹窗
* 浅拷贝 * 浅拷贝
*/ */
const confirm = ref(false) const confirm=ref(false)
let dialog_data: any = { parameter: "", fun: "", type: "" } let dialog_data:any={parameter:"",fun:"",type:""}
const dialog = (parameter: any, fun: any, type: string) => { const dialog=(parameter:any,fun:any,type:string)=>{
confirm.value = true confirm.value=true
dialog_data.parameter = parameter dialog_data.parameter=parameter
dialog_data.fun = fun dialog_data.fun=fun
dialog_data.type = type dialog_data.type=type
} }
const trigger_dialog = () => { const trigger_dialog=()=>{
dialog_data.fun(dialog_data.parameter) dialog_data.fun(dialog_data.parameter)
} }
const re_match_data=()=>{
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 = () => {
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++) {
let arr = options_resolution.value[index].label.split('*'); let arr = options_resolution.value[index].label.split('*');
if (tmp.projector_width == Number(arr[0]) && tmp.projector_height == Number(arr[1])) { if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){
now_resolution.value = index now_resolution.value=index
} }
} }
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.row == Number(arr[0]) && tmp.col == Number(arr[1])) { if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){
now_select_projectorlayout.value = index now_select_projectorlayout.value=index
}
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
now_select_projectorlayout_tmp.value=projectorlayout_tmp.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
}
}
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 { return {
now_select_projectorlayout_tmp,
show_projectorlayout2,
filterFn_projector2,
is_pad_screen,
dialog_data, dialog_data,
allconfig, allconfig,
now_selsect_projector, now_selsect_projector,
@ -939,21 +785,11 @@ export default defineComponent({
now_resolution, now_resolution,
set_resolution, set_resolution,
send_projectorlayout, send_projectorlayout,
send_projectorlayout2,
now_select_projectorlayout, now_select_projectorlayout,
projectorlayout, projectorlayout,
btn_options, btn_options,
projectors_that_can_display, projectors_that_can_display,
is_pad_style, is_pad_style
element,
element_full_screen,
ispad,
filterFn_projector,
show_projectorlayout,
confirm_projectorlayout,
dialog_data_projectorlayout,
dialog_projectorlayout,
trigger_dialog_projectorlayout
}; };
}, },
}); });

View File

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

View File

@ -417,7 +417,7 @@ export default {
FourPointCalibration: "Four Pint Calibration", FourPointCalibration: "Four Pint Calibration",
SurfaceCorrection: "Surface Correction", SurfaceCorrection: "Surface Correction",
DensityCorrection: "Density Correction", DensityCorrection: "Density Correction",
GridSettings: "Auxiliary Settings", GridSettings: "Grid Settings",
point: "dot", point: "dot",
reset: "reset", reset: "reset",
"upper fusion zone parameters": "Upper Fusion Zone Parameters", "upper fusion zone parameters": "Upper Fusion Zone Parameters",
@ -509,9 +509,5 @@ export default {
"Whether to change the projector layout to", "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)":
"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", "fusion zone":"fusion zone"
"up":"up",
"left":"left",
"right":"right",
"down":"down"
}; };

View File

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

View File

@ -314,10 +314,6 @@ export default defineComponent({
} }
); );
const getconfig = () => { 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 { try {
set?.GetBlendingConfig("").then((res) => { set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");

View File

@ -653,10 +653,6 @@ export default defineComponent({
return "rotate " + sulv + "s linear infinite"; return "rotate " + sulv + "s linear infinite";
}); });
const getconfig = () => { 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 { try {
set?.GetBlendingConfig("").then((res) => {}); set?.GetBlendingConfig("").then((res) => {});
set?.GetBlendingConfig("").then((res) => { set?.GetBlendingConfig("").then((res) => {