fix: Fix edit port qos policy & fip

1. fix edit port qos policy
2. fix edit fip

Change-Id: Ic16ca06fb0494b231547f886562924b5c849f6cc
This commit is contained in:
zhuyue 2021-08-31 11:41:56 +08:00 committed by hanxiang gao
parent 94b3d6ed7e
commit 5afd75a690
2 changed files with 19 additions and 8 deletions

View File

@ -42,7 +42,14 @@ export class Edit extends ModalAction {
description: this.item.description,
qos_policy_id: {
selectedRowKeys: item.qos_policy_id ? [item.qos_policy_id] : [],
selectedRows: item.qos_policy_id ? [{ name: item.qos_policy_id }] : [],
selectedRows: item.qos_policy_id
? [
{
key: item.qos_policy_id,
name: item.qos_policy_id,
},
]
: [],
},
};
}

View File

@ -70,15 +70,19 @@ export default class ModifyQoS extends ModalAction {
}
get defaultValue() {
const enableQosPolicy = this.item.qos_policy_id !== null;
return {
enableQosPolicy: this.item.qos_policy_id !== null,
enableQosPolicy,
qos_policy_id: {
selectedRowKeys: [this.item.qos_policy_id],
selectedRows: [
selectedRowKeys: enableQosPolicy ? [this.item.qos_policy_id] : [],
selectedRows: enableQosPolicy
? [
{
id: this.item.qos_policy_id,
name: this.item.qos_policy_id,
},
],
]
: [],
},
};
}