This commit is contained in:
shefengchun 2023-02-09 11:12:11 +08:00
parent 73b1a2bc05
commit e095bcb9fb
3 changed files with 23 additions and 33 deletions

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-xs" :dense="true" @focus="isactivearray[0] = false" v-model="four[0].y" <q-input filled type="number" class="q-pt-xs" :dense="true" @focus="isactivearray[0] = false" v-model="four[0].y"
label="y" lazy-rules /> label="y" lazy-rules />
<q-btn size="sm" dense color="white" @click="reset(0,true)" text-color="black" <q-btn size="sm" dense color="white" @click="reset(0,false)" text-color="black"
:label="$t('reset') + $t('point') + '1'" /> :label="$t('reset') + $t('point') + '1'" />
</div> </div>
<div class="col-8"></div> <div class="col-8"></div>
@ -14,7 +14,7 @@
label="x" lazy-rules /> label="x" lazy-rules />
<q-input filled type="number" class="q-pt-xs" :dense="true" @focus="isactivearray[1] = false" v-model="four[1].y" <q-input filled type="number" class="q-pt-xs" :dense="true" @focus="isactivearray[1] = false" v-model="four[1].y"
label="y" lazy-rules /> label="y" lazy-rules />
<q-btn size="sm" dense color="white" @click="reset(1,true)" text-color="black" <q-btn size="sm" dense color="white" @click="reset(1,false)" text-color="black"
:label="$t('reset') + $t('point') + '2'" /> :label="$t('reset') + $t('point') + '2'" />
</div> </div>
@ -52,7 +52,7 @@
label="x" lazy-rules /> label="x" lazy-rules />
<q-input filled type="number" class="q-pt-xs" :dense="true" @focus="isactivearray[2] = false" v-model="four[2].y" <q-input filled type="number" class="q-pt-xs" :dense="true" @focus="isactivearray[2] = false" v-model="four[2].y"
label="y" lazy-rules /> label="y" lazy-rules />
<q-btn size="sm" dense color="white" @click="reset(2,true)" text-color="black" <q-btn size="sm" dense color="white" @click="reset(2,false)" text-color="black"
:label="$t('reset') + $t('point') + '3'" /> :label="$t('reset') + $t('point') + '3'" />
</div> </div>
<div class="col-8"> <div class="col-8">
@ -63,7 +63,7 @@
label="x" lazy-rules /> label="x" lazy-rules />
<q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false" v-model="four[3].y" <q-input filled type="number" class="q-pt-md" :dense="true" @focus="isactivearray[3] = false" v-model="four[3].y"
label="y" lazy-rules /> label="y" lazy-rules />
<q-btn size="sm" dense color="white" @click="reset(3,true)" text-color="black" <q-btn size="sm" dense color="white" @click="reset(3,false)" text-color="black"
:label="$t('reset') + $t('point') + '4'" /> :label="$t('reset') + $t('point') + '4'" />
</div> </div>
</div> </div>

View File

@ -97,47 +97,49 @@
<div> <div>
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green" <q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
vertical reverse label-always /> vertical reverse label-always />
<div> <q-input dense filled type="number" max="1" min="0" step="0.1" @update:model-value="chang('alpha')" <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" label="Alpha" lazy-rules :rules="[ v-model="array[group].alpha" label="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-btn color="white" @click="reset('alpha')" text-color="black" :label="$t('reset')" /></div> ]" /><q-btn style="margin-top: 0.5rem;" color="white" @click="reset('alpha')" text-color="black" :label="$t('reset')" /></div>
</div> </div>
<div> <div>
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="16" :step="0.01" color="green" vertical <q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="16" :step="0.01" color="green" vertical
reverse label-always /> reverse label-always />
<div> <q-input dense filled type="number" max="16" min="0" step="0.1" @update:model-value="chang('p')" <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" label="Power" lazy-rules :rules="[ v-model="array[group].p" label="Power" 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-btn color="white" @click="reset('p')" text-color="black" :label="$t('reset')" /></div> ]" /><q-btn style="margin-top: 0.5rem;" color="white" @click="reset('p')" text-color="black" :label="$t('reset')" /></div>
</div> </div>
<div> <div>
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="16" :step="0.01" color="green" <q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="16" :step="0.01" color="green"
vertical reverse label-always /> vertical reverse label-always />
<div> <q-input dense filled type="number" max="16" min="0" step="0.1" @update:model-value="chang('gamma')" <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" label="Gamma" lazy-rules :rules="[ v-model="array[group].gamma" label="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-btn color="white" @click="reset('gamma')" text-color="black" :label="$t('reset')" /></div> ]" />
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('gamma')" text-color="black" :label="$t('reset')" /></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div style="position: relative;"> <div style="position: absolute;bottom: 0;">
<q-checkbox left-label v-model="auxiliary_line" @update:model-value="(value, evt)=>{send_auxiliary_line(value)}" :label="$t('auxiliary lines')"/> <q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt)=>{send_auxiliary_line(value)}" :label="$t('auxiliary lines')"/>
</div> </div>
</template> </template>
@ -521,17 +523,6 @@ export default defineComponent({
const changenablefusion = () => { const changenablefusion = () => {
$store.commit("setenablefusion", enablefusion.value); $store.commit("setenablefusion", enablefusion.value);
}; };
let resnewdata = null;
const resetall = () => {
try {
set?.GetBlendingConfig("").then((res) => {
resnewdata = res?.config;
setconfig(resnewdata);
});
} catch (error) {
console.log("ResetBlendingConfig error");
}
};
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)
@ -592,7 +583,6 @@ export default defineComponent({
enablefusion, enablefusion,
changenablefusion, changenablefusion,
selectedprojector, selectedprojector,
resetall,
set_cache, set_cache,
auxiliary_line, auxiliary_line,
reset, reset,

View File

@ -8,7 +8,7 @@
v-model="nine[0].x" label="x" lazy-rules /> v-model="nine[0].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[0] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(0,true)" text-color="black" :label="$t('reset') + $t('point') + '1'" /> <q-btn size="sm" dense color="white" @click="reset(0,false)" text-color="black" :label="$t('reset') + $t('point') + '1'" />
</div> </div>
</div> </div>
</div> </div>
@ -20,7 +20,7 @@
v-model="nine[1].x" label="x" lazy-rules /> v-model="nine[1].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[1] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(1,true)" text-color="black" :label="$t('reset') + $t('point') + '2'" /> <q-btn size="sm" dense color="white" @click="reset(1,false)" text-color="black" :label="$t('reset') + $t('point') + '2'" />
</div> </div>
<div class="col-4" style="padding-left: 2px"> <div class="col-4" style="padding-left: 2px">
@ -28,7 +28,7 @@
@focus="isactivearray[4] = false" lazy-rules /> @focus="isactivearray[4] = false" lazy-rules />
<q-input filled type="number" :dense="true" v-model="nine[4].y" label="y" <q-input filled type="number" :dense="true" v-model="nine[4].y" label="y"
@focus="isactivearray[4] = false" lazy-rules /> @focus="isactivearray[4] = false" lazy-rules />
<q-btn size="sm" dense color="white" @click="reset(4,true)" text-color="black" :label="$t('reset') + $t('point') + '5'" /> <q-btn size="sm" dense color="white" @click="reset(4,false)" text-color="black" :label="$t('reset') + $t('point') + '5'" />
</div> </div>
</div> </div>
</div> </div>
@ -40,7 +40,7 @@
v-model="nine[2].x" label="x" lazy-rules /> v-model="nine[2].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[2] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(2,true)" text-color="black" :label="$t('reset') + $t('point') + '3'" /> <q-btn size="sm" dense color="white" @click="reset(2,false)" text-color="black" :label="$t('reset') + $t('point') + '3'" />
</div> </div>
</div> </div>
</div> </div>
@ -52,7 +52,7 @@
v-model="nine[3].x" label="x" lazy-rules /> v-model="nine[3].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[3] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(3,true)" text-color="black" :label="$t('reset') + $t('point') + '4'" /> <q-btn size="sm" dense color="white" @click="reset(3,false)" text-color="black" :label="$t('reset') + $t('point') + '4'" />
</div> </div>
</div> </div>
</div> </div>
@ -105,7 +105,7 @@
v-model="nine[5].x" label="x" lazy-rules /> v-model="nine[5].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[5] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(5,true)" text-color="black" :label="$t('reset') + $t('point') + '6'" /> <q-btn size="sm" dense color="white" @click="reset(5,false)" text-color="black" :label="$t('reset') + $t('point') + '6'" />
</div> </div>
</div> </div>
</div> </div>
@ -119,7 +119,7 @@
v-model="nine[6].x" label="x" lazy-rules /> v-model="nine[6].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[6] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(6,true)" text-color="black" :label="$t('reset') + $t('point') + '7'" /> <q-btn size="sm" dense color="white" @click="reset(6,false)" text-color="black" :label="$t('reset') + $t('point') + '7'" />
</div> </div>
</div> </div>
</div> </div>
@ -131,7 +131,7 @@
v-model="nine[7].x" label="x" lazy-rules /> v-model="nine[7].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[7] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(7,true)" text-color="black" :label="$t('reset') + $t('point') + '8'" /> <q-btn size="sm" dense color="white" @click="reset(7,false)" text-color="black" :label="$t('reset') + $t('point') + '8'" />
</div> </div>
</div> </div>
</div> </div>
@ -143,7 +143,7 @@
v-model="nine[8].x" label="x" lazy-rules /> v-model="nine[8].x" label="x" lazy-rules />
<q-input filled type="number" @focus="isactivearray[8] = false" :dense="true" <q-input filled type="number" @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 size="sm" dense color="white" @click="reset(8,true)" text-color="black" :label="$t('reset') + $t('point') + '9'" /> <q-btn size="sm" dense color="white" @click="reset(8,false)" text-color="black" :label="$t('reset') + $t('point') + '9'" />
</div> </div>
</div> </div>
</div> </div>