放开是否禁用融合参数 显示网格 修改箭头大小 为平板增加融合带伽马值操作适配

This commit is contained in:
shefengchun 2023-03-14 10:13:23 +08:00
parent 6bfdb69fd8
commit eed5964f02
5 changed files with 468 additions and 168 deletions

View File

@ -157,10 +157,10 @@
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>
<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> -->
</template>
</q-input>
</div>
<div class="q-pt-md ">
@ -196,10 +196,10 @@
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>
<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> -->
</template>
</q-input>
</div>
<div class="q-pt-md ">
@ -318,6 +318,14 @@
}
</style>
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">
import {

View File

@ -51,19 +51,19 @@
<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>
<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> -->
</template>
</q-input>
</div>
<div class="q-px-md" @mousewheel="details_selsect_val($event,'y')"> <q-input filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].y" @focus="input_y_focus=true" @blur="input_y_focus=false" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="y"
lazy-rules >
<!-- <template v-if="input_y_focus" v-slot:append>
<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> -->
</template>
</q-input>
</div>
<div class="q-pt-md">
@ -123,7 +123,14 @@
}
</style>
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">

View File

@ -8,18 +8,36 @@
<div class="col-4 offset-4">
<div class="row">
<div class="col-3">
<q-toggle class="float-right" v-model="array[0].isshow" label="" />
<q-toggle class="float-right" v-model="array[0].isshow" label="" />
</div>
<div class="col-6">
<q-input dense filled type="number" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''"
@focus="group = 0" v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=0}" :readonly="url.indexOf('pad')!=-1"
:rules="[
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 0"
:bg-color="group == 0 ? 'cyan-1' : ''" @focus="group = 0" 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" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(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>
@ -33,15 +51,33 @@
<q-toggle class="float-right" @click="group = 1" v-model="array[1].isshow" label="" />
</div>
<div class="col-6">
<q-input dense filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''"
@focus="group = 1" v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=1}" :readonly="url.indexOf('pad')!=-1"
:rules="[
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 1"
:bg-color="group == 1 ? 'cyan-1' : ''" @focus="group = 1" 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" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(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>
@ -51,18 +87,36 @@
<q-toggle class="float-right" @click="group = 2" v-model="array[2].isshow" label="" />
</div>
<div class="col-6">
<q-input dense filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''"
@focus="group = 2" v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=2}" :readonly="url.indexOf('pad')!=-1"
:rules="[
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 2"
:bg-color="group == 2 ? 'cyan-1' : ''" @focus="group = 2" 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" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(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 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>
@ -75,15 +129,33 @@
<q-toggle class="float-right" v-model="array[3].isshow" label="" />
</div>
<div class="col-6">
<q-input dense filled type="number" :autofocus="group == 3" :bg-color="group == 3 ? 'cyan-1' : ''"
@focus="group = 3" v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:'';group=3}" :readonly="url.indexOf('pad')!=-1"
:rules="[
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 3"
:bg-color="group == 3 ? 'cyan-1' : ''" @focus="group = 3" 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" :rules="[
(val) =>
(val !== null && val !== '') ||
$t('Please enter a number'),
(val) =>
(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>
@ -91,20 +163,38 @@
</div>
</div>
</div>
<div class="col-12" v-if="group != 4">
<div class="col-12" v-show="group != 4 || ispad">
<p class="text-center" style="margin: 0 0 8;">{{ $t("Set Fusion Band Parameters") }}</p>
<div style="display: flex; justify-content: space-evenly">
<div>
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
vertical reverse label-always />
<div> <q-input dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
@update:model-value="chang('alpha')" v-model="array[group].alpha" lazy-rules :rules="[
<q-slider v-model="array[group].alpha" v-show="!ispad" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01"
color="green" vertical reverse label-always />
<div> <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"
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'),
]" />
<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>
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('alpha')" text-color="black"
:label="$t('reset')" />
@ -112,16 +202,32 @@
</div>
<div>
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="16" :step="0.01" color="green" vertical
reverse label-always />
<div> <q-input dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
@update:model-value="chang('p')" v-model="array[group].p" lazy-rules :rules="[
<q-slider v-model="array[group].p" v-show="!ispad" :min="0" @change="chang('p')" :max="16" :step="0.01"
color="green" vertical reverse label-always />
<div> <q-input v-show="ispad" 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 : '' }"
: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'),
]" />
<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>
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('p')" text-color="black"
:label="$t('reset')" />
@ -129,17 +235,34 @@
</div>
<div>
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="16" :step="0.01" color="green"
vertical reverse label-always />
<q-slider v-model="array[group].gamma" v-show="!ispad" :min="0" @change="chang('gamma')" :max="16" :step="0.01"
color="green" vertical reverse label-always />
<div>
<q-input :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
@update:model-value="chang('gamma')" v-model="array[group].gamma" lazy-rules :rules="[
<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')"
@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'),
]" />
<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>
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('gamma')" text-color="black"
:label="$t('reset')" />
@ -147,8 +270,7 @@
</div>
</div>
</div>
</div>
<div class="col-12">
<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">
@ -171,31 +293,65 @@
</div>
</div>
</div>
</div>
<div style="position: absolute;bottom: 0;">
<q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt)=>{send_auxiliary_line(value)}"
<q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt) => { send_auxiliary_line(value) }"
:label="$t('auxiliary lines')" />
</div>
<q-dialog v-model="ipad_chang">
<q-dialog v-model="ipad_chang" ref="ipadref">
<q-card style="width: 40vw; max-width: 80vw;">
<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 class="q-pt-none">
<div class="q-mb-md" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up" @touchstart="handlerTouchstart('+')" @touchend="handlerTouchend" /></div>
<div class="q-mt-md" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_down" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div>
<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('+')" @touchend="handlerTouchend" /></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('-')" @touchend="handlerTouchend" /></div>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang=false" />
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang = false" />
</q-card-actions>
</q-card>
</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> -->
<div class="row">
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone') + ` ${now_apg}`" :dense="true" filled v-model="group"
@update:model-value="(val) => { group = val }" :options="options" emit-value map-options /></div>
</div>
</q-card-section>
<q-card-section 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>
<style>
@ -214,6 +370,14 @@
p {
margin: 0;
}
</style>
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">
@ -227,7 +391,7 @@ import {
onBeforeUnmount,
reactive,
onMounted,
toRefs,
toRefs,
} from "vue";
import { useStore } from "src/store";
import { useI18n } from "vue-i18n";
@ -239,7 +403,7 @@ export default defineComponent({
let set = GlobalData.getInstance().getCurrentClient();
let $store = useStore();
let $t = useI18n();
const group = ref(4);
const group = ref(2);
const set_cache: any = ref([]);
const enablefusion = ref(false);
let array: any = reactive([
@ -263,6 +427,11 @@ export default defineComponent({
$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) => {
switch (type) {
case 'gamma':
@ -307,26 +476,30 @@ export default defineComponent({
watch(
() => configselsect,
(newVal, oldVal) => {
let tmp = JSON.parse($store.state.fusion_configuration);
let fortmp = null;
let i;
for (i of tmp.projectors) {
if (
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
) {
fortmp = JSON.parse(JSON.stringify(i));
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");
// let tmp = JSON.parse($store.state.fusion_configuration);
let fortmp = null;
let i;
for (i of tmp.projectors) {
if (
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
) {
fortmp = JSON.parse(JSON.stringify(i));
}
}
}
ste_status.value = 1;
ste_status.value = 1;
config = JSON.parse(JSON.stringify(fortmp));
use_server_config();
// use_set_cache();
setTimeout(() => {
ste_status.value = 0;
}, 100);
setnowindex();
});
config = JSON.parse(JSON.stringify(fortmp));
use_server_config();
use_set_cache();
setTimeout(() => {
ste_status.value = 0;
}, 100);
setnowindex();
},
{ deep: true }
);
@ -363,6 +536,9 @@ export default defineComponent({
save_set_cache();
};
//
/**
* 初始化数据时 自动获取焦点 的判断
*/
const setnowindex = () => {
let sum = 0;
let indexx = 4;
@ -415,7 +591,7 @@ export default defineComponent({
array[arr[index]].value = Number(config.params[index].size);
}
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);
use_set_cache();
setnowindex();
@ -434,17 +610,18 @@ export default defineComponent({
let tmp = JSON.parse(res ? res.config : "");
config = tmp.projectors[selectedprojector.value];
ste_status.value = 1;
startconfig();
color.value = tmp.blending_grids_background_color ?? "#7f7f7f"
// console.log(tmp.blending_grids_background_color )
startconfig();
setTimeout(() => {
ste_status.value = 0;
}, 100);
ste_status.value = 0;
}, 100);
})
if(sessionStorage.FusionLocale_async)auto_sync.value=sessionStorage.FusionLocale_async=='true'
if (sessionStorage.FusionLocale_async) auto_sync.value = sessionStorage.FusionLocale_async == 'true'
}),
onBeforeUnmount(() => {
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
sessionStorage.FusionLocale_async=auto_sync.value
sessionStorage.FusionLocale_async = auto_sync.value
});
watch(
@ -456,8 +633,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
1,
array[0].isshow,
Number(array[0].value),
auto_sync.value
Number(array[0].value), auto_sync.value
);
save_set_cache();
@ -473,14 +649,13 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
0,
array[1].isshow,
Number(array[1].value),
auto_sync.value
Number(array[1].value), auto_sync.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[1].value=Number(array[1].value)+1:''
Number(newVal) % 2 != 0 ? array[1].value = Number(array[1].value) + 1 : ''
save_set_cache();
},
{ deep: true }
@ -494,11 +669,10 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
2,
array[2].isshow,
Number(array[2].value),
auto_sync.value
Number(array[2].value), auto_sync.value
);
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:''
// 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 : ''
save_set_cache();
},
{ deep: true }
@ -512,8 +686,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
3,
array[3].isshow,
Number(array[3].value),
auto_sync.value
Number(array[3].value), auto_sync.value
);
save_set_cache();
},
@ -530,8 +703,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
1,
array[0].isshow,
Number(array[0].value),
auto_sync.value
Number(array[0].value), auto_sync.value
);
save_set_cache();
},
@ -546,10 +718,9 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
0,
array[1].isshow,
Number(array[1].value),
auto_sync.value
Number(array[1].value), auto_sync.value
);
if (auto_sync.value) left_right_auto_add(-1);
// if (auto_sync.value) left_right_auto_add(-1);
save_set_cache();
},
{ deep: true }
@ -563,10 +734,9 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
2,
array[2].isshow,
Number(array[2].value),
auto_sync.value
Number(array[2].value), auto_sync.value
);
if (auto_sync.value) left_right_auto_add(-1);
// if (auto_sync.value) left_right_auto_add(-1);
save_set_cache();
},
{ deep: true }
@ -580,8 +750,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1],
3,
array[3].isshow,
Number(array[3].value),
auto_sync.value
Number(array[3].value), auto_sync.value
);
save_set_cache();
},
@ -600,61 +769,68 @@ export default defineComponent({
const changenablefusion = () => {
$store.commit("setenablefusion", enablefusion.value);
};
const left_right_auto_add = (difference: number) => {
let tmpobjall = JSON.parse($store.state.fusion_configuration)
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 set_cache_tmp: any = []
if (tmp[1].hasOwnProperty("power")) {
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) }
set_cache_tmp.push(tmpobj)
}
} else {
set_cache_tmp = tmp
}
if (ste_status.value == 0) {
if (difference == -1) {
set_cache_tmp[1].isshow = array[2].isshow
} else {
set_cache_tmp[1].value = difference
}
set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value),
auto_sync.value);
set_cache.value[1] = JSON.stringify(set_cache_tmp);
}
}
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1&&group.value==1) {
/**
* 利用缓存手动同步
*/
// const left_right_auto_add = (difference: number) => {
// let tmpobjall = JSON.parse($store.state.fusion_configuration)
// 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 set_cache_tmp: any = []
// if (tmp[1].hasOwnProperty("power")) {
// 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) }
// set_cache_tmp.push(tmpobj)
// }
// } else {
// set_cache_tmp = tmp
// }
// if (ste_status.value == 0) {
// if (difference == -1) {
// set_cache_tmp[1].isshow = array[2].isshow
// } else {
// set_cache_tmp[1].value = difference
// }
// 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);
// }
// }
// 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 set_cache_tmp: any = []
if (tmp[0].hasOwnProperty("power")) {
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) }
set_cache_tmp.push(tmpobj)
}
} else {
set_cache_tmp = tmp
}
if (ste_status.value == 0) {
//set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference
// let tmp = set_cache.value[0] == null ? tmpobjall.projectors[0].params : JSON.parse(set_cache.value[0]);
// let set_cache_tmp: any = []
// if (tmp[0].hasOwnProperty("power")) {
// 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) }
// set_cache_tmp.push(tmpobj)
// }
// } else {
// set_cache_tmp = tmp
// }
// if (ste_status.value == 0) {
// //set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference
if (difference == -1) {
set_cache_tmp[2].isshow = array[1].isshow
} else {
set_cache_tmp[2].value = difference
}
set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value),
auto_sync.value);
set_cache.value[0] = JSON.stringify(set_cache_tmp);
}
}
}
// if (difference == -1) {
// set_cache_tmp[2].isshow = array[1].isshow
// } else {
// set_cache_tmp[2].value = difference
// }
// 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);
// }
// }
// }
// 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路径
*/
@ -663,39 +839,132 @@ export default defineComponent({
/**
* 长按实现
* 单击实现
*/
let loop: NodeJS.Timeout
let loop_end: NodeJS.Timeout
const handlerTouchstart = (fun: string) => {
loop = setInterval(() => {
loop_end = setTimeout(() => {
loop = setInterval(() => {
if (fun == '+') {
array[group.value].value+=2
array[group.value].value += 2
} else {
array[group.value].value-=2
array[group.value].value -= 2
}
}, 15)
}, 30)
}, 100);
if (fun == '+') {
array[group.value].value += 2
} else {
array[group.value].value -= 2
}
}
const handlerTouchend = () => {
clearInterval(loop)
clearTimeout(loop_end)
}
const color = ref("#ffffff");
const ispad = computed(() => {
let url = window.location.href;
return url.indexOf("pad") != -1
})
const submit = () => {
set?.SetBlendingOption("blending_grids_background_color", color.value);
}
/**
* 处理平板模式下 伽马校正操作
* 手写实现pad长按点击
*/
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
}]
return {
submit,
color,
ispad,
options,
input_focus_apg,
input_focus,
mousedown,
mouseup,
now_apg,
handlerTouchstart_apg,
handlerTouchend_apg,
ipad_chang_input,
send_auxiliary_line,
group,
array,
chang,
enablefusion,
changenablefusion,
// changenablefusion,
selectedprojector,
set_cache,
auxiliary_line,
@ -706,7 +975,10 @@ export default defineComponent({
ipad_chang,
url,
handlerTouchstart,
handlerTouchend
handlerTouchend,
ispad,
color,
submit
};
},
});

