更改ui 修复摄影机数量显示错误问题

This commit is contained in:
shefengchun 2023-02-23 09:35:28 +08:00
parent 1d7e4de1d1
commit 3b84db438f
1 changed files with 14 additions and 20 deletions

View File

@ -40,29 +40,27 @@
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item> @click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
</div> --> </div> -->
<div v-for="(item, index_row) in projectors_that_can_display.row"> <div v-for="(item, index_row) in 1">
<projector-item v-for="(item, index_col) in config.col" class="w-100" :llabel=" <projector-item v-for="(item, index_col) in projectors_that_can_display.col" class="w-100" :llabel="
$t('Projector') + (index_row * config.col + index_col + 1) $t('Projector') + (index_row * config.col + index_col + 1)
" :lvalue="index_row + '/' + index_col" " :lvalue="index_row + '/' + index_col"
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item> @click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
</div> </div>
<hr>
<div> <div>
<projector-item v-for="(item, index_col) in projectors_that_can_display.remain" class="w-100" :llabel="
$t('Projector') + (projectors_that_can_display.row * config.col + index_col + 1)
" :lvalue="projectors_that_can_display.row + '/' + index_col"
@click="currently_selected_projector(projectors_that_can_display.row + '-' + index_col)"></projector-item>
</div>
<div class="col-12" style="text-align: center">
{{
$t("Enable projection mode")
}}<q-checkbox v-model="EnableBlending" />
</div>
<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')" <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" @update:model-value="(val) => { send_projectorlayout(val) }" :dense="true" filled v-model="now_select_projectorlayout"
:options="projectorlayout" emit-value map-options /></div> :options="projectorlayout" emit-value map-options /></div>
</div>
<div class="col-12" style="text-align: center">
{{
$t("Enable projection mode")
}}<q-checkbox v-model="EnableBlending" />
</div>
</div> </div>
<div class="col-10"> <div class="col-10">
<div class="q-ta-md"> <div class="q-ta-md">
@ -364,7 +362,7 @@ export default defineComponent({
*/ */
watch( watch(
() => EnableBlending, () => EnableBlending,
(newVal, oldVal) => { (newVal) => {
$store.commit("setEnablefusion", newVal.value); $store.commit("setEnablefusion", newVal.value);
set?.EnableBlending(newVal.value); set?.EnableBlending(newVal.value);
}, },
@ -557,7 +555,7 @@ export default defineComponent({
getconfig() getconfig()
} }
const plan_list_op = ref(plan_list) const plan_list_op = ref(plan_list)
const filterFn = (val: any, update: any, abort: any) => { const filterFn = (val: any, update: any) => {
update(() => { update(() => {
const needle = val.toLocaleLowerCase() const needle = val.toLocaleLowerCase()
plan_list_op.value = plan_list.filter(v => v.toLocaleLowerCase().indexOf(needle) > -1) plan_list_op.value = plan_list.filter(v => v.toLocaleLowerCase().indexOf(needle) > -1)
@ -574,7 +572,6 @@ export default defineComponent({
const isdebug = computed(() => { const isdebug = computed(() => {
try { try {
let tmp = JSON.parse($store.state.fusion_configuration)
return record_times.value > 2 return record_times.value > 2
} catch (error) { } catch (error) {
@ -643,11 +640,8 @@ export default defineComponent({
*/ */
const projectors_that_can_display=computed(()=>{ const projectors_that_can_display=computed(()=>{
let allconfig = JSON.parse($store.state.fusion_configuration); let allconfig = JSON.parse($store.state.fusion_configuration);
let max = allconfig.max_projector_count let col = allconfig.projectors.length
let row = max/allconfig.row|0 return {col}
let remain=max%allconfig.row
// config_projectors
return {row,remain}
}) })
return { return {
currently_selected_projector, currently_selected_projector,