删除多余代码

This commit is contained in:
shefengchun 2023-02-02 16:21:37 +08:00
parent f44f60d038
commit 09f20b4123
2 changed files with 36 additions and 44 deletions

View File

@ -2,21 +2,30 @@
<div>
<q-list dense bordered separator>
<q-item clickable v-ripple v-for="(item, index) in data">
<q-item-section >
<DebuggingItem :name="Object.keys(item)[0]" :value="Object.values(item)[0]">
<q-item-section>
<DebuggingItem
:name="Object.keys(item)[0]"
:value="Object.values(item)[0]"
>
</DebuggingItem>
</q-item-section>
</q-item>
<q-item clickable v-ripple v-for="(item, index) in btn">
<q-item-section >
<div><q-btn color="white" text-color="black" @click="send_btn(Object.keys(item)[0])" :label="$t(btn_name(Object.keys(item)[0]))" /></div>
<q-item-section>
<div>
<q-btn
color="white"
text-color="black"
@click="send_btn(Object.keys(item)[0])"
:label="$t(btn_name(Object.keys(item)[0]))"
/>
</div>
</q-item-section>
</q-item>
</q-list>
</div>
</template>
<script lang="ts">
import {
defineComponent,
@ -38,7 +47,7 @@ export default defineComponent({
name: "Debugging",
components: {
vue3ResizeDrag,
DebuggingItem
DebuggingItem,
},
setup() {
let set = GlobalData.getInstance().getCurrentClient();
@ -46,37 +55,37 @@ export default defineComponent({
let $t = useI18n();
const data = computed(() => {
let array = [];
let tmp = JSON.parse($store.state.fusion_configuration).options
let tmp = JSON.parse($store.state.fusion_configuration).options;
for (let key in tmp) {
if (key.indexOf("@") != -1&&key.indexOf("@btn") == -1) {
array.push({ [key]: tmp[key] })
if (key.indexOf("@") != -1 && key.indexOf("@btn") == -1) {
array.push({ [key]: tmp[key] });
}
}
return array
})
return array;
});
const btn = computed(() => {
let array = [];
let tmp = JSON.parse($store.state.fusion_configuration).options
let tmp = JSON.parse($store.state.fusion_configuration).options;
for (let key in tmp) {
if (key.indexOf("@btn") != -1) {
array.push({ [key]: tmp[key] })
array.push({ [key]: tmp[key] });
}
}
return array
})
return array;
});
const btn_name=(name:string):string=>{
return name.split("@")[2]
}
const send_btn=(name:string)=>{
set?.SetBlendingOption(name,"1");
}
const btn_name = (name: string): string => {
return name.split("@")[2];
};
const send_btn = (name: string) => {
set?.SetBlendingOption(name, "1");
};
return {
btn_name,
send_btn,
data,
btn
}
}
})
btn,
};
},
});
</script>

View File

@ -230,9 +230,6 @@ export default defineComponent({
const select_configuration = ref(false)
const del_dialog = ref(false)
const select_configuration_name = ref("")
// const send_hide_desktop = () => {
// set?.SetBlendingOption(hide_desktop_value_id.value, hide_desktop_value.value ? "1" : "0");
// };
const send_disable_blending_params = () => {
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
};
@ -246,8 +243,6 @@ export default defineComponent({
const EnableBlending = ref(false);
let optionsstr = ref();
optionsstr.value = "FusionLocale";
// const hide_desktop_value_id = ref("debug@show_mask");
// const hide_desktop_value = ref(false);
const disable_blending_params_id = ref("1");
const disable_blending_params = ref(false);
const show_blending_grids_id = ref("blending_grids_show");
@ -333,7 +328,6 @@ export default defineComponent({
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");
let local_options = [
// [hide_desktop_value_id, hide_desktop_value],
[disable_blending_params_id, disable_blending_params],
[show_blending_grids_id, show_blending_grids]
];
@ -359,7 +353,6 @@ export default defineComponent({
''
]
const apply_the_selected_configuration = () => {
//
set?.ApplyBlendingScene(select_configuration_name.value).then((res) => {
let tmp = JSON.parse(res ? res.config : "");
EnableBlending.value = tmp.enable;
@ -397,14 +390,6 @@ export default defineComponent({
set?.SaveBlendingConfig(save_cover_name.value);
clear();
save_cover_name.value = save_name.value = ''
// 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");
}
@ -429,8 +414,6 @@ export default defineComponent({
del_scenes,
filterFn,
setModel,
// send_hide_desktop,
// hide_desktop_value,
send_disable_blending_params,
disable_blending_params,
send_show_blending_grids,