This commit is contained in:
miao 2023-02-24 16:56:42 +08:00
commit 46dee256f3
8 changed files with 152 additions and 57 deletions

View File

@ -120,7 +120,7 @@
<q-dialog v-model="del_dialog"> <q-dialog v-model="del_dialog">
<q-card style="width: 700px; max-width: 80vw;"> <q-card style="width: 500px; max-width: 80vw;">
<q-card-section> <q-card-section>
<div class="text-h6">{{ $t('confirm delete') }}</div> <div class="text-h6">{{ $t('confirm delete') }}</div>
</q-card-section> </q-card-section>
@ -149,7 +149,7 @@
</q-card> </q-card>
</q-dialog> --> </q-dialog> -->
<q-dialog position="bottom" v-model="add_dialog"> <q-dialog position="bottom" v-model="add_dialog">
<q-card style="width: 700px; max-width: 80vw;"> <q-card style="width: 500px; max-width: 80vw;">
<q-card-section> <q-card-section>
<div class="text-h6">{{ $t('Whether to add control points') }}</div> <div class="text-h6">{{ $t('Whether to add control points') }}</div>
</q-card-section> </q-card-section>
@ -222,7 +222,7 @@ export default defineComponent({
let $store = useStore(); let $store = useStore();
let $t = useI18n(); let $t = useI18n();
const ste_status = ref(0); const ste_status = ref(0);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => { const configselsect = computed(() => {
return $store.state.selected_projector; return $store.state.selected_projector;
}); });
@ -236,9 +236,10 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1] $store.getters.GetTheCurrentlySelectedCamera[1]
); );
}); });
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const now_v_h = ref("") const now_v_h = ref("")
const value_h_point_amount = ref(5) const value_h_point_amount = ref(Number(Object.keys(config.multi_hor_density)[0]))
const value_v_point_amount = ref(5) const value_v_point_amount = ref(Number(Object.keys(config.multi_ver_density)[0]))
const add_dialog = ref(false) const add_dialog = ref(false)
const now_amount = ref(0) const now_amount = ref(0)
@ -256,9 +257,9 @@ export default defineComponent({
}; };
const use_server_config = () => { const use_server_config = () => {
value_h_point_amount.value = 5 value_h_point_amount.value = Number(Object.keys(config.multi_hor_density)[0])
value_v_point_amount.value = 5 value_v_point_amount.value = Number(Object.keys(config.multi_ver_density)[0])
let a = 5 let a = Number(Object.keys(config.multi_hor_density)[0])
value_h.value = [] value_h.value = []
value_h_point.value = [] value_h_point.value = []
for (let index = 0; index < config.multi_hor_density[a].length; index++) { for (let index = 0; index < config.multi_hor_density[a].length; index++) {
@ -557,7 +558,8 @@ export default defineComponent({
let tmp = JSON.parse($store.state.fusion_configuration).options; let tmp = JSON.parse($store.state.fusion_configuration).options;
auxiliary_line.value = tmp.blending_grids_density_assistant_lines == "1" auxiliary_line.value = tmp.blending_grids_density_assistant_lines == "1"
now_v_h.value = "level" now_v_h.value = "level"
start_point(5, 'all') start_point(Number(options_value_h_point_amount.value[0]), 'h')
start_point(Number(options_value_v_point_amount.value[0]), 'v')
if ( if (
sessionStorage.DensityCorrection && sessionStorage.DensityCorrection &&
sessionStorage.DensityCorrection.length > 0 sessionStorage.DensityCorrection.length > 0
@ -931,7 +933,7 @@ export default defineComponent({
*/ */
const details_selsect_v = (details: any) => { const details_selsect_v = (details: any) => {
let spt = details.deltaY / 100 let spt = details.deltaY / 100
if (spt < 0) { if (spt > 0) {
if (options_model_v.value >= value_v_point.value.length - 1) { if (options_model_v.value >= value_v_point.value.length - 1) {
options_model_v.value = 0 options_model_v.value = 0
} else { } else {
@ -947,7 +949,7 @@ export default defineComponent({
} }
const details_selsect_h = (details: any) => { const details_selsect_h = (details: any) => {
let spt = details.deltaY / 100 let spt = details.deltaY / 100
if (spt < 0) { if (spt > 0) {
if (options_model_h.value >= value_h_point.value.length - 1) { if (options_model_h.value >= value_h_point.value.length - 1) {
options_model_h.value = 0 options_model_h.value = 0
} else { } else {

View File

@ -62,7 +62,9 @@ import {
watch, watch,
nextTick, nextTick,
onBeforeUnmount, onBeforeUnmount,
defineExpose defineExpose,
toRefs,
inject
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@ -83,13 +85,22 @@ export default defineComponent({
components: { components: {
Vue3DraggableResizable Vue3DraggableResizable
}, },
setup() { props: {
col: {
type: String,
},
row: {
type: String,
}
},
setup(props) {
const now_selsect_projector:any = inject<string>("now_selsect_projector");
let set = GlobalData.getInstance().getCurrentClient(); let set = GlobalData.getInstance().getCurrentClient();
let $store = useStore(); let $store = useStore();
let $t = useI18n(); let $t = useI18n();
const ste_status = ref(0); const ste_status = ref(0);
let allconfig = JSON.parse($store.state.fusion_configuration); let allconfig = JSON.parse($store.state.fusion_configuration);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => { const configselsect = computed(() => {
return $store.state.selected_projector; return $store.state.selected_projector;
}); });
@ -104,7 +115,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1] $store.getters.GetTheCurrentlySelectedCamera[1]
); );
}); });
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const value_point_amount = ref(5) const value_point_amount = ref(5)
@ -227,12 +238,38 @@ export default defineComponent({
let tmp = coordinate_transformation_xy_to_value(obj_x, obj_y) let tmp = coordinate_transformation_xy_to_value(obj_x, obj_y)
value.value[index].x = Math.round(tmp.x) value.value[index].x = Math.round(tmp.x)
value.value[index].y = Math.round(tmp.y) value.value[index].y = Math.round(tmp.y)
send_value(index, Math.round(tmp.x), Math.round(tmp.y)) /**
* 判断摄像机
*/
if(now_selsect_projector?.value=='0-0'){
if(index==1||index==3){
value.value[index].x = Math.round(tmp.x)>allconfig.projector_width?allconfig.projector_width:Math.round(tmp.x)
}
}
if(now_selsect_projector?.value=='0-1'){
if(index==0||index==2){
value.value[index].x = Math.round(tmp.x)<0?0:Math.round(tmp.x)
}
}
send_value(index, value.value[index].x , value.value[index].y)
save_set_cache() save_set_cache()
} }
const chang = (index: number, $event: any, type: string) => { const chang = (index: number, $event: any, type: string) => {
index = Number(index) index = Number(index)
if (now_selsect_projector?.value == '0-0'&&props.col=='2') {
if (index == 1 || index == 3) {
value.value[index].x > allconfig.projector_width ? value.value[index].x =allconfig.projector_width : value.value[index].x
}
}
if (now_selsect_projector?.value == '0-1'&&props.col=='2') {
if (index == 0 || index == 2) {
value.value[index].x < 0 ? value.value[index].x= 0 : value.value[index].x
}
}
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y) let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
value_point.value[index].y = Math.round(tmp.y) value_point.value[index].y = Math.round(tmp.y)
value_point.value[index].x = Math.round(tmp.x) value_point.value[index].x = Math.round(tmp.x)
@ -296,6 +333,9 @@ export default defineComponent({
onMounted(() => { onMounted(() => {
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w) Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h) Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
set?.GetBlendingConfig("").then((res) => {
allconfig=JSON.parse(res?.config??"")
})
start_point() start_point()
start() start()
use_server_config() use_server_config()
@ -365,7 +405,7 @@ export default defineComponent({
*/ */
const details_selsect=(details:any) => { const details_selsect=(details:any) => {
let spt=details.deltaY/100 let spt=details.deltaY/100
if(spt<0){ if(spt>0){
if(options_model.value>=value_point.value.length-1){ if(options_model.value>=value_point.value.length-1){
options_model.value=0 options_model.value=0
}else{ }else{
@ -389,10 +429,28 @@ export default defineComponent({
switch (type) { switch (type) {
case 'x': case 'x':
if (spt < 0) { if (spt < 0) {
if(now_selsect_projector?.value=='0-0'&&props.col=='2'){
if(options_model.value==1||options_model.value==3){
value.value[options_model.value].x>allconfig.projector_width?value.value[options_model.value].x = allconfig.projector_width:value.value[options_model.value].x++
}else{
value.value[options_model.value].x++ value.value[options_model.value].x++
}
}else{
value.value[options_model.value].x++
}
} else {
if(now_selsect_projector?.value=='0-1'&&props.col=='2'){
if(options_model.value==0||options_model.value==2){
value.value[options_model.value].x <0?value.value[options_model.value].x = 0:value.value[options_model.value].x --
}else{ }else{
value.value[options_model.value].x-- value.value[options_model.value].x--
} }
}else{
value.value[options_model.value].x --
}
}
break; break;
default: default:
if (spt < 0) { if (spt < 0) {
@ -409,6 +467,7 @@ export default defineComponent({
options_model, options_model,
}); });
return { return {
now_selsect_projector,
details_selsect, details_selsect,
resetall, resetall,
div, div,

View File

@ -184,6 +184,7 @@ import {
onBeforeUnmount, onBeforeUnmount,
reactive, reactive,
onMounted, onMounted,
toRefs,
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@ -207,7 +208,7 @@ export default defineComponent({
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 }, { alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 }, { alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
]); ]);
const auto_sync = ref(false) const auto_sync = ref(true)
const auxiliary_line = ref(false) const auxiliary_line = ref(false)
const send_auxiliary_line = (val: boolean) => { const send_auxiliary_line = (val: boolean) => {
set?.SetBlendingOption("blending_grids_assistant_lines", val ? "1" : "0"); set?.SetBlendingOption("blending_grids_assistant_lines", val ? "1" : "0");
@ -258,7 +259,7 @@ export default defineComponent({
set_cache.value[selectedprojector.value] = JSON.stringify(array); set_cache.value[selectedprojector.value] = JSON.stringify(array);
}; };
let config = JSON.parse($store.state.fusion_configuration).projectors[0]; let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const configselsect = computed(() => { const configselsect = computed(() => {
return $store.state.selected_projector; return $store.state.selected_projector;
}); });
@ -390,7 +391,7 @@ export default defineComponent({
onMounted(() => { onMounted(() => {
set?.GetBlendingConfig("").then((res) => { set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");
config = tmp.projectors[0]; config = tmp.projectors[selectedprojector.value];
ste_status.value = 1; ste_status.value = 1;
startconfig(); startconfig();
setTimeout(() => { setTimeout(() => {

View File

@ -130,7 +130,7 @@ export default defineComponent({
const index = ref(0); const index = ref(0);
const color = reactive(["#ffffff", "#CCCCCC", "#000", "#000"]); const color = reactive(["#ffffff", "#CCCCCC", "#000", "#000"]);
let model = reactive([20, 40, 20]); let model = reactive([20, 40, 20]);
let options = ref([10, 20, 30, 40, 50]); let options = ref([10, 20, 30, 40, 50, 60 ,80]);
let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]); let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]);
const submit = () => { const submit = () => {
switch (index.value) { switch (index.value) {

View File

@ -26,7 +26,7 @@
</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;value_point_amount_tmp=value_point_amount }" text-color="black" <div class="col-1 q-pt-md "><q-btn color="white" @click="() => { add_dialog = true;value_point_amount_tmp=value_point_amount;now_amount= value_point_amount}" text-color="black"
:label="$t('add control points')" /></div> :label="$t('add control points')" /></div>
</div> </div>
<div class="col-2"> <div class="col-2">
@ -61,7 +61,7 @@
</div> </div>
<q-dialog v-model="del_dialog"> <q-dialog v-model="del_dialog">
<q-card style="width: 700px; max-width: 80vw;"> <q-card style="width: 500px; max-width: 80vw;">
<q-card-section> <q-card-section>
<div class="text-h6">{{ $t('confirm delete') }}</div> <div class="text-h6">{{ $t('confirm delete') }}</div>
</q-card-section> </q-card-section>
@ -78,7 +78,7 @@
<q-dialog position="bottom" v-model="add_dialog"> <q-dialog position="bottom" v-model="add_dialog">
<q-card style="width: 700px; max-width: 80vw;"> <q-card style="width: 500px; max-width: 80vw;">
<q-card-section> <q-card-section>
<div class="text-h6">{{ $t('Whether to add control points') }}</div> <div class="text-h6">{{ $t('Whether to add control points') }}</div>
</q-card-section> </q-card-section>
@ -150,7 +150,7 @@ export default defineComponent({
let $t = useI18n(); let $t = useI18n();
const ste_status = ref(0); const ste_status = ref(0);
let allconfig = JSON.parse($store.state.fusion_configuration); let allconfig = JSON.parse($store.state.fusion_configuration);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => { const configselsect = computed(() => {
return $store.state.selected_projector; return $store.state.selected_projector;
}); });
@ -163,7 +163,7 @@ export default defineComponent({
$store.getters.GetTheCurrentlySelectedCamera[1] $store.getters.GetTheCurrentlySelectedCamera[1]
); );
}); });
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
const value_point_amount = ref(9) const value_point_amount = ref(9)
const del_dialog = ref(false) const del_dialog = ref(false)
const add_dialog = ref(false) const add_dialog = ref(false)
@ -183,8 +183,8 @@ export default defineComponent({
}; };
const use_server_config = () => { const use_server_config = () => {
value_point_amount.value = 9 value_point_amount.value = Number(Object.keys(config.multi_curved_surface)[0])
let a = 9 let a = value_point_amount.value
value.value = [] value.value = []
value_point.value = [] value_point.value = []
for (let index = 0; index < config.multi_curved_surface[a].length; index++) { for (let index = 0; index < config.multi_curved_surface[a].length; index++) {
@ -360,6 +360,7 @@ export default defineComponent({
} }
value_point.value.push(tmp_point) value_point.value.push(tmp_point)
} }
save_set_cache()
} }
@ -372,9 +373,11 @@ export default defineComponent({
onMounted(() => { onMounted(() => {
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w) Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h) Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
start_point(9)
start() start()
use_server_config() use_server_config()
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
start_point(Number(options_value_point_amount.value[0]))
if ( if (
sessionStorage.SurfaceCorrection && sessionStorage.SurfaceCorrection &&
sessionStorage.SurfaceCorrection.length > 0 sessionStorage.SurfaceCorrection.length > 0
@ -382,7 +385,6 @@ export default defineComponent({
set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection); set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection);
use_set_cache(); use_set_cache();
} }
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
window.onresize = () => { window.onresize = () => {
return (() => { return (() => {
if (div != null) { if (div != null) {
@ -506,6 +508,7 @@ export default defineComponent({
value_point.value.push(tmp_point) value_point.value.push(tmp_point)
} }
}); });
save_set_cache()
} }
const del_control_points = (amount: number) => { const del_control_points = (amount: number) => {
let tmp = amount let tmp = amount
@ -536,9 +539,9 @@ export default defineComponent({
for (let key in tmpconfig.multi_curved_surface) { for (let key in tmpconfig.multi_curved_surface) {
options_value_point_amount.value.push(key) options_value_point_amount.value.push(key)
} }
value_point_amount.value = 9 value_point_amount.value = Number(options_value_point_amount.value[0])
amount = 9 amount = Number(options_value_point_amount.value[0])
now_amount.value = 9 now_amount.value = Number(options_value_point_amount.value[0])
$store.commit("setfusion_configuration", res?.config); $store.commit("setfusion_configuration", res?.config);
value.value = [] value.value = []
value_point.value = [] value_point.value = []
@ -558,6 +561,7 @@ export default defineComponent({
} }
}); });
save_set_cache()
} }
const add = () => { const add = () => {
let tmpconfig: any = null let tmpconfig: any = null
@ -605,6 +609,7 @@ export default defineComponent({
} }
}); });
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`) set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
save_set_cache()
} }
const preview = (val: number) => { const preview = (val: number) => {
val = Number(val) val = Number(val)
@ -634,6 +639,7 @@ export default defineComponent({
now_amount.value = val ** 2 now_amount.value = val ** 2
value_point_amount.value = val ** 2 value_point_amount.value = val ** 2
options_model.value = 1 options_model.value = 1
save_set_cache()
} }
/** /**
@ -642,7 +648,7 @@ export default defineComponent({
*/ */
const details_selsect=(details:any) => { const details_selsect=(details:any) => {
let spt=details.deltaY/100 let spt=details.deltaY/100
if(spt<0){ if(spt>0){
if(options_model.value>=value_point.value.length-1){ if(options_model.value>=value_point.value.length-1){
options_model.value=0 options_model.value=0
}else{ }else{

View File

@ -50,10 +50,10 @@
<div> <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) => { dialog(val,set_resolution) }" :dense="true" filled v-model="now_resolution" @update:model-value="(val) => { dialog(val,set_resolution,'resolution') }" :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) => { dialog(val,send_projectorlayout) }" :dense="true" filled v-model="now_select_projectorlayout" @update:model-value="(val) => { dialog(val,send_projectorlayout,'projector') }" :dense="true" filled v-model="now_select_projectorlayout"
:options="projectorlayout" emit-value map-options /></div> :options="projectorlayout" emit-value map-options /></div>
</div> </div>
<div class="col-12" style="text-align: center"> <div class="col-12" style="text-align: center">
@ -71,7 +71,7 @@
]" /> ]" />
</div> </div>
<div style="min-height: 72vh"> <div style="min-height: 72vh">
<component ref="child" :is="options" /> <component ref="child" :is="options" :row="config.row" :col="config.col" />
</div> </div>
</div> </div>
</div> </div>
@ -93,7 +93,7 @@
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary" <q-btn flat :label="$t('Select saved configuration')" no-caps color="primary"
@click="select_configuration = true;select_configuration_name=''; get_scenes()" /> @click="select_configuration = true;select_configuration_name=''; get_scenes()" />
<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');clear()" />
<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>
@ -167,12 +167,12 @@
<q-dialog v-model="confirm"> <q-dialog v-model="confirm">
<q-card style="width: 700px; max-width: 80vw;"> <q-card style="width: 500px; max-width: 80vw;">
<q-card-section> <q-card-section>
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div> <div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
{{ $t('Do you confirm the modification') }} {{ dialog_data.type=='resolution'?$t('Whether to modify the resolution to') + options_resolution[dialog_data.parameter].label:$t('Whether to change the projector layout to') + projectorlayout[dialog_data.parameter].label }}
</q-card-section> </q-card-section>
<q-card-actions align="right" class="bg-white text-teal"> <q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')" @click="re_match_data" color="primary" v-close-popup /> <q-btn flat :label="$t('Cancel')" @click="re_match_data" color="primary" v-close-popup />
@ -203,6 +203,7 @@ import {
computed, computed,
onMounted, onMounted,
onBeforeMount, onBeforeMount,
provide,
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useQuasar, copyToClipboard } from "quasar"; import { useQuasar, copyToClipboard } from "quasar";
@ -422,11 +423,18 @@ export default defineComponent({
case 'FourPointCalibration': case 'FourPointCalibration':
tmp = '4' tmp = '4'
set?.SetBlendingOption("blending_grids_control_point_count", `4`) set?.SetBlendingOption("blending_grids_control_point_count", `4`)
set?.SetBlendingOption("blending_grids_select_point", `4:1`)
break; break;
case 'SurfaceCorrection': case 'SurfaceCorrection':
tmp = '9' tmp = '9'
//set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`) /**
set?.SetBlendingOption("blending_grids_select_point", `9:1`) * 延迟发送不然获取不到值
*/
setTimeout(() => {
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.value_point_amount}:1`)
}, 100);
break; break;
case 'DensityCorrection': case 'DensityCorrection':
tmp = 'hor_density' tmp = 'hor_density'
@ -472,6 +480,7 @@ export default defineComponent({
} else { } else {
optionsstr.value = "FourPointCalibration"; optionsstr.value = "FourPointCalibration";
} }
now_selsect_projector.value="0-0"
}; };
/** /**
@ -509,12 +518,7 @@ export default defineComponent({
config.value.col = tmp.col; config.value.col = tmp.col;
config.value.row = tmp.row; config.value.row = tmp.row;
$store.commit("setfusion_configuration", res?.config); $store.commit("setfusion_configuration", res?.config);
optionsstr.value = "FourPointCalibration";
if(config.value.col==1&&config.value.row==1){
optionsstr.value = "FourPointCalibration"
}else{
optionsstr.value = "FusionLocale";
}
allconfig = JSON.parse($store.state.fusion_configuration); allconfig = JSON.parse($store.state.fusion_configuration);
if(allconfig.resolution){ if(allconfig.resolution){
for (let index = 0; index < allconfig.resolution.length; index++) { for (let index = 0; index < allconfig.resolution.length; index++) {
@ -618,8 +622,12 @@ export default defineComponent({
const currently_selected_projector = (value: string) => { const currently_selected_projector = (value: string) => {
set?.SetBlendingOption('blending_grids_select_projector', value); set?.SetBlendingOption('blending_grids_select_projector', value);
now_selsect_projector.value=value now_selsect_projector.value=value
}
}
/**
* 依赖注入
*/
provide("now_selsect_projector",now_selsect_projector);
/** /**
* 设置投影机布局 * 设置投影机布局
*/ */
@ -635,6 +643,12 @@ export default defineComponent({
message: 'Loading please wait' message: 'Loading please wait'
}) })
$store.commit("setfusion_configuration", res?.config); $store.commit("setfusion_configuration", res?.config);
for (let index = 0; index < projectorlayout.length; index++) {
let arr = projectorlayout[index].label.split('x');
if(tmpp.col==Number(arr[0])&&tmpp.row==Number(arr[1])){
now_select_projectorlayout.value=index
}
}
let tmp = options.value let tmp = options.value
options.value = "" options.value = ""
$store.commit("setSelectedProjector", "0/0"); $store.commit("setSelectedProjector", "0/0");
@ -673,16 +687,21 @@ export default defineComponent({
* 浅拷贝 * 浅拷贝
*/ */
const confirm=ref(false) const confirm=ref(false)
let dialog_data:any=null let dialog_data:any={parameter:"",fun:"",type:""}
const dialog=(parameter:any,fun:any)=>{ const dialog=(parameter:any,fun:any,type:string)=>{
confirm.value=true confirm.value=true
dialog_data={parameter,fun} dialog_data.parameter=parameter
dialog_data.fun=fun
dialog_data.type=type
console.log("🚀 ~ file: FusionSettingsDialog.vue:696 ~ dialog ~ type:", type)
//dialog_data={parameter,fun,type}
} }
const trigger_dialog=()=>{ const trigger_dialog=()=>{
dialog_data.fun(dialog_data.parameter) dialog_data.fun(dialog_data.parameter)
console.log(dialog_data.fun)
} }
const re_match_data=()=>{ const re_match_data=()=>{
let tmp=allconfig let tmp = JSON.parse($store.state.fusion_configuration);
for (let index = 0; index < options_resolution.value.length; index++) { for (let index = 0; index < options_resolution.value.length; index++) {
let arr = options_resolution.value[index].label.split('*'); let arr = options_resolution.value[index].label.split('*');
if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){ if(tmp.projector_width==Number(arr[0])&&tmp.projector_height==Number(arr[1])){
@ -691,12 +710,16 @@ export default defineComponent({
} }
for (let index = 0; index < projectorlayout.length; index++) { for (let index = 0; index < projectorlayout.length; index++) {
let arr = projectorlayout[index].label.split('x'); let arr = projectorlayout[index].label.split('x');
if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){ if(tmp.row==Number(arr[0])&&tmp.col==Number(arr[1])){
now_select_projectorlayout.value=index now_select_projectorlayout.value=index
} }
} }
} }
return { return {
dialog_data,
allconfig,
now_selsect_projector,
re_match_data, re_match_data,
trigger_dialog, trigger_dialog,
confirm, confirm,

View File

@ -500,5 +500,7 @@ export default {
"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", "Change projector layout": "Change projector layout",
"reset all":"reset all", "reset all":"reset all",
"Do you confirm the modification":"Do you confirm the modification" "Do you confirm the modification":"Do you confirm the modification",
"Whether to modify the resolution to":"Whether to modify the resolution to",
"Whether to change the projector layout to":"Whether to change the projector layout to"
}; };

View File

@ -767,5 +767,7 @@ export default {
"Please enter the square number":"请输入平方数", "Please enter the square number":"请输入平方数",
"Change projector layout":"更改投影机布局", "Change projector layout":"更改投影机布局",
"reset all":"重置所有", "reset all":"重置所有",
"Do you confirm the modification":"是否确认修改" "Do you confirm the modification":"是否确认修改",
"Whether to modify the resolution to":"是否将分辨率修改到",
"Whether to change the projector layout to":"是否更改投影机布局为"
}; };