修复融合界面切换时数据不改变

This commit is contained in:
shefengchun 2023-01-13 11:07:58 +08:00
parent ff63d3dc67
commit b982b66a31
6 changed files with 68 additions and 71 deletions

View File

@ -7,43 +7,43 @@
<div style="position:absolute;"> <div style="position:absolute;">
<vue3ResizeDrag :isActive="isactivearray[0]" v-if="isshowarray[0]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[0]" v-if="isshowarray[0]" :w="30" :h="20"
:x="point_postion[0].x" :y="point_postion[0].y" @mousedown="isactivearray[0] = true" :x="point_postion[0].x" :y="point_postion[0].y" @mousedown="isactivearray[0] = true"
:isResizable="false" @moveHandler="moveHandler($event, 0)"><span>{{ $t('point') }}1</span> :isResizable="false" @moveHandler="moveHandler($event, 0)"><span>v1</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[1]" v-if="isshowarray[1]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[1]" v-if="isshowarray[1]" :w="30" :h="20"
:x="point_postion[1].x" :y="point_postion[1].y" @mousedown="isactivearray[1] = true" :x="point_postion[1].x" :y="point_postion[1].y" @mousedown="isactivearray[1] = true"
:isResizable="false" @moveHandler="moveHandler($event, 1)"><span>{{ $t('point') }}2</span> :isResizable="false" @moveHandler="moveHandler($event, 1)"><span>v2</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[2]" v-if="isshowarray[2]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[2]" v-if="isshowarray[2]" :w="30" :h="20"
:x="point_postion[2].x" :y="point_postion[2].y" @mousedown="isactivearray[2] = true" :x="point_postion[2].x" :y="point_postion[2].y" @mousedown="isactivearray[2] = true"
:isResizable="false" @moveHandler="moveHandler($event, 2)"><span>{{ $t('point') }}3</span> :isResizable="false" @moveHandler="moveHandler($event, 2)"><span>v3</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[3]" v-if="isshowarray[3]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[3]" v-if="isshowarray[3]" :w="30" :h="20"
:x="point_postion[3].x" :y="point_postion[3].y" @mousedown="isactivearray[3] = true" :x="point_postion[3].x" :y="point_postion[3].y" @mousedown="isactivearray[3] = true"
:isResizable="false" @moveHandler="moveHandler($event, 3)"><span>{{ $t('point') }}4</span> :isResizable="false" @moveHandler="moveHandler($event, 3)"><span>v4</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[4]" v-if="isshowarray[4]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[4]" v-if="isshowarray[4]" :w="30" :h="20"
:x="point_postion[4].x" :y="point_postion[4].y" @mousedown="isactivearray[4] = true" :x="point_postion[4].x" :y="point_postion[4].y" @mousedown="isactivearray[4] = true"
:isResizable="false" @moveHandler="moveHandler($event, 4)"><span>{{ $t('point') }}5</span> :isResizable="false" @moveHandler="moveHandler($event, 4)"><span>v5</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[5]" v-if="isshowarray[5]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[5]" v-if="isshowarray[5]" :w="30" :h="20"
:x="point_postion[5].x" :y="point_postion[5].y" @mousedown="isactivearray[5] = true" :x="point_postion[5].x" :y="point_postion[5].y" @mousedown="isactivearray[5] = true"
:isResizable="false" @moveHandler="moveHandler($event, 5)"><span>{{ $t('point') }}6</span> :isResizable="false" @moveHandler="moveHandler($event, 5)"><span>h6</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[6]" v-if="isshowarray[6]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[6]" v-if="isshowarray[6]" :w="30" :h="20"
:x="point_postion[6].x" :y="point_postion[6].y" @mousedown="isactivearray[6] = true" :x="point_postion[6].x" :y="point_postion[6].y" @mousedown="isactivearray[6] = true"
:isResizable="false" @moveHandler="moveHandler($event, 6)"><span>{{ $t('point') }}7</span> :isResizable="false" @moveHandler="moveHandler($event, 6)"><span>h7</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[7]" v-if="isshowarray[7]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[7]" v-if="isshowarray[7]" :w="30" :h="20"
:x="point_postion[7].x" :y="point_postion[7].y" @mousedown="isactivearray[7] = true" :x="point_postion[7].x" :y="point_postion[7].y" @mousedown="isactivearray[7] = true"
:isResizable="false" @moveHandler="moveHandler($event, 7)"><span>{{ $t('point') }}8</span> :isResizable="false" @moveHandler="moveHandler($event, 7)"><span>h8</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[8]" v-if="isshowarray[8]" :w="30" :h="20" <vue3ResizeDrag :isActive="isactivearray[8]" v-if="isshowarray[8]" :w="30" :h="20"
:x="point_postion[8].x" :y="point_postion[8].y" @mousedown="isactivearray[8] = true" :x="point_postion[8].x" :y="point_postion[8].y" @mousedown="isactivearray[8] = true"
:isResizable="false" @moveHandler="moveHandler($event, 8)"><span>{{ $t('point') }}9</span> :isResizable="false" @moveHandler="moveHandler($event, 8)"><span>h9</span>
</vue3ResizeDrag> </vue3ResizeDrag>
<vue3ResizeDrag :isActive="isactivearray[9]" v-if="isshowarray[9]" :w="35" :h="20" <vue3ResizeDrag :isActive="isactivearray[9]" v-if="isshowarray[9]" :w="35" :h="20"
:x="point_postion[9].x" :y="point_postion[9].y" @mousedown="isactivearray[9] = true" :x="point_postion[9].x" :y="point_postion[9].y" @mousedown="isactivearray[9] = true"
:isResizable="false" @moveHandler="moveHandler($event, 9)"><span>{{ $t('point') }}10</span> :isResizable="false" @moveHandler="moveHandler($event, 9)"><span>h10</span>
</vue3ResizeDrag> </vue3ResizeDrag>
</div> </div>
@ -56,7 +56,7 @@
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-8"><q-input @focus="isactivearray[0] = false" filled type="number" <div class="col-8"><q-input @focus="isactivearray[0] = false" filled type="number"
class="q-pt-md" :dense="true" v-model="value[0].y" label="y" lazy-rules /> class="q-pt-md" :dense="true" v-model="value[0].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset')+' v1'" />
</div> </div>
</div> </div>
</div> </div>
@ -65,7 +65,7 @@
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-8"><q-input @focus="isactivearray[1] = false" filled type="number" <div class="col-8"><q-input @focus="isactivearray[1] = false" filled type="number"
class="q-pt-md" :dense="true" v-model="value[1].y" label="y" lazy-rules /> class="q-pt-md" :dense="true" v-model="value[1].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset')+' v2'" />
</div> </div>
</div> </div>
</div> </div>
@ -74,7 +74,7 @@
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-8"><q-input @focus="isactivearray[2] = false" filled type="number" <div class="col-8"><q-input @focus="isactivearray[2] = false" filled type="number"
class="q-pt-md" :dense="true" v-model="value[2].y" label="y" lazy-rules /> class="q-pt-md" :dense="true" v-model="value[2].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset')+' v3'" />
</div> </div>
</div> </div>
</div> </div>
@ -83,7 +83,7 @@
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-8"><q-input @focus="isactivearray[3] = false" filled type="number" <div class="col-8"><q-input @focus="isactivearray[3] = false" filled type="number"
class="q-pt-md" :dense="true" v-model="value[3].y" label="y" lazy-rules /> class="q-pt-md" :dense="true" v-model="value[3].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset')+' v4'" />
</div> </div>
</div> </div>
</div> </div>
@ -92,7 +92,7 @@
<div class="col-2"></div> <div class="col-2"></div>
<div class="col-8"><q-input @focus="isactivearray[4] = false" filled type="number" <div class="col-8"><q-input @focus="isactivearray[4] = false" filled type="number"
class="q-pt-md" :dense="true" v-model="value[4].y" label="y" lazy-rules /> class="q-pt-md" :dense="true" v-model="value[4].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(4)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(4)" text-color="black" :label="$t('reset')+' v5'" />
</div> </div>
</div> </div>
</div> </div>
@ -103,27 +103,27 @@
<div class="row"> <div class="row">
<div class="col-1"><q-input filled @focus="isactivearray[5] = false" type="number" class="q-pt-md" <div class="col-1"><q-input filled @focus="isactivearray[5] = false" type="number" class="q-pt-md"
:dense="true" v-model="value[5].x" label="x" lazy-rules /> :dense="true" v-model="value[5].x" label="x" lazy-rules />
<q-btn color="white" @click="reset(5)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(5)" text-color="black" :label="$t('reset')+' h1'" />
</div> </div>
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-1"><q-input filled @focus="isactivearray[6] = false" type="number" class="q-pt-md" <div class="col-1"><q-input filled @focus="isactivearray[6] = false" type="number" class="q-pt-md"
:dense="true" v-model="value[6].x" label="x" lazy-rules /> :dense="true" v-model="value[6].x" label="x" lazy-rules />
<q-btn color="white" @click="reset(6)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(6)" text-color="black" :label="$t('reset')+' h2'" />
</div> </div>
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-1"><q-input filled @focus="isactivearray[7] = false" type="number" class="q-pt-md" <div class="col-1"><q-input filled @focus="isactivearray[7] = false" type="number" class="q-pt-md"
:dense="true" v-model="value[7].x" label="x" lazy-rules /> :dense="true" v-model="value[7].x" label="x" lazy-rules />
<q-btn color="white" @click="reset(7)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(7)" text-color="black" :label="$t('reset')+' h3'" />
</div> </div>
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-1"><q-input filled @focus="isactivearray[8] = false" type="number" class="q-pt-md" <div class="col-1"><q-input filled @focus="isactivearray[8] = false" type="number" class="q-pt-md"
:dense="true" v-model="value[8].x" label="x" lazy-rules /> :dense="true" v-model="value[8].x" label="x" lazy-rules />
<q-btn color="white" @click="reset(8)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(8)" text-color="black" :label="$t('reset')+' h4'" />
</div> </div>
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-1"><q-input filled @focus="isactivearray[9] = false" type="number" class="q-pt-md" <div class="col-1"><q-input filled @focus="isactivearray[9] = false" type="number" class="q-pt-md"
:dense="true" v-model="value[9].x" label="x" lazy-rules /> :dense="true" v-model="value[9].x" label="x" lazy-rules />
<q-btn color="white" @click="reset(9)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(9)" text-color="black" :label="$t('reset')+' h5'" />
</div> </div>
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-1 q-pt-xl"> <div class="col-1 q-pt-xl">

View File

@ -5,7 +5,7 @@
@focus="isactivearray[0] = false" v-model="four[0].x" label="x" lazy-rules /> @focus="isactivearray[0] = false" v-model="four[0].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[0] = false" <q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[0] = false"
v-model="four[0].y" label="y" lazy-rules /> v-model="four[0].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset') +$t('point') +'1'" />
</div> </div>
<div class="col-8"> <div class="col-8">
@ -15,7 +15,7 @@
v-model="four[1].x" label="x" lazy-rules /> v-model="four[1].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[1] = false" <q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[1] = false"
v-model="four[1].y" label="y" lazy-rules /> v-model="four[1].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset') +$t('point') +'2'" />
</div> </div>
<div class="col-2"></div> <div class="col-2"></div>
@ -48,7 +48,7 @@
v-model="four[2].x" label="x" lazy-rules /> v-model="four[2].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[2] = false" <q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[2] = false"
v-model="four[2].y" label="y" lazy-rules /> v-model="four[2].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset') +$t('point') +'3'" />
</div> </div>
<div class="col-8"> <div class="col-8">
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /> <q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" />
@ -58,7 +58,7 @@
v-model="four[3].x" label="x" lazy-rules /> v-model="four[3].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false" <q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false"
v-model="four[3].y" label="y" lazy-rules /> v-model="four[3].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset') +$t('point') +'4'" />
</div> </div>
</div> </div>
</template> </template>

View File

@ -12,8 +12,9 @@
<q-toggle class="float-right" v-model="array[0].isshow" label="" /> <q-toggle class="float-right" v-model="array[0].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :bg-color="group == 0 ? 'cyan-1' : ''" @focus="group = 0" <q-input filled type="number" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''"
v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules :rules="[ @focus="group = 0" v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules
:rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') || $t('Please enter a number'),
(val) => (val) =>
@ -32,8 +33,9 @@
<q-toggle class="float-right" v-model="array[1].isshow" label="" /> <q-toggle class="float-right" v-model="array[1].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :bg-color="group == 1 ? 'cyan-1' : ''" @focus="group = 1" <q-input filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''"
v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules :rules="[ @focus="group = 1" v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules
:rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') || $t('Please enter a number'),
(val) => (val) =>
@ -48,8 +50,9 @@
<q-toggle class="float-right" v-model="array[2].isshow" label="" /> <q-toggle class="float-right" v-model="array[2].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :bg-color="group == 2 ? 'cyan-1' : ''" @focus="group = 2" <q-input filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''"
v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules :rules="[ @focus="group = 2" v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules
:rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') || $t('Please enter a number'),
(val) => (val) =>
@ -68,8 +71,9 @@
<q-toggle class="float-right" v-model="array[3].isshow" label="" /> <q-toggle class="float-right" v-model="array[3].isshow" label="" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input filled type="number" :bg-color="group == 3 ? 'cyan-1' : ''" @focus="group = 3" <q-input filled type="number" :autofocus="group == 3" :bg-color="group == 3 ? 'cyan-1' : ''"
v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules :rules="[ @focus="group = 3" v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules
:rules="[
(val) => (val) =>
(val !== null && val !== '') || $t('Please enter a number'), (val !== null && val !== '') || $t('Please enter a number'),
(val) => (val) =>
@ -234,11 +238,12 @@ export default defineComponent({
} else { } else {
group.value = 4 group.value = 4
} }
console.log(group.value)
} }
const getconfig = () => { const getconfig = () => {
try { try {
set?.GetBlendingConfig("").then((res) => { }) set?.GetBlendingConfig("").then((res) => { })
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); }) set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); })
} catch (error) { } catch (error) {
@ -254,7 +259,7 @@ export default defineComponent({
array[index].value = Number(config.params[index].size) array[index].value = Number(config.params[index].size)
} }
if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); use_set_cache() if (sessionStorage.FusionLocale) set_cache.value = JSON.parse(sessionStorage.FusionLocale); use_set_cache()
setnowindex()
} }
const use_server_config = () => { const use_server_config = () => {

View File

@ -7,7 +7,7 @@
:dense="true" v-model="nine[0].x" label="x" lazy-rules /> :dense="true" v-model="nine[0].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[0] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[0] = false" :dense="true"
v-model="nine[0].y" label="y" lazy-rules /> v-model="nine[0].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(0)" text-color="black" :label="$t('reset') +$t('point') +'1'" />
</div> </div>
</div> </div>
</div> </div>
@ -19,14 +19,14 @@
:dense="true" v-model="nine[1].x" label="x" lazy-rules /> :dense="true" v-model="nine[1].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[1] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[1] = false" :dense="true"
v-model="nine[1].y" label="y" lazy-rules /> v-model="nine[1].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(1)" text-color="black" :label="$t('reset') +$t('point') +'2'" />
</div> </div>
<div class="col-3" style="margin-left: 5px;"> <q-input filled type="number" class="q-pt-md" <div class="col-3" style="margin-left: 5px;"> <q-input filled type="number" class="q-pt-md"
:dense="true" v-model="nine[4].x" label="x" @focus="isactivearray[4] = false" lazy-rules /> :dense="true" v-model="nine[4].x" label="x" @focus="isactivearray[4] = false" lazy-rules />
<q-input filled type="number" class="q-pt-md" :dense="true" v-model="nine[4].y" label="y" <q-input filled type="number" class="q-pt-md" :dense="true" v-model="nine[4].y" label="y"
@focus="isactivearray[4] = false" lazy-rules /> @focus="isactivearray[4] = false" lazy-rules />
<q-btn color="white" @click="reset(4)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(4)" text-color="black" :label="$t('reset') +$t('point') +'5'" />
</div> </div>
</div> </div>
</div> </div>
@ -37,7 +37,7 @@
:dense="true" v-model="nine[2].x" label="x" lazy-rules /> :dense="true" v-model="nine[2].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[2] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[2] = false" :dense="true"
v-model="nine[2].y" label="y" lazy-rules /> v-model="nine[2].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(2)" text-color="black" :label="$t('reset') +$t('point') +'3'" />
</div> </div>
</div> </div>
@ -49,7 +49,7 @@
:dense="true" v-model="nine[3].x" label="x" lazy-rules /> :dense="true" v-model="nine[3].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[3] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[3] = false" :dense="true"
v-model="nine[3].y" label="y" lazy-rules /> v-model="nine[3].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(3)" text-color="black" :label="$t('reset') +$t('point') +'4'" />
</div> </div>
</div> </div>
@ -93,7 +93,7 @@
:dense="true" v-model="nine[5].x" label="x" lazy-rules /> :dense="true" v-model="nine[5].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[5] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[5] = false" :dense="true"
v-model="nine[5].y" label="y" lazy-rules /> v-model="nine[5].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(5)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(5)" text-color="black" :label="$t('reset') +$t('point') +'6'" />
</div> </div>
</div> </div>
@ -106,7 +106,7 @@
:dense="true" v-model="nine[6].x" label="x" lazy-rules /> :dense="true" v-model="nine[6].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[6] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[6] = false" :dense="true"
v-model="nine[6].y" label="y" lazy-rules /> v-model="nine[6].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(6)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(6)" text-color="black" :label="$t('reset') +$t('point') +'7'" />
</div> </div>
</div> </div>
@ -118,7 +118,7 @@
:dense="true" v-model="nine[7].x" label="x" lazy-rules /> :dense="true" v-model="nine[7].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[7] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[7] = false" :dense="true"
v-model="nine[7].y" label="y" lazy-rules /> v-model="nine[7].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(7)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(7)" text-color="black" :label="$t('reset') +$t('point') +'8'" />
</div> </div>
</div> </div>
@ -130,7 +130,7 @@
:dense="true" v-model="nine[8].x" label="x" lazy-rules /> :dense="true" v-model="nine[8].x" label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" @focus="isactivearray[8] = false" :dense="true" <q-input filled type="number" class="q-pt-md" @focus="isactivearray[8] = false" :dense="true"
v-model="nine[8].y" label="y" lazy-rules /> v-model="nine[8].y" label="y" lazy-rules />
<q-btn color="white" @click="reset(8)" text-color="black" :label="$t('reset')" /> <q-btn color="white" @click="reset(8)" text-color="black" :label="$t('reset') +$t('point') +'9'" />
</div> </div>
</div> </div>
@ -255,7 +255,6 @@ export default defineComponent({
if (set_cache.value[selectedprojector.value] != null) { if (set_cache.value[selectedprojector.value] != null) {
let tmp = JSON.parse(set_cache.value[selectedprojector.value]); let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
deepcopy(nine, tmp) deepcopy(nine, tmp)
} }
syncpoint() syncpoint()
}; };
@ -306,7 +305,8 @@ export default defineComponent({
defaultnine.value[index].y = config.point9[index].def_y defaultnine.value[index].y = config.point9[index].def_y
} }
setninepostion(); setninepostion();
syncpoint() //syncpoint()
use_set_cache()
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
@ -326,7 +326,8 @@ export default defineComponent({
defaultnine.value[index].y = config.point9[index].def_y defaultnine.value[index].y = config.point9[index].def_y
} }
setninepostion(); setninepostion();
syncpoint() //syncpoint()
use_set_cache()
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
@ -380,7 +381,7 @@ export default defineComponent({
defaultnine.value[index].x = nine[index].x defaultnine.value[index].x = nine[index].x
defaultnine.value[index].y = nine[index].y defaultnine.value[index].y = nine[index].y
} }
if (sessionStorage.SurfaceCorrection && sessionStorage.SurfaceCorrection.length > 0) { if (sessionStorage.SurfaceCorrection) {
set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection); set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection);
use_set_cache() use_set_cache()
} else { } else {
@ -394,6 +395,8 @@ export default defineComponent({
defaultninepostion.value[index].y = ninepostion.value[index].y; defaultninepostion.value[index].y = ninepostion.value[index].y;
defaultnine.value[index].x = nine[index].x defaultnine.value[index].x = nine[index].x
defaultnine.value[index].y = nine[index].y defaultnine.value[index].y = nine[index].y
nine[index].x = config.point9[index].x
nine[index].y = config.point9[index].y
} }
} }
const reset = (index: number) => { const reset = (index: number) => {
@ -537,7 +540,8 @@ export default defineComponent({
reset, reset,
isshowarray, isshowarray,
isactivearray, isactivearray,
activeMouseDown activeMouseDown,
set_cache
}; };
}, },
}); });

View File

@ -26,7 +26,7 @@
<q-separator /> <q-separator />
<!-- height: 80vh --> <!-- height: 80vh -->
<q-card-section class="scroll" style="width: 70vw"> <q-card-section class="scroll" style="width: 80vw">
<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-3" style="border-right: 1px solid #b0bec5;"> <div class="col-3" style="border-right: 1px solid #b0bec5;">
<p class="text-center">{{ $t("Projector") }}</p> <p class="text-center">{{ $t("Projector") }}</p>
@ -62,7 +62,7 @@
]" /> ]" />
</div> </div>
<div style="min-height: 72vh"> <div style="min-height: 72vh">
<component :is="options" v-if="resize" /> <component :is="options" />
</div> </div>
</div> </div>
</div> </div>
@ -71,7 +71,7 @@
<q-separator /> <q-separator />
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup /> <q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup @click="$store.commit('setSelectedProjector','0/0');" />
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" v-close-popup /> <q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" v-close-popup />
</q-card-actions> </q-card-actions>
</q-form> </q-form>
@ -133,18 +133,8 @@ export default defineComponent({
const showDialog = async () => { const showDialog = async () => {
show_dialog.value = true; show_dialog.value = true;
}; };
const resize = ref(true)
// //
// onMounted(() => {
// //
// window.onresize = () => {
// return (() => {
// resize.value = false; setTimeout(() => {
// resize.value = true
// }, 100);
// })();
// };
// });
// //
@ -183,6 +173,7 @@ export default defineComponent({
show_dialog.value = false show_dialog.value = false
clear() clear()
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); EnableBlending.value = tmp.enable; $store.commit("setEnablefusion", tmp.enable); config.value.col = tmp.col; config.value.row = tmp.row; $store.commit("setfusion_configuration", res?.config); }) set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); EnableBlending.value = tmp.enable; $store.commit("setEnablefusion", tmp.enable); config.value.col = tmp.col; config.value.row = tmp.row; $store.commit("setfusion_configuration", res?.config); })
$store.commit('setSelectedProjector','0/0');
} }
const getconfig=()=>{ const getconfig=()=>{
try { try {
@ -194,14 +185,12 @@ export default defineComponent({
} }
const clear = () => { const clear = () => {
$store.commit('setSelectedProjector','0/0');
sessionStorage.removeItem('DensityCorrection')
sessionStorage.removeItem('FourPointCalibration')
sessionStorage.removeItem('SurfaceCorrection')
setTimeout(() => { setTimeout(() => {
sessionStorage.removeItem('FusionLocale') sessionStorage.removeItem('FusionLocale')
sessionStorage.removeItem('SurfaceCorrection')
sessionStorage.removeItem('DensityCorrection')
sessionStorage.removeItem('FourPointCalibration')
}, 500) }, 500)
getconfig() getconfig()
} }
@ -222,7 +211,6 @@ export default defineComponent({
}, 1000); }, 1000);
}) })
return { return {
resize,
clear, clear,
show_dialog, show_dialog,
options, options,

View File

@ -598,7 +598,7 @@ export default defineComponent({
); );
const getconfig=()=>{ const getconfig=()=>{
try { try {
set?.GetBlendingConfig("").then((res)=>{}) set?.GetBlendingConfig("").then((res)=>{console.log(res)})
set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); }) set?.GetBlendingConfig("").then((res) => { let tmp = JSON.parse(res ? res.config : ""); $store.commit("setEnablefusion", tmp.enable); $store.commit("setfusion_configuration", res?.config); })
} catch (error) { } catch (error) {