diff options
author | 2021-03-11 09:40:01 +0800 | |
---|---|---|
committer | 2021-03-11 09:40:28 +0800 | |
commit | 2ddfe6c8f2c8f2d472a1e1756bd3491cb6550149 (patch) | |
tree | 68de7f68b1a0a4f47530a4421bf712011308296f /usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model | |
parent | 55802952c883c2eddd78c6e2566eda992c0d9937 (diff) |
feat:Logic plus protection
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com>
Change-Id: Ifdeb26671445944bbf7a4fc6c5e551636bb13dd2
Issue-ID: USECASEUI-527
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts index 83d16a62..310a1cb9 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts @@ -128,21 +128,23 @@ export class SubnetParamsModelComponent implements OnInit { } addCheckStatus() { - this.connectionLinkTable.forEach((item) => { - if ( - item.hasOwnProperty("linkId") && - typeof this.formData["sliceProfile_TN_connection_links"] !== - "undefined" && - this.formData["sliceProfile_TN_connection_links"] !== "" && - this.formData["sliceProfile_TN_connection_links"] !== null && - item["linkId"] === - this.formData["sliceProfile_TN_connection_links"] - ) { - item.checked = true; - } else { - item.checked = false; - } - }); + if(this.connectionLinkTable && this.connectionLinkTable.length>0){ + this.connectionLinkTable.forEach((item) => { + if ( + item.hasOwnProperty("linkId") && + typeof this.formData["sliceProfile_TN_connection_links"] !== + "undefined" && + this.formData["sliceProfile_TN_connection_links"] !== "" && + this.formData["sliceProfile_TN_connection_links"] !== null && + item["linkId"] === + this.formData["sliceProfile_TN_connection_links"] + ) { + item.checked = true; + } else { + item.checked = false; + } + }); + } } // changeResourceShare() { @@ -218,6 +220,7 @@ export class SubnetParamsModelComponent implements OnInit { getTableHeader(): void { // Find the common key of all data + if(this.connectionLinkTable && this.connectionLinkTable.length>0){ let keyList: any[] = this.connectionLinkTable.map((item) => { return Object.keys(item); }); @@ -250,6 +253,7 @@ export class SubnetParamsModelComponent implements OnInit { } } }); + } } pageIndexChange(e) { |