设置融合选项参数改为字符串类型
This commit is contained in:
parent
1862b885b3
commit
5f03edeb6c
|
@ -1476,8 +1476,8 @@ export default class ClientConnection {
|
|||
}
|
||||
|
||||
public async SetBlendingOption(
|
||||
id: number,
|
||||
value: number
|
||||
id: string,
|
||||
value: string
|
||||
) {
|
||||
return await this.doRpc<Protocol.NoneResponse>(
|
||||
new Protocol.SetBlendingOptionRequestEntity(
|
||||
|
|
|
@ -148,13 +148,13 @@
|
|||
show_dialog.value = true;
|
||||
};
|
||||
const send_hide_desktop = () => {
|
||||
set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0);
|
||||
set?.SetBlendingOption(hide_desktop_value_id.value, hide_desktop_value.value ? "1" : "0");
|
||||
};
|
||||
const send_disable_blending_params = () => {
|
||||
set?.SetBlendingOption(1, disable_blending_params.value ? 1 : 0);
|
||||
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
|
||||
};
|
||||
const send_show_blending_grids = () => {
|
||||
set?.SetBlendingOption(1000, show_blending_grids.value ? 1 : 0);
|
||||
set?.SetBlendingOption(show_blending_grids_id.value, show_blending_grids.value ? "1" : "0");
|
||||
};
|
||||
const resetall=()=>{
|
||||
set?.ResetBlendingConfig()
|
||||
|
@ -163,8 +163,11 @@
|
|||
const EnableBlending = ref(false);
|
||||
let optionsstr = ref();
|
||||
optionsstr.value = "FusionLocale";
|
||||
const hide_desktop_value = ref(true);
|
||||
const hide_desktop_value_id = ref("0");
|
||||
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("show_blending_grids");
|
||||
const show_blending_grids = ref(false);
|
||||
const options = computed({
|
||||
get() {
|
||||
|
@ -247,17 +250,18 @@
|
|||
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], [ref(1000), show_blending_grids] ];
|
||||
let local_options = [
|
||||
[hide_desktop_value_id, hide_desktop_value],
|
||||
[disable_blending_params_id, disable_blending_params],
|
||||
[show_blending_grids_id, show_blending_grids]
|
||||
];
|
||||
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;
|
||||
}
|
||||
let opt = tmp.options[(<any>local_opt[0].value)];
|
||||
if (opt)
|
||||
{
|
||||
local_opt[1].value = ("0" == opt || "false" == opt.toLowerCase() ? false : true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -3469,8 +3469,8 @@ export namespace Protocol {
|
|||
|
||||
export class SetBlendingOptionRequestEntity extends PacketEntity {
|
||||
constructor(
|
||||
id: number,
|
||||
value: number,
|
||||
id: string,
|
||||
value: string,
|
||||
rpc_id = 0
|
||||
) {
|
||||
super();
|
||||
|
@ -3478,10 +3478,10 @@ export namespace Protocol {
|
|||
super.flag = PacketEntity.FLAG_REQUEST;
|
||||
super.rpc_id = rpc_id;
|
||||
|
||||
this.id = id ?? 0;
|
||||
this.value = value ?? 0;
|
||||
this.id = id ?? "";
|
||||
this.value = value ?? "";
|
||||
}
|
||||
id = 0;
|
||||
value = 0;
|
||||
id;
|
||||
value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue