完成动态曲面添加
This commit is contained in:
parent
e4003940da
commit
fdeb182c75
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="row" v-show="false">
|
<div class="row" >
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2 q-px-md">
|
<div class="col-2 q-px-md">
|
||||||
<div class="col-2"> <q-select class="q-pt-md" :label="$t('point amount')"
|
<div class="col-2"> <q-select class="q-pt-md" :label="$t('point amount')"
|
||||||
|
@ -25,9 +25,12 @@
|
||||||
:options="options_value_point_amount" emit-value map-options />
|
:options="options_value_point_amount" emit-value map-options />
|
||||||
</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_control_points(Number(value_point_amount))"
|
<!-- <div class="col-1 q-pt-md "><q-btn color="white" @click="()=>{add_dialog;add_control_points(Number(value_point_amount))}"
|
||||||
|
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>
|
text-color="black" :label="$t('add control points')" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,12 +56,18 @@
|
||||||
<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>
|
||||||
<div class="col-2 q-pt-md ">
|
<!-- <div class="col-2 q-pt-md ">
|
||||||
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
|
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-1"></div>
|
||||||
|
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
|
||||||
|
:label="$t('Reset the current program control point')" /></div>
|
||||||
|
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
|
||||||
|
:label="$t('Reset all program control points')" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</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: 700px; max-width: 80vw;">
|
||||||
|
@ -75,6 +84,28 @@
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<q-dialog position="bottom" v-model="add_dialog">
|
||||||
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
|
<q-card-section>
|
||||||
|
<div class="text-h6">{{ $t('Whether to add control points') }}</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<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-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>
|
||||||
|
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
|
||||||
|
<q-btn flat :label="$t('ok')" @click="add" color="primary" v-close-popup />
|
||||||
|
</q-card-actions>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -141,8 +172,8 @@ export default defineComponent({
|
||||||
|
|
||||||
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 now_amount=ref(9)
|
||||||
const options_value_point_amount = ref(<string[]>[])
|
const options_value_point_amount = ref(<string[]>[])
|
||||||
|
|
||||||
const deepcopy = (o1: any, o2: any) => {
|
const deepcopy = (o1: any, o2: any) => {
|
||||||
|
@ -220,7 +251,11 @@ export default defineComponent({
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// watch(()=>now_amount,(newVal, oldVal)=>{
|
||||||
|
// console.log("🚀 ~ file: SurfaceCorrection.vue:244 ~ watch ~ newVal:", newVal)
|
||||||
|
|
||||||
|
// },
|
||||||
|
// { deep: true })
|
||||||
|
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
//值
|
//值
|
||||||
|
@ -379,6 +414,16 @@ export default defineComponent({
|
||||||
set?.setBlendingCorrection(row, col, 9, value_point.value.length, index + 1, Number(x), Number(y));
|
set?.setBlendingCorrection(row, col, 9, value_point.value.length, index + 1, Number(x), Number(y));
|
||||||
}
|
}
|
||||||
const resetall = () => {
|
const resetall = () => {
|
||||||
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
value.value[index].x = value.value[index].def_x
|
||||||
|
value.value[index].y = value.value[index].def_y
|
||||||
|
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
||||||
|
value_point.value[index].y = Math.trunc(tmp.y)
|
||||||
|
value_point.value[index].x = Math.trunc(tmp.x)
|
||||||
|
}
|
||||||
|
send_value(-1,0,0)
|
||||||
|
}
|
||||||
|
const resetall_all=()=>{
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
value.value[index].x = value.value[index].def_x
|
value.value[index].x = value.value[index].def_x
|
||||||
value.value[index].y = value.value[index].def_y
|
value.value[index].y = value.value[index].def_y
|
||||||
|
@ -387,6 +432,17 @@ export default defineComponent({
|
||||||
value_point.value[index].x = Math.trunc(tmp.x)
|
value_point.value[index].x = Math.trunc(tmp.x)
|
||||||
}
|
}
|
||||||
send_value(-2,0,0)
|
send_value(-2,0,0)
|
||||||
|
|
||||||
|
for (let key in config.multi_curved_surface) {
|
||||||
|
for (let index = 0; index < config.multi_curved_surface[key].length; index++) {
|
||||||
|
config.multi_curved_surface[key][index].x = config.multi_curved_surface[key][index].def_x
|
||||||
|
config.multi_curved_surface[key][index].y = config.multi_curved_surface[key][index].def_y
|
||||||
|
}
|
||||||
|
start_point(Number(key))
|
||||||
|
}
|
||||||
|
value_point_amount.value = 9
|
||||||
|
start_point(Number(9))
|
||||||
|
|
||||||
}
|
}
|
||||||
const recalculate_coordinates = () => {
|
const recalculate_coordinates = () => {
|
||||||
try {
|
try {
|
||||||
|
@ -486,6 +542,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point_amount.value = 9
|
value_point_amount.value = 9
|
||||||
amount=9
|
amount=9
|
||||||
|
now_amount.value=9
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
|
@ -506,10 +563,87 @@ export default defineComponent({
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const add=()=>{
|
||||||
|
let tmpconfig: any = null
|
||||||
|
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||||
|
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
|
let amount = now_amount.value
|
||||||
|
set?.AddBlendingCtrlPoint('9', row, col, Number(amount)).then((res) => {
|
||||||
|
if (res == null || typeof (res) == "undefined") return
|
||||||
|
let tmp = JSON.parse(res?.config);
|
||||||
|
let fortmp = null;
|
||||||
|
let i;
|
||||||
|
for (i of tmp.projectors) {
|
||||||
|
if (
|
||||||
|
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
|
||||||
|
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||||
|
) {
|
||||||
|
fortmp = JSON.parse(JSON.stringify(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ste_status.value = 1;
|
||||||
|
tmpconfig = JSON.parse(JSON.stringify(fortmp));
|
||||||
|
config = JSON.parse(JSON.stringify(fortmp));
|
||||||
|
options_value_point_amount.value = []
|
||||||
|
for (let key in tmpconfig.multi_curved_surface) {
|
||||||
|
options_value_point_amount.value.push(key)
|
||||||
|
}
|
||||||
|
|
||||||
|
value_point_amount.value = amount
|
||||||
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
|
value.value = []
|
||||||
|
value_point.value = []
|
||||||
|
for (let index = 0; index < tmpconfig.multi_curved_surface[amount].length; index++) {
|
||||||
|
let tmp: DensityCorrectionPoint = tmpconfig.multi_curved_surface[amount][index];
|
||||||
|
value.value.push(tmp)
|
||||||
|
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
|
||||||
|
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
|
||||||
|
let tmp_point: DensityCorrectionPoint = {
|
||||||
|
control_point: tmp.control_point,
|
||||||
|
x: x_y.x,
|
||||||
|
y: x_y.y,
|
||||||
|
def_x: def_x_f.x,
|
||||||
|
def_y: def_x_f.y
|
||||||
|
}
|
||||||
|
value_point.value.push(tmp_point)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
|
||||||
|
}
|
||||||
|
const preview = (val: number) => {
|
||||||
|
val = Number(val)
|
||||||
|
if(val<3)return
|
||||||
|
let width = allconfig.projector_width / (val - 1)
|
||||||
|
let height = allconfig.projector_height / (val - 1)
|
||||||
|
value.value = []
|
||||||
|
value_point.value = []
|
||||||
|
for (let index = 0; index < val; index++) {
|
||||||
|
for (let indexx = 0; indexx < val; indexx++) {
|
||||||
|
let y=allconfig.projector_height-height*index
|
||||||
|
let x=width*indexx
|
||||||
|
let tmp: DensityCorrectionPoint = {x,y,def_x:x,def_y:y,control_point:index+indexx+1};
|
||||||
|
value.value.push(tmp)
|
||||||
|
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
|
||||||
|
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
|
||||||
|
let tmp_point: DensityCorrectionPoint = {
|
||||||
|
control_point: tmp.control_point,
|
||||||
|
x: x_y.x,
|
||||||
|
y: x_y.y,
|
||||||
|
def_x: def_x_f.x,
|
||||||
|
def_y: def_x_f.y
|
||||||
|
}
|
||||||
|
value_point.value.push(tmp_point)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
now_amount.value=val**2
|
||||||
|
value_point_amount.value=val**2
|
||||||
|
options_model.value=1
|
||||||
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
options_model,
|
options_model,
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
resetall_all,
|
||||||
resetall,
|
resetall,
|
||||||
div,
|
div,
|
||||||
max,
|
max,
|
||||||
|
@ -526,7 +660,11 @@ export default defineComponent({
|
||||||
chang_point_amount,
|
chang_point_amount,
|
||||||
del_dialog,
|
del_dialog,
|
||||||
add_control_points,
|
add_control_points,
|
||||||
del_control_points
|
del_control_points,
|
||||||
|
add_dialog,
|
||||||
|
add,
|
||||||
|
now_amount,
|
||||||
|
preview
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -294,6 +294,7 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
case 'SurfaceCorrection':
|
case 'SurfaceCorrection':
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`)
|
||||||
|
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
|
||||||
break;
|
break;
|
||||||
case 'DensityCorrection':
|
case 'DensityCorrection':
|
||||||
if(child.value!.now_v_h=='vertical'){
|
if(child.value!.now_v_h=='vertical'){
|
||||||
|
@ -408,6 +409,7 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
case 'SurfaceCorrection':
|
case 'SurfaceCorrection':
|
||||||
tmp = '9'
|
tmp = '9'
|
||||||
|
set?.SetBlendingOption("blending_grids_select_point", `9:1`)
|
||||||
break;
|
break;
|
||||||
case 'DensityCorrection':
|
case 'DensityCorrection':
|
||||||
tmp = 'hor_density'
|
tmp = 'hor_density'
|
||||||
|
|
|
@ -492,5 +492,6 @@ export default {
|
||||||
"the folder name cannot start with a '.'":
|
"the folder name cannot start with a '.'":
|
||||||
"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"
|
||||||
};
|
};
|
||||||
|
|
|
@ -761,4 +761,5 @@ 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":"请输入平方数"
|
||||||
};
|
};
|
||||||
|
|
|
@ -302,6 +302,22 @@
|
||||||
class="shadow-2 text-white"
|
class="shadow-2 text-white"
|
||||||
@dragstart.prevent
|
@dragstart.prevent
|
||||||
>
|
>
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
$refs.fusion_settings_dialog.showDialog();
|
||||||
|
getconfig();
|
||||||
|
"
|
||||||
|
v-if="$store.state.custom_defines.function_fusion"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon name="open_with" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
{{ $t("fusion settings") }}
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
:disable="!$store.state.power_state"
|
:disable="!$store.state.power_state"
|
||||||
|
@ -443,22 +459,7 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
$refs.fusion_settings_dialog.showDialog();
|
|
||||||
getconfig();
|
|
||||||
"
|
|
||||||
v-if="$store.state.custom_defines.function_fusion"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-icon name="open_with" />
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
{{ $t("fusion settings") }}
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
|
@ -725,9 +726,9 @@ export default defineComponent({
|
||||||
show_device_list.value =
|
show_device_list.value =
|
||||||
typeof (<any>window).user_search?.hide_device_list == "undefined";
|
typeof (<any>window).user_search?.hide_device_list == "undefined";
|
||||||
});
|
});
|
||||||
let iswujie=ref(false)
|
let iswujie = ref(false);
|
||||||
if ((window as any).$wujie) {
|
if ((window as any).$wujie) {
|
||||||
iswujie.value=true
|
iswujie.value = true;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
getconfig,
|
getconfig,
|
||||||
|
@ -833,12 +834,12 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
console.log(w)
|
console.log(w);
|
||||||
if (w.controlLogout && typeof w.controlLogout == "function") {
|
if (w.controlLogout && typeof w.controlLogout == "function") {
|
||||||
console.log(1)
|
console.log(1);
|
||||||
w.controlLogout();
|
w.controlLogout();
|
||||||
} else {
|
} else {
|
||||||
console.log(2)
|
console.log(2);
|
||||||
Cookies.remove("auto_login");
|
Cookies.remove("auto_login");
|
||||||
SessionStorage.clear();
|
SessionStorage.clear();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue