增加保存配置和读取配置的界面
This commit is contained in:
parent
2de84af0fe
commit
6765c47ef3
|
@ -207,7 +207,6 @@ import { useStore } from "src/store";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import ClientConnection from "src/common/ClientConnection";
|
import ClientConnection from "src/common/ClientConnection";
|
||||||
import GlobalData from "src/common/GlobalData";
|
import GlobalData from "src/common/GlobalData";
|
||||||
import { json } from "body-parser";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentFourPointCalibration",
|
name: "ComponentFourPointCalibration",
|
||||||
|
@ -513,7 +512,7 @@ export default defineComponent({
|
||||||
isactivearray.value[index] = false;
|
isactivearray.value[index] = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//手动同步
|
//手动同步
|
||||||
const set_point_x = () => {
|
const set_point_x = () => {
|
||||||
let x = Math.ceil(four[0].x / Proportion.value.x);
|
let x = Math.ceil(four[0].x / Proportion.value.x);
|
||||||
let y = Math.ceil((config.height - four[0].y) / Proportion.value.y);
|
let y = Math.ceil((config.height - four[0].y) / Proportion.value.y);
|
||||||
|
|
|
@ -190,6 +190,7 @@ export default defineComponent({
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
save_set_cache()
|
||||||
}
|
}
|
||||||
const reduce = (type: string) => {
|
const reduce = (type: string) => {
|
||||||
let tmp: Number;
|
let tmp: Number;
|
||||||
|
@ -341,8 +342,7 @@ export default defineComponent({
|
||||||
array[arr[index]].isshow = config.params[index].enable;
|
array[arr[index]].isshow = config.params[index].enable;
|
||||||
array[arr[index]].value = Number(config.params[index].size);
|
array[arr[index]].value = Number(config.params[index].size);
|
||||||
}
|
}
|
||||||
if (sessionStorage.FusionLocale)
|
if (sessionStorage.FusionLocale)set_cache.value = JSON.parse(sessionStorage.FusionLocale);
|
||||||
set_cache.value = JSON.parse(sessionStorage.FusionLocale);
|
|
||||||
use_set_cache();
|
use_set_cache();
|
||||||
setnowindex();
|
setnowindex();
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,13 +84,50 @@
|
||||||
<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')" />
|
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
||||||
<div class="q-space" data-v-39efcd1f=""></div>
|
<div class="q-space" data-v-39efcd1f=""></div>
|
||||||
|
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary"
|
||||||
|
@click="select_configuration = true" />
|
||||||
<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');" />
|
@click="$store.commit('setSelectedProjector', '0/0');" />
|
||||||
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
|
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
|
<q-dialog v-model="medium">
|
||||||
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
|
<q-card-section>
|
||||||
|
<div class="text-h6">{{ $t('Whether to save the configuration') }}</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<q-input filled v-model="save_name" :label="$t('New Please enter a name')" />
|
||||||
|
<q-select v-show="save_name.length == 0" filled v-model="save_cover_name" :options="plan_list"
|
||||||
|
:label="$t('Please select an override')" />
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
|
||||||
|
<q-btn flat :label="$t('save')" color="primary" v-close-popup />
|
||||||
|
</q-card-actions>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<q-dialog v-model="select_configuration">
|
||||||
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
|
<q-card-section>
|
||||||
|
<div class="text-h6">{{ $t('read saved configuration') }}</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<q-select filled v-model="select_configuration_name" :options="plan_list" :label="$t('please choose')" />
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
|
||||||
|
<q-btn flat :label="$t('ok')" @click="apply_the_selected_configuration" color="primary" v-close-popup />
|
||||||
|
</q-card-actions>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -145,10 +182,12 @@ export default defineComponent({
|
||||||
let $q = useQuasar();
|
let $q = useQuasar();
|
||||||
let $t = useI18n();
|
let $t = useI18n();
|
||||||
let show_dialog = ref(false);
|
let show_dialog = ref(false);
|
||||||
const save_name=ref("")
|
const save_name = ref("")
|
||||||
const showDialog = async () => {
|
const showDialog = async () => {
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
};
|
};
|
||||||
|
const select_configuration = ref(false)
|
||||||
|
const select_configuration_name = ref("")
|
||||||
const send_hide_desktop = () => {
|
const send_hide_desktop = () => {
|
||||||
set?.SetBlendingOption(hide_desktop_value_id.value, hide_desktop_value.value ? "1" : "0");
|
set?.SetBlendingOption(hide_desktop_value_id.value, hide_desktop_value.value ? "1" : "0");
|
||||||
};
|
};
|
||||||
|
@ -211,7 +250,7 @@ export default defineComponent({
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
});
|
});
|
||||||
$store.commit("setSelectedProjector", "0/0");
|
$store.commit("setSelectedProjector", "0/0");
|
||||||
medium.value=true
|
medium.value = true
|
||||||
};
|
};
|
||||||
const getconfig = () => {
|
const getconfig = () => {
|
||||||
try {
|
try {
|
||||||
|
@ -272,10 +311,13 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
const save_cover_name=ref(" ")
|
const save_cover_name = ref(" ")
|
||||||
const plan_list= [
|
const plan_list = [
|
||||||
'Google', 'Facebook', 'Twitter', 'Apple', 'Oracle'
|
'Google', 'Facebook', 'Twitter', 'Apple', 'Oracle'
|
||||||
]
|
]
|
||||||
|
const apply_the_selected_configuration = () => {
|
||||||
|
//这里根据选择的配置 应用
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
send_hide_desktop,
|
send_hide_desktop,
|
||||||
hide_desktop_value,
|
hide_desktop_value,
|
||||||
|
@ -295,7 +337,10 @@ export default defineComponent({
|
||||||
medium,
|
medium,
|
||||||
save_name,
|
save_name,
|
||||||
save_cover_name,
|
save_cover_name,
|
||||||
plan_list
|
plan_list,
|
||||||
|
select_configuration,
|
||||||
|
select_configuration_name,
|
||||||
|
apply_the_selected_configuration
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -431,5 +431,12 @@ export default {
|
||||||
"line color":"line color",
|
"line color":"line color",
|
||||||
"center line color":"center line color",
|
"center line color":"center line color",
|
||||||
"center circle color":"center circle color",
|
"center circle color":"center circle color",
|
||||||
"Whether to operate synchronously":"Whether to operate synchronously"
|
"Whether to operate synchronously":"Whether to operate synchronously",
|
||||||
|
"Select saved configuration":"Select saved configuration",
|
||||||
|
"read saved configuration":"read saved configuration",
|
||||||
|
"please choose":"please choose",
|
||||||
|
"save":"save",
|
||||||
|
"Whether to save the configuration":"Whether to save the configuration",
|
||||||
|
"New Please enter a name":"New Please enter a name",
|
||||||
|
"Please select an override":"Please select an override"
|
||||||
};
|
};
|
||||||
|
|
|
@ -700,5 +700,12 @@ export default {
|
||||||
"line color":"线条颜色",
|
"line color":"线条颜色",
|
||||||
"center line color":"中心线颜色",
|
"center line color":"中心线颜色",
|
||||||
"center circle color":"中心圆颜色",
|
"center circle color":"中心圆颜色",
|
||||||
"Whether to operate synchronously":"是否同步操作"
|
"Whether to operate synchronously":"是否同步操作",
|
||||||
|
"Select saved configuration":"选择保存的配置",
|
||||||
|
"read saved configuration":"读取保存的配置",
|
||||||
|
"please choose":"请选择",
|
||||||
|
"save":"保存",
|
||||||
|
"Whether to save the configuration":"是否保存配置",
|
||||||
|
"New Please enter a name":"新建 请输入名称",
|
||||||
|
"Please select an override":"请选择覆盖"
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue