加入投影机布局选择

This commit is contained in:
shefengchun 2023-02-21 17:10:54 +08:00
parent fdeb182c75
commit 6c304fdfe6
6 changed files with 128 additions and 95 deletions

View File

@ -1565,7 +1565,7 @@ export default class ClientConnection {
public async SetProjectorLayout(row: number, column: number) { public async SetProjectorLayout(row: number, column: number) {
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>( return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
new Protocol.SetProjectorResolutionRequestEntity(row, column) new Protocol.SetProjectorLayoutRequestEntity(row, column)
); );
} }

View File

@ -26,18 +26,13 @@
</div> </div>
</div> </div>
<div class="col-2"> <div class="col-2">
<div class="col-1 q-pt-md "><q-btn color="white" @click="() => { add_dialog = true }" text-color="black"
<!-- <div class="col-1 q-pt-md "><q-btn color="white" @click="()=>{add_dialog;add_control_points(Number(value_point_amount))}" :label="$t('add control points')" /></div>
text-color="black" :label="$t('add control points')" /></div> -->
<div class="col-1 q-pt-md "><q-btn color="white" @click="()=>{add_dialog=true}"
text-color="black" :label="$t('add control points')" /></div>
</div> </div>
<div class="col-2"> <div class="col-2">
<div class="col-1 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }" :disable="value_point_amount<=9" text-color="black" <div class="col-1 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:label="$t('reduce control points')" /></div> :disable="value_point_amount <= 9" text-color="black" :label="$t('reduce control points')" /></div>
</div> </div>
</div> </div>
@ -47,12 +42,11 @@
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
map-options /></div> map-options /></div>
<div class="col-2 q-px-md"> <q-input v-if="value[options_model]" filled type="number" class="q-pt-md" :dense="true" <div class="col-2 q-px-md"> <q-input v-if="value[options_model]" filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].x" @update:model-value="chang(options_model, $event, 'h')" label="x" v-model="value[options_model].x" @update:model-value="chang(options_model, $event, 'h')" label="x" lazy-rules />
lazy-rules />
</div> </div>
<div class="col-2 q-px-md"><q-input v-if="value[options_model]" filled type="number" class="q-pt-md" :dense="true" <div class="col-2 q-px-md"><q-input v-if="value[options_model]" filled type="number" class="q-pt-md" :dense="true"
v-model="value[options_model].y" @update:model-value="chang(options_model, $event, 'h')" label="y" v-model="value[options_model].y" @update:model-value="chang(options_model, $event, 'h')" label="y" lazy-rules />
lazy-rules /></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>
@ -93,9 +87,13 @@
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<div class="row"> <div class="row">
<div class="col-10"><q-input filled v-model="now_amount" min="3" disable type="number" :label="$t('Please enter the points you need to add')" @update:model-value="(val:any)=>{preview(val)}" /></div> <div class="col-10"><q-input filled v-model="now_amount" min="3" disable type="number"
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↑" @click="()=>{preview(Math.sqrt(now_amount)+1)}" /> </div> :label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { preview(val) }" />
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↓" @click="()=>{preview(Math.sqrt(now_amount)-1)}"/></div> </div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↑"
@click="() => { preview(Math.sqrt(now_amount) + 1) }" /> </div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↓"
@click="() => { preview(Math.sqrt(now_amount) - 1) }" /></div>
</div> </div>
</q-card-section> </q-card-section>
@ -105,7 +103,6 @@
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<style scoped> <style scoped>

View File

@ -50,6 +50,9 @@
<div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('change resolution')" <div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('change resolution')"
@update:model-value="(val) => { set_resolution(val) }" :dense="true" filled v-model="now_resolution" @update:model-value="(val) => { set_resolution(val) }" :dense="true" filled v-model="now_resolution"
:options="options_resolution" emit-value map-options /></div> :options="options_resolution" emit-value map-options /></div>
<div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('Change projector layout')"
@update:model-value="(val) => { send_projectorlayout(val) }" :dense="true" filled v-model="now_select_projectorlayout"
:options="projectorlayout" emit-value map-options /></div>
</div> </div>
<div class="col-10"> <div class="col-10">
<div class="q-ta-md"> <div class="q-ta-md">
@ -345,7 +348,7 @@ export default defineComponent({
const config = ref({ col: 0, row: 0 }); const config = ref({ col: 0, row: 0 });
const EnableBlending = ref(false); const EnableBlending = ref(false);
let optionsstr = ref(); let optionsstr = ref();
optionsstr.value = "FusionLocale"; optionsstr.value = "";
const disable_blending_params_id = ref("blending@disable_blending_params"); const disable_blending_params_id = ref("blending@disable_blending_params");
const disable_blending_params = ref(false); const disable_blending_params = ref(false);
const show_blending_grids_id = ref("blending_grids_show"); const show_blending_grids_id = ref("blending_grids_show");
@ -448,7 +451,7 @@ export default defineComponent({
setTimeout(() => { setTimeout(() => {
clear_sessionStorage() clear_sessionStorage()
}, 500); }, 500);
getconfig() //getconfig()
options.value = "FusionLocale" options.value = "FusionLocale"
}; };
@ -500,6 +503,7 @@ export default defineComponent({
}); });
get_scenes() get_scenes()
set?.SetBlendingOption("blending_grids_select_ui", "blending") set?.SetBlendingOption("blending_grids_select_ui", "blending")
optionsstr.value = "FusionLocale";
}, 1000); }, 1000);
}); });
const save_cover_name = ref("") const save_cover_name = ref("")
@ -568,6 +572,33 @@ export default defineComponent({
set?.SetBlendingOption('blending_grids_select_projector', value); set?.SetBlendingOption('blending_grids_select_projector', value);
now_selsect_projector.value=value now_selsect_projector.value=value
} }
/**
* 设置投影机布局
*/
const projectorlayout=[{label:'1x1',value:0},{label:'1x2',value:1}]
const now_select_projectorlayout=ref(1)
const send_projectorlayout=(val:number) => {
let arr = projectorlayout[val].label.split('x');
set?.SetProjectorLayout(Number(arr[0]),Number(arr[1])).then(res => {
let tmpp=JSON.parse(res!.config)
config.value.row = tmpp.row;
config.value.col = tmpp.col;
$q.loading.show({
message: 'Loading please wait'
})
$store.commit("setfusion_configuration", res?.config);
let tmp = options.value
options.value = ""
$store.commit("setSelectedProjector", "0/0");
setTimeout(() => {
clear_sessionStorage()
options.value = tmp
$q.loading.hide()
}, 800);
getconfig()
})
}
return { return {
currently_selected_projector, currently_selected_projector,
name_to_be_deleted, name_to_be_deleted,
@ -604,7 +635,10 @@ export default defineComponent({
child, child,
options_resolution, options_resolution,
now_resolution, now_resolution,
set_resolution set_resolution,
send_projectorlayout,
now_select_projectorlayout,
projectorlayout
}; };
}, },
}); });

View File

@ -3703,7 +3703,7 @@ export namespace Protocol {
export class SetProjectorLayoutRequestEntity extends PacketEntity { export class SetProjectorLayoutRequestEntity extends PacketEntity {
constructor(row: number, column: number, rpc_id = 0) { constructor(row: number, column: number, rpc_id = 0) {
super(); super();
super.command = Commands.kSetProjectorResolution; super.command = Commands.kSetProjectorLayout;
super.flag = PacketEntity.FLAG_REQUEST; super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id; super.rpc_id = rpc_id;

View File

@ -493,5 +493,6 @@ export default {
"The Folder Name Cannot Start With a '.'", "The Folder Name Cannot Start With a '.'",
"change resolution":"change resolution", "change resolution":"change resolution",
"Loading please wait":"Loading please wait", "Loading please wait":"Loading please wait",
"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"
}; };

View File

@ -761,5 +761,6 @@ export default {
"Version Mismatch !": "版本不匹配!", "Version Mismatch !": "版本不匹配!",
"Version Mismatch ! Please Upgrade The Software Again ! Otherwise, The File Function Cannot Be Used !": "Version Mismatch ! Please Upgrade The Software Again ! Otherwise, The File Function Cannot Be Used !":
"版本不匹配!请重新升级软件!否则文件功能无法正常使用!", "版本不匹配!请重新升级软件!否则文件功能无法正常使用!",
"Please enter the square number":"请输入平方数" "Please enter the square number":"请输入平方数",
"Change projector layout":"更改投影机布局"
}; };