View File

@ -89,10 +89,10 @@
@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>
<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> -->
</template>
</q-input>
</div>
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]" filled
@ -100,10 +100,10 @@
@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>
<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> -->
</template>
</q-input>
</div>
<div class="q-pt-md ">
@ -204,6 +204,14 @@
}
</style>
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">

View File

@ -88,12 +88,12 @@
<q-separator />
<q-card-actions align="right">
<!-- <span>{{ $t("disable blending params") }}</span>
<span>{{ $t("disable blending params") }}</span>
<q-checkbox style="justify-content: flex-start" v-model="disable_blending_params"
@click="send_disable_blending_params" />
<span>{{ $t("show blending grids") }}</span>
<q-checkbox style="justify-content: flex-start" v-model="show_blending_grids"
@click="send_show_blending_grids" /> -->
@click="send_show_blending_grids" />
<div class="q-space" data-v-39efcd1f=""></div>
<div class="q-space" data-v-39efcd1f=""></div>
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
@ -832,7 +832,9 @@ export default defineComponent({
/**
* select 组件选中就触发修改 这里是通过再次获取数据判断 显示在页面
*/
const re_match_data = () => {
let tmp = JSON.parse($store.state.fusion_configuration);
for (let index = 0; index < options_resolution.value.length; index++) {
@ -853,6 +855,9 @@ export default defineComponent({
}
}
const element: any = ref()
/**
* 手动全屏指定元素
*/
const element_full_screen = () => {
let elem = document.getElementById("element")
if (!document.fullscreenElement) {