修复界面数据错误

This commit is contained in:
shefengchun 2023-02-24 15:06:37 +08:00
parent d71124dfc4
commit efb6f0437a
4 changed files with 22 additions and 16 deletions

View File

@ -222,7 +222,7 @@ export default defineComponent({
let $store = useStore();
let $t = useI18n();
const ste_status = ref(0);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => {
return $store.state.selected_projector;
});
@ -236,9 +236,10 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1]
);
});
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const now_v_h = ref("")
const value_h_point_amount = ref(5)
const value_v_point_amount = ref(5)
const value_h_point_amount = ref(Number(Object.keys(config.multi_hor_density)[0]))
const value_v_point_amount = ref(Number(Object.keys(config.multi_ver_density)[0]))
const add_dialog = ref(false)
const now_amount = ref(0)
@ -256,9 +257,9 @@ export default defineComponent({
};
const use_server_config = () => {
value_h_point_amount.value = 5
value_v_point_amount.value = 5
let a = 5
value_h_point_amount.value = Number(Object.keys(config.multi_hor_density)[0])
value_v_point_amount.value = Number(Object.keys(config.multi_ver_density)[0])
let a = Number(Object.keys(config.multi_hor_density)[0])
value_h.value = []
value_h_point.value = []
for (let index = 0; index < config.multi_hor_density[a].length; index++) {

View File

@ -94,12 +94,13 @@ export default defineComponent({
}
},
setup(props) {
const now_selsect_projector:any = inject<string>("now_selsect_projector");
let set = GlobalData.getInstance().getCurrentClient();
let $store = useStore();
let $t = useI18n();
const ste_status = ref(0);
let allconfig = JSON.parse($store.state.fusion_configuration);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => {
return $store.state.selected_projector;
});
@ -114,7 +115,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1]
);
});
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const value_point_amount = ref(5)
@ -462,7 +463,6 @@ export default defineComponent({
defineExpose({
options_model,
});
const now_selsect_projector:any = inject<string>("now_selsect_projector");
return {
now_selsect_projector,
details_selsect,

View File

@ -259,7 +259,7 @@ export default defineComponent({
set_cache.value[selectedprojector.value] = JSON.stringify(array);
};
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const configselsect = computed(() => {
return $store.state.selected_projector;
});
@ -391,7 +391,7 @@ export default defineComponent({
onMounted(() => {
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");
config = tmp.projectors[0];
config = tmp.projectors[selectedprojector.value];
ste_status.value = 1;
startconfig();
setTimeout(() => {

View File

@ -26,7 +26,7 @@
</div>
</div>
<div class="col-2">
<div class="col-1 q-pt-md "><q-btn color="white" @click="() => { add_dialog = true;value_point_amount_tmp=value_point_amount }" text-color="black"
<div class="col-1 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>
<div class="col-2">
@ -150,7 +150,7 @@ export default defineComponent({
let $t = useI18n();
const ste_status = ref(0);
let allconfig = JSON.parse($store.state.fusion_configuration);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => {
return $store.state.selected_projector;
});
@ -163,7 +163,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1]
);
});
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const value_point_amount = ref(9)
const del_dialog = ref(false)
const add_dialog = ref(false)
@ -360,6 +360,7 @@ export default defineComponent({
}
value_point.value.push(tmp_point)
}
save_set_cache()
}
@ -375,6 +376,8 @@ export default defineComponent({
start()
use_server_config()
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
start_point(Number(options_value_point_amount.value[0]))
if (
sessionStorage.SurfaceCorrection &&
sessionStorage.SurfaceCorrection.length > 0
@ -382,8 +385,6 @@ export default defineComponent({
set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection);
use_set_cache();
}
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
start_point(Number(options_value_point_amount.value[0]))
window.onresize = () => {
return (() => {
if (div != null) {
@ -507,6 +508,7 @@ export default defineComponent({
value_point.value.push(tmp_point)
}
});
save_set_cache()
}
const del_control_points = (amount: number) => {
let tmp = amount
@ -559,6 +561,7 @@ export default defineComponent({
}
});
save_set_cache()
}
const add = () => {
let tmpconfig: any = null
@ -606,6 +609,7 @@ export default defineComponent({
}
});
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
save_set_cache()
}
const preview = (val: number) => {
val = Number(val)
@ -635,6 +639,7 @@ export default defineComponent({
now_amount.value = val ** 2
value_point_amount.value = val ** 2
options_model.value = 1
save_set_cache()
}
/**