加入 投影机最大数量限制
This commit is contained in:
parent
966fe44583
commit
740ff764e5
|
@ -900,7 +900,7 @@ export default defineComponent({
|
|||
*/
|
||||
const details_selsect_v=(details:any) => {
|
||||
let spt=details.deltaY/100
|
||||
if(spt>0){
|
||||
if(spt<0){
|
||||
if(options_model_v.value>=value_v_point.value.length-1){
|
||||
options_model_v.value=0
|
||||
}else{
|
||||
|
@ -916,7 +916,7 @@ export default defineComponent({
|
|||
}
|
||||
const details_selsect_h=(details:any) => {
|
||||
let spt=details.deltaY/100
|
||||
if(spt>0){
|
||||
if(spt<0){
|
||||
if(options_model_h.value>=value_h_point.value.length-1){
|
||||
options_model_h.value=0
|
||||
}else{
|
||||
|
@ -939,7 +939,7 @@ export default defineComponent({
|
|||
let spt = details.deltaY / 100
|
||||
switch (type) {
|
||||
case 'v':
|
||||
if (spt > 0) {
|
||||
if (spt < 0) {
|
||||
value_v.value[options_model_v.value].y++
|
||||
} else {
|
||||
value_v.value[options_model_v.value].y--
|
||||
|
@ -947,7 +947,7 @@ export default defineComponent({
|
|||
chang(options_model_v.value,value_v.value[options_model_v.value].y,"v")
|
||||
break;
|
||||
default:
|
||||
if (spt > 0) {
|
||||
if (spt < 0) {
|
||||
value_h.value[options_model_h.value].x++
|
||||
} else {
|
||||
value_h.value[options_model_h.value].x--
|
||||
|
|
|
@ -364,7 +364,7 @@ export default defineComponent({
|
|||
*/
|
||||
const details_selsect=(details:any) => {
|
||||
let spt=details.deltaY/100
|
||||
if(spt>0){
|
||||
if(spt<0){
|
||||
if(options_model.value>=value_point.value.length-1){
|
||||
options_model.value=0
|
||||
}else{
|
||||
|
@ -387,14 +387,14 @@ export default defineComponent({
|
|||
let spt = details.deltaY / 100
|
||||
switch (type) {
|
||||
case 'x':
|
||||
if (spt > 0) {
|
||||
if (spt < 0) {
|
||||
value.value[options_model.value].x++
|
||||
} else {
|
||||
value.value[options_model.value].x--
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (spt > 0) {
|
||||
if (spt < 0) {
|
||||
value.value[options_model.value].y++
|
||||
} else {
|
||||
value.value[options_model.value].y--
|
||||
|
|
|
@ -639,11 +639,11 @@ export default defineComponent({
|
|||
|
||||
/**
|
||||
* 滚轮切换
|
||||
* @param details
|
||||
* @param details 鼠标返回对象
|
||||
*/
|
||||
const details_selsect=(details:any) => {
|
||||
let spt=details.deltaY/100
|
||||
if(spt>0){
|
||||
if(spt<0){
|
||||
if(options_model.value>=value_point.value.length-1){
|
||||
options_model.value=0
|
||||
}else{
|
||||
|
@ -666,14 +666,14 @@ export default defineComponent({
|
|||
let spt = details.deltaY / 100
|
||||
switch (type) {
|
||||
case 'x':
|
||||
if (spt > 0) {
|
||||
if (spt < 0) {
|
||||
value.value[options_model.value].x++
|
||||
} else {
|
||||
value.value[options_model.value].x--
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (spt > 0) {
|
||||
if (spt < 0) {
|
||||
value.value[options_model.value].y++
|
||||
} else {
|
||||
value.value[options_model.value].y--
|
||||
|
|
|
@ -33,15 +33,25 @@
|
|||
<div class="col-2" style="border-right: 1px solid #b0bec5">
|
||||
<p class="text-center">{{ $t("Projector") }}</p>
|
||||
<!-- row 在前col在后 -->
|
||||
<div v-for="(item, index_row) in config.row">
|
||||
<!-- <div v-for="(item, index_row) in config.row">
|
||||
<projector-item v-for="(item, index_col) in config.col" class="w-100" :llabel="
|
||||
$t('Projector') + (index_row * config.col + index_col + 1)
|
||||
" :lvalue="index_row + '/' + index_col"
|
||||
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
|
||||
</div> -->
|
||||
|
||||
<div v-for="(item, index_row) in projectors_that_can_display.row">
|
||||
<projector-item v-for="(item, index_col) in config.col" class="w-100" :llabel="
|
||||
$t('Projector') + (index_row * config.col + index_col + 1)
|
||||
" :lvalue="index_row + '/' + index_col"
|
||||
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
|
||||
</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")
|
||||
|
@ -57,22 +67,7 @@
|
|||
<div class="col-10">
|
||||
<div class="q-ta-md">
|
||||
<q-btn-toggle :disable="!$store.state.enablefusion" no-caps v-model="options" toggle-color="primary"
|
||||
:options="[
|
||||
{ label: $t('FusionLocale'), value: 'FusionLocale' },
|
||||
{
|
||||
label: $t('FourPointCalibration'),
|
||||
value: 'FourPointCalibration',
|
||||
},
|
||||
{
|
||||
label: $t('SurfaceCorrection'),
|
||||
value: 'SurfaceCorrection',
|
||||
},
|
||||
{
|
||||
label: $t('DensityCorrection'),
|
||||
value: 'DensityCorrection',
|
||||
},
|
||||
{ label: $t('GridSettings'), value: 'GridSettings' },
|
||||
]" />
|
||||
:options="btn_options" />
|
||||
<q-btn-toggle v-show="isdebug" no-caps v-model="options" toggle-color="primary" :options="[
|
||||
{ label: $t('debugging'), value: 'Debugging' }
|
||||
]" />
|
||||
|
@ -98,7 +93,7 @@
|
|||
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
||||
<div class="q-space" data-v-39efcd1f=""></div>
|
||||
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary"
|
||||
@click="select_configuration = true; get_scenes()" />
|
||||
@click="select_configuration = true;select_configuration_name=''; get_scenes()" />
|
||||
<q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup
|
||||
@click="$store.commit('setSelectedProjector', '0/0');" />
|
||||
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
|
||||
|
@ -210,6 +205,7 @@ import GridSettings from "src/components/FusionSettings/GridSettings.vue";
|
|||
import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue";
|
||||
import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue";
|
||||
import Debugging from "src/components/FusionSettings/Debugging.vue";
|
||||
import { number } from "yargs";
|
||||
|
||||
export default defineComponent({
|
||||
name: "ComponentFusionSettingsDialog",
|
||||
|
@ -234,6 +230,7 @@ export default defineComponent({
|
|||
};
|
||||
const select_configuration = ref(false)
|
||||
const del_dialog = ref(false)
|
||||
const config_projectors=ref(null)
|
||||
const select_configuration_name = ref("")
|
||||
const send_disable_blending_params = () => {
|
||||
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
|
||||
|
@ -430,6 +427,7 @@ export default defineComponent({
|
|||
|
||||
const save = () => {
|
||||
medium.value = true
|
||||
save_cover_name.value=''
|
||||
//读取场景
|
||||
get_scenes()
|
||||
};
|
||||
|
@ -474,6 +472,7 @@ export default defineComponent({
|
|||
setTimeout(() => {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
config_projectors.value=tmp
|
||||
let local_options = [
|
||||
[disable_blending_params_id, disable_blending_params],
|
||||
[show_blending_grids_id, show_blending_grids]
|
||||
|
@ -505,14 +504,17 @@ export default defineComponent({
|
|||
allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]};
|
||||
now_resolution.value=0
|
||||
}
|
||||
for (let index = 0; index < projectorlayout.length; index++) {
|
||||
let arr = projectorlayout[index].label.split('x');
|
||||
if(tmp.col==Number(arr[0])&&tmp.row==Number(arr[1])){
|
||||
now_select_projectorlayout.value=index
|
||||
}
|
||||
}
|
||||
});
|
||||
get_scenes()
|
||||
set?.SetBlendingOption("blending_grids_select_ui", "blending")
|
||||
optionsstr.value = "FusionLocale";
|
||||
}, 1000);
|
||||
// setTimeout(() => {
|
||||
|
||||
// }, 1000);
|
||||
});
|
||||
const save_cover_name = ref("")
|
||||
const plan_list = [
|
||||
|
@ -529,6 +531,19 @@ export default defineComponent({
|
|||
config.value.col = tmp.col;
|
||||
config.value.row = tmp.row;
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
allconfig = tmp
|
||||
for (let index = 0; index < options_resolution.value.length; index++) {
|
||||
let arr = options_resolution.value[index].label.split('*');
|
||||
if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){
|
||||
now_resolution.value=index
|
||||
}
|
||||
}
|
||||
for (let index = 0; index < projectorlayout.length; index++) {
|
||||
let arr = projectorlayout[index].label.split('x');
|
||||
if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){
|
||||
now_select_projectorlayout.value=index
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let tmp = options.value
|
||||
|
@ -574,6 +589,8 @@ export default defineComponent({
|
|||
const dialog_del_scenes = () => {
|
||||
set?.DeleteBlendingScene(name_to_be_deleted.value);
|
||||
plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1)
|
||||
name_to_be_deleted.value=''
|
||||
select_configuration_name.value=''
|
||||
}
|
||||
const now_selsect_projector=ref("0-0")
|
||||
const currently_selected_projector = (value: string) => {
|
||||
|
@ -607,6 +624,31 @@ export default defineComponent({
|
|||
getconfig()
|
||||
})
|
||||
}
|
||||
|
||||
const btn_options = computed(() => {
|
||||
let tmp=[]
|
||||
if(now_select_projectorlayout.value!=0){
|
||||
tmp.push({ label: $t.t('FusionLocale'), value: 'FusionLocale' })
|
||||
}else{
|
||||
optionsstr.value = "FourPointCalibration";
|
||||
}
|
||||
tmp.push({label: $t.t('FourPointCalibration'), value: 'FourPointCalibration'})
|
||||
tmp.push({label: $t.t('SurfaceCorrection'),value: 'SurfaceCorrection',})
|
||||
tmp.push({label: $t.t('DensityCorrection'),value: 'DensityCorrection',})
|
||||
tmp.push({ label: $t.t('GridSettings'), value: 'GridSettings' })
|
||||
return tmp
|
||||
})
|
||||
/**
|
||||
* 计算可以显示的投影机数量
|
||||
*/
|
||||
const projectors_that_can_display=computed(()=>{
|
||||
let allconfig = JSON.parse($store.state.fusion_configuration);
|
||||
let max = allconfig.max_projector_count
|
||||
let row = max/allconfig.row|0
|
||||
let remain=max%allconfig.row
|
||||
// config_projectors
|
||||
return {row,remain}
|
||||
})
|
||||
return {
|
||||
currently_selected_projector,
|
||||
name_to_be_deleted,
|
||||
|
@ -646,7 +688,9 @@ export default defineComponent({
|
|||
set_resolution,
|
||||
send_projectorlayout,
|
||||
now_select_projectorlayout,
|
||||
projectorlayout
|
||||
projectorlayout,
|
||||
btn_options,
|
||||
projectors_that_can_display
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue