增加禁用融合参数选项
This commit is contained in:
parent
ddb5e15800
commit
ee96b91aef
|
@ -75,6 +75,9 @@
|
|||
<q-card-actions align="right">
|
||||
<span>{{ $t("Whether to hide the desktop") }}</span><q-checkbox style="justify-content: flex-start"
|
||||
v-model="hide_desktop_value" @click="send_hide_desktop" />
|
||||
<span>{{ $t("disable blending params") }}</span>
|
||||
<q-checkbox style="justify-content: flex-start"
|
||||
v-model="disable_blending_params" @click="send_disable_blending_params" />
|
||||
<div class="q-space" data-v-39efcd1f=""></div>
|
||||
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
||||
<div class="q-space" data-v-39efcd1f=""></div>
|
||||
|
@ -98,7 +101,7 @@
|
|||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
import {
|
||||
import {
|
||||
defineComponent,
|
||||
ref,
|
||||
Ref,
|
||||
|
@ -106,152 +109,168 @@ import {
|
|||
computed,
|
||||
onMounted,
|
||||
onBeforeMount,
|
||||
} from "vue";
|
||||
import { useStore } from "src/store";
|
||||
import { useQuasar, copyToClipboard } from "quasar";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import GlobalData from "src/common/GlobalData";
|
||||
import { Protocol } from "src/entities/WSProtocol";
|
||||
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
||||
} from "vue";
|
||||
import { useStore } from "src/store";
|
||||
import { useQuasar, copyToClipboard } from "quasar";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import GlobalData from "src/common/GlobalData";
|
||||
import { Protocol } from "src/entities/WSProtocol";
|
||||
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
||||
|
||||
import ProjectorItem from "src/components/FusionSettings/ProjectorItem.vue";
|
||||
import ProjectorItem from "src/components/FusionSettings/ProjectorItem.vue";
|
||||
|
||||
import FusionLocale from "src/components/FusionSettings/FusionLocale.vue";
|
||||
import FourPointCalibration from "src/components/FusionSettings/FourPointCalibration.vue";
|
||||
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 FusionLocale from "src/components/FusionSettings/FusionLocale.vue";
|
||||
import FourPointCalibration from "src/components/FusionSettings/FourPointCalibration.vue";
|
||||
import GridSettings from "src/components/FusionSettings/GridSettings.vue";
|
||||
import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue";
|
||||
import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue";
|
||||
|
||||
export default defineComponent({
|
||||
export default defineComponent({
|
||||
name: "ComponentFusionSettingsDialog",
|
||||
components: {
|
||||
ProjectorItem,
|
||||
FusionLocale,
|
||||
FourPointCalibration,
|
||||
GridSettings,
|
||||
SurfaceCorrection,
|
||||
DensityCorrection,
|
||||
ProjectorItem,
|
||||
FusionLocale,
|
||||
FourPointCalibration,
|
||||
GridSettings,
|
||||
SurfaceCorrection,
|
||||
DensityCorrection,
|
||||
},
|
||||
setup() {
|
||||
let set = GlobalData.getInstance().getCurrentClient();
|
||||
let $store = useStore();
|
||||
let $q = useQuasar();
|
||||
let $t = useI18n();
|
||||
let show_dialog = ref(false);
|
||||
const showDialog = async () => {
|
||||
show_dialog.value = true;
|
||||
};
|
||||
const send_hide_desktop = () => {
|
||||
set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0);
|
||||
};
|
||||
const resetall=()=>{
|
||||
set?.ResetBlendingConfig()
|
||||
}
|
||||
const config = ref({ col: 0, row: 0 });
|
||||
const EnableBlending = ref(false);
|
||||
let optionsstr = ref();
|
||||
optionsstr.value = "FusionLocale";
|
||||
const hide_desktop_value = ref(true);
|
||||
const hide_desktop_id = ref(0);
|
||||
const options = computed({
|
||||
get() {
|
||||
return optionsstr.value;
|
||||
},
|
||||
set(newValue) {
|
||||
optionsstr.value = newValue;
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => EnableBlending,
|
||||
(newVal, oldVal) => {
|
||||
$store.commit("setEnablefusion", newVal.value);
|
||||
set?.EnableBlending(newVal.value);
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const erroe = () => {
|
||||
$q.notify({
|
||||
color: "negative",
|
||||
icon: "warning",
|
||||
message: "数据获取失败!",
|
||||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
};
|
||||
const save = () => {
|
||||
set?.SaveBlendingConfig("");
|
||||
show_dialog.value = false;
|
||||
clear();
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
EnableBlending.value = tmp.enable;
|
||||
$store.commit("setEnablefusion", tmp.enable);
|
||||
config.value.col = tmp.col;
|
||||
config.value.row = tmp.row;
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
$store.commit("setSelectedProjector", "0/0");
|
||||
};
|
||||
const getconfig = () => {
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
$store.commit("setEnablefusion", tmp.enable);
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
} catch (error) { }
|
||||
};
|
||||
const clear = () => {
|
||||
$store.commit("setSelectedProjector", "0/0");
|
||||
setTimeout(() => {
|
||||
sessionStorage.removeItem("FusionLocale");
|
||||
sessionStorage.removeItem("SurfaceCorrection");
|
||||
sessionStorage.removeItem("DensityCorrection");
|
||||
sessionStorage.removeItem("FourPointCalibration");
|
||||
}, 500);
|
||||
getconfig();
|
||||
};
|
||||
|
||||
onBeforeMount(() => {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
EnableBlending.value = tmp.enable;
|
||||
$store.commit("setEnablefusion", tmp.enable);
|
||||
config.value.col = tmp.col;
|
||||
config.value.row = tmp.row;
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
} catch (error) {
|
||||
erroe();
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
hide_desktop_id.value = tmp.options[0][0];
|
||||
hide_desktop_value.value = tmp.options[0][1] == 0 ? false : true;
|
||||
//console.log(tmp.options[0][1])
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
return {
|
||||
send_hide_desktop,
|
||||
hide_desktop_value,
|
||||
clear,
|
||||
show_dialog,
|
||||
options,
|
||||
copyToClipboard,
|
||||
showDialog,
|
||||
EnableBlending,
|
||||
config,
|
||||
save,
|
||||
resetall
|
||||
};
|
||||
let set = GlobalData.getInstance().getCurrentClient();
|
||||
let $store = useStore();
|
||||
let $q = useQuasar();
|
||||
let $t = useI18n();
|
||||
let show_dialog = ref(false);
|
||||
const showDialog = async () => {
|
||||
show_dialog.value = true;
|
||||
};
|
||||
const send_hide_desktop = () => {
|
||||
set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0);
|
||||
};
|
||||
const send_disable_blending_params = () => {
|
||||
set?.SetBlendingOption(1, disable_blending_params.value ? 1 : 0);
|
||||
};
|
||||
const resetall=()=>{
|
||||
set?.ResetBlendingConfig()
|
||||
}
|
||||
const config = ref({ col: 0, row: 0 });
|
||||
const EnableBlending = ref(false);
|
||||
let optionsstr = ref();
|
||||
optionsstr.value = "FusionLocale";
|
||||
const hide_desktop_value = ref(true);
|
||||
const disable_blending_params = ref(false);
|
||||
const options = computed({
|
||||
get() {
|
||||
return optionsstr.value;
|
||||
},
|
||||
});
|
||||
set(newValue) {
|
||||
optionsstr.value = newValue;
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => EnableBlending,
|
||||
(newVal, oldVal) => {
|
||||
$store.commit("setEnablefusion", newVal.value);
|
||||
set?.EnableBlending(newVal.value);
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const erroe = () => {
|
||||
$q.notify({
|
||||
color: "negative",
|
||||
icon: "warning",
|
||||
message: "数据获取失败!",
|
||||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
};
|
||||
const save = () => {
|
||||
set?.SaveBlendingConfig("");
|
||||
show_dialog.value = false;
|
||||
clear();
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
EnableBlending.value = tmp.enable;
|
||||
$store.commit("setEnablefusion", tmp.enable);
|
||||
config.value.col = tmp.col;
|
||||
config.value.row = tmp.row;
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
$store.commit("setSelectedProjector", "0/0");
|
||||
};
|
||||
const getconfig = () => {
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
$store.commit("setEnablefusion", tmp.enable);
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
} catch (error) { }
|
||||
};
|
||||
const clear = () => {
|
||||
$store.commit("setSelectedProjector", "0/0");
|
||||
setTimeout(() => {
|
||||
sessionStorage.removeItem("FusionLocale");
|
||||
sessionStorage.removeItem("SurfaceCorrection");
|
||||
sessionStorage.removeItem("DensityCorrection");
|
||||
sessionStorage.removeItem("FourPointCalibration");
|
||||
}, 500);
|
||||
getconfig();
|
||||
};
|
||||
|
||||
onBeforeMount(() => {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
EnableBlending.value = tmp.enable;
|
||||
$store.commit("setEnablefusion", tmp.enable);
|
||||
config.value.col = tmp.col;
|
||||
config.value.row = tmp.row;
|
||||
$store.commit("setfusion_configuration", res?.config);
|
||||
});
|
||||
} catch (error) {
|
||||
erroe();
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
set?.GetBlendingConfig("").then((res) => {
|
||||
let tmp = JSON.parse(res ? res.config : "");
|
||||
//console.log(tmp.options[0][1])
|
||||
let local_options = [ [ref(0), hide_desktop_value], [ref(1), disable_blending_params] ];
|
||||
let k:any;
|
||||
for(k in local_options) {
|
||||
let local_opt = local_options[k];
|
||||
let ii:any;
|
||||
for(ii in tmp.options){
|
||||
let opt = tmp.options[ii];
|
||||
if (2 == opt.length && local_opt[0].value == opt[0]){
|
||||
local_opt[1].value = (opt[1] == 0 ? false : true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
return {
|
||||
send_hide_desktop,
|
||||
hide_desktop_value,
|
||||
send_disable_blending_params,
|
||||
disable_blending_params,
|
||||
clear,
|
||||
show_dialog,
|
||||
options,
|
||||
copyToClipboard,
|
||||
showDialog,
|
||||
EnableBlending,
|
||||
config,
|
||||
save,
|
||||
resetall
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -657,7 +657,7 @@ export namespace Protocol {
|
|||
Commands.kSaveBlendingConfig,
|
||||
Commands.kSetBlendingHorDensity,
|
||||
Commands.kSetBlendingVerDensity,
|
||||
Commands.kResetBlending,
|
||||
Commands.kResetBlending,
|
||||
Commands.kSetBlendingOption,
|
||||
]);
|
||||
public static get AllCommands() {
|
||||
|
|
|
@ -426,4 +426,5 @@ export default {
|
|||
"Whether to enable integration":"Whether to enable integration",
|
||||
"Whether to hide the desktop":"Whether to hide the desktop",
|
||||
"resetall config":"resetall config",
|
||||
"disable blending params":"Dsable blending params",
|
||||
};
|
||||
|
|
|
@ -695,4 +695,5 @@ export default {
|
|||
"Whether to enable integration":"是否启用融合",
|
||||
"Whether to hide the desktop":"是否隐藏桌面",
|
||||
"resetall config":"重置所有配置",
|
||||
"disable blending params":"禁用融合参数",
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue