修复重置时不保存数据
This commit is contained in:
parent
1b93f2f92a
commit
5c7ac2a7d0
|
@ -49,66 +49,68 @@
|
||||||
<div class="col-5"><q-radio v-model="now_v_h" val="vertical" :label="$t('vertical')" /></div>
|
<div class="col-5"><q-radio v-model="now_v_h" val="vertical" :label="$t('vertical')" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
<div class="row" v-show="now_v_h == 'vertical'">
|
<div class="row" v-show="now_v_h == 'vertical'">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-3 q-px-md"> <q-select class="q-pt-md" :label="$t('vertical point')"
|
<div class="col-2 q-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-3 q-pt-md q-px-md"><q-btn color="white" @click="add_dialog = true" text-color="black"
|
<div class="col-2 q-pt-md q-px-md"><q-btn color="white" @click="add_dialog = true" text-color="black"
|
||||||
:label="$t('add control points')" /></div>
|
:label="$t('add control points')" /></div>
|
||||||
<div class="col-3 q-pt-md q-px-md"><q-btn color="white" @click="() => { del_dialog = true }"
|
<div class="col-2 q-pt-md q-px-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>
|
||||||
|
<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>
|
||||||
|
|
||||||
<div class="row" v-show="now_v_h == 'vertical'">
|
<div class="row" v-show="now_v_h == 'vertical'">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-3 q-px-md" @mousewheel="details_selsect_v"> <q-select class="q-pt-md " :label="$t('vertical')"
|
<div class="col-2 q-px-md" @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-3 q-px-md" @mousewheel="details_selsect_val($event,'v')" > <q-input v-if="value_v[options_model_v]" filled type="number" class="q-pt-md"
|
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input v-if="value_v[options_model_v]"
|
||||||
:dense="true" v-model="value_v[options_model_v].y" @update:model-value="chang(options_model_v, $event, 'v')"
|
filled type="number" class="q-pt-md" :dense="true" v-model="value_v[options_model_v].y"
|
||||||
lazy-rules />
|
@update:model-value="chang(options_model_v, $event, 'v')" lazy-rules />
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pt-md col-3">
|
<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"
|
||||||
|
:label="$t('reset all')+value_v_point_amount+$t('point')" /></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
<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-3 q-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-3 q-pt-md "><q-btn color="white" @click="add_dialog = true" text-color="black"
|
<div class="col-2 q-pt-md "><q-btn color="white" @click="add_dialog = true" text-color="black"
|
||||||
:label="$t('add control points')" /></div>
|
:label="$t('add control points')" /></div>
|
||||||
<div class="col-3 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>
|
||||||
|
<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>
|
||||||
|
|
||||||
<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-3 q-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-3 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"
|
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input v-if="value_h[options_model_h]"
|
||||||
:dense="true" v-model="value_h[options_model_h].x" @update:model-value="chang(options_model_h, $event, 'h')"
|
filled type="number" class="q-pt-md" :dense="true" v-model="value_h[options_model_h].x"
|
||||||
lazy-rules />
|
@update:model-value="chang(options_model_h, $event, 'h')" lazy-rules />
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pt-md col-3">
|
<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>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-1"></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 the current program control point')" /></div>
|
:label="$t('reset all')+value_h_point_amount+$t('point')" /></div>
|
||||||
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
|
</div>
|
||||||
:label="$t('Reset all program control points')" /></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="position: absolute;bottom: 0;">
|
<div style="position: absolute;bottom: 0;">
|
||||||
|
@ -592,6 +594,7 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
send_value(-1, 'v', 0);
|
send_value(-1, 'v', 0);
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -339,6 +339,7 @@ export default defineComponent({
|
||||||
value_point.value[index].x = Math.round(tmp.x)
|
value_point.value[index].x = Math.round(tmp.x)
|
||||||
}
|
}
|
||||||
send_value(-2,0,0)
|
send_value(-2,0,0)
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
const recalculate_coordinates = () => {
|
const recalculate_coordinates = () => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
:disable="value_point_amount <= 9" text-color="black" :label="$t('reduce control points')" /></div>
|
:disable="value_point_amount <= 9" text-color="black" :label="$t('reduce control points')" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="q-pt-md q-px-md col-4"> <q-btn color="white" @click="resetall_all" text-color="black"
|
||||||
|
:label="$t('Reset all program control points')" /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
|
@ -49,19 +52,13 @@
|
||||||
</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')" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-2 q-pt-md ">
|
<div class="q-pt-md q-px-md col-3"> <q-btn color="white" @click="resetall" text-color="black"
|
||||||
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
|
:label="$t('reset all')+value_point_amount+$t('point')" /></div>
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-1"></div>
|
|
||||||
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
|
|
||||||
:label="$t('Reset the current program control point')" /></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>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="del_dialog">
|
<q-dialog v-model="del_dialog">
|
||||||
<q-card style="width: 700px; max-width: 80vw;">
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
|
@ -419,6 +416,7 @@ export default defineComponent({
|
||||||
value_point.value[index].x = Math.trunc(tmp.x)
|
value_point.value[index].x = Math.trunc(tmp.x)
|
||||||
}
|
}
|
||||||
send_value(-1, 0, 0)
|
send_value(-1, 0, 0)
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
const resetall_all = () => {
|
const resetall_all = () => {
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
|
|
@ -499,4 +499,5 @@ export default {
|
||||||
"fusion out": "Out",
|
"fusion out": "Out",
|
||||||
"Please enter the square number": "Please enter the square number",
|
"Please enter the square number": "Please enter the square number",
|
||||||
"Change projector layout": "Change projector layout",
|
"Change projector layout": "Change projector layout",
|
||||||
|
"reset all":"reset all"
|
||||||
};
|
};
|
||||||
|
|
|
@ -765,5 +765,6 @@ export default {
|
||||||
normal: "普通",
|
normal: "普通",
|
||||||
"fusion out": "出",
|
"fusion out": "出",
|
||||||
"Please enter the square number":"请输入平方数",
|
"Please enter the square number":"请输入平方数",
|
||||||
"Change projector layout":"更改投影机布局"
|
"Change projector layout":"更改投影机布局",
|
||||||
|
"reset all":"重置所有"
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue