This commit is contained in:
shefengchun 2023-02-17 09:37:37 +08:00
parent b4338153f9
commit ff00c6e652
3 changed files with 55 additions and 21 deletions

View File

@ -48,6 +48,19 @@
</div> </div>
<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 class="row" v-show="now_v_h == 'vertical'">
<div class="col-1"></div>
<div class="col-3 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
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"
:label="$t('add control points')" /></div>
<div class="col-3 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>
</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')" <div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('vertical')"
@ -62,16 +75,19 @@
</div> </div>
</div> </div>
<div class="row" v-show="now_v_h == 'vertical'">
<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('vertical point')" <div class="col-3 q-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
@update:model-value="(val) => { chang_point_amount(val, 'v') }" :dense="true" filled @update:model-value="(val) => { chang_point_amount(val, 'h') }" :dense="true" filled
v-model="value_v_point_amount" :options="options_value_v_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-px-md"><q-btn color="white" @click="add_dialog = true" text-color="black" <div class="col-3 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-px-md"><q-btn color="white" @click="() => { del_dialog = true }" <div class="col-3 q-pt-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_h_point_amount <= 5" text-color="black" :label="$t('reduce 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"> <q-select class="q-pt-md" :label="$t('level')" <div class="col-3 q-px-md"> <q-select class="q-pt-md" :label="$t('level')"
@ -86,17 +102,7 @@
</div> </div>
</div> </div>
<div class="row" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-3 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
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"
:label="$t('add control points')" /></div>
<div class="col-3 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>
</div>
<div class="row"> <div class="row">
<div class="col-1"></div> <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"

View File

@ -94,7 +94,9 @@ export default defineComponent({
return $store.state.selected_projector; return $store.state.selected_projector;
}); });
// /**
* 用于计算当前投影仪的索引
*/
let serverconfig = JSON.parse($store.state.fusion_configuration); let serverconfig = JSON.parse($store.state.fusion_configuration);
const selectedprojector = computed(() => { const selectedprojector = computed(() => {
return ( return (

View File

@ -240,6 +240,9 @@ export default defineComponent({
}; };
const now_resolution=ref(1) const now_resolution=ref(1)
// let allconfig = JSON.parse($store.state.fusion_configuration); // let allconfig = JSON.parse($store.state.fusion_configuration);
/**
* 模拟数据完成dom渲染再次获取真实后台数据
*/
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1024,\"height\": 768}]}"); let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1024,\"height\": 768}]}");
const options_resolution = computed(() => { const options_resolution = computed(() => {
let tmp=[]; let tmp=[];
@ -252,6 +255,10 @@ export default defineComponent({
return tmp return tmp
}) })
const child :any = ref(null); const child :any = ref(null);
/**
* 开启网格时发送全部参数
*
*/
const send_show_blending_grids = () => { const send_show_blending_grids = () => {
let tmp = "" let tmp = ""
switch (optionsstr.value) { switch (optionsstr.value) {
@ -303,6 +310,9 @@ export default defineComponent({
} }
}; };
/**
* 重置全部参数
*/
const resetall = () => { const resetall = () => {
set?.ResetBlendingConfig().then((res) => { set?.ResetBlendingConfig().then((res) => {
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");
@ -320,6 +330,9 @@ export default defineComponent({
options.value = tmp options.value = tmp
}, 300); }, 300);
} }
/**
* 清除sessionStorage缓存
*/
const clear_sessionStorage = () => { const clear_sessionStorage = () => {
sessionStorage.removeItem("FusionLocale"); sessionStorage.removeItem("FusionLocale");
sessionStorage.removeItem("SurfaceCorrection"); sessionStorage.removeItem("SurfaceCorrection");
@ -346,6 +359,9 @@ export default defineComponent({
optionsstr.value = newValue; optionsstr.value = newValue;
}, },
}); });
/**
* 监听是否开启融合
*/
watch( watch(
() => EnableBlending, () => EnableBlending,
(newVal, oldVal) => { (newVal, oldVal) => {
@ -355,8 +371,11 @@ export default defineComponent({
{ deep: true } { deep: true }
); );
/**
* 设置分辨率
* @param index 索引号
*/
const set_resolution=(index:number)=>{ const set_resolution=(index:number)=>{
//SetProjectorResolution
$q.loading.show({ $q.loading.show({
message: 'Loading please wait' message: 'Loading please wait'
}) })
@ -375,7 +394,9 @@ export default defineComponent({
}, 800); }, 800);
getconfig() getconfig()
} }
/**
* 监听ui切换
*/
watch(() => optionsstr, watch(() => optionsstr,
(newVal) => { (newVal) => {
let tmp = "" let tmp = ""
@ -406,6 +427,9 @@ export default defineComponent({
// //
get_scenes() get_scenes()
}; };
/**
* 读取服务器配置
*/
const getconfig = () => { const getconfig = () => {
try { try {
set?.GetBlendingConfig("").then((res) => { set?.GetBlendingConfig("").then((res) => {
@ -427,7 +451,9 @@ export default defineComponent({
options.value = "FusionLocale" options.value = "FusionLocale"
}; };
/**
* 读取服务器场景
*/
const get_scenes = () => { const get_scenes = () => {
set?.EnumBlendingScene().then((res) => { set?.EnumBlendingScene().then((res) => {
if (res == null || res.scenes.length == 0) return if (res == null || res.scenes.length == 0) return