diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2020-01-06 15:19:42 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2020-01-06 15:19:49 +0800 |
commit | bedce39f1baa80f816839dc8fb7f393d3076231f (patch) | |
tree | 232b6aa71590c707b5d96ebb4e540764b99a2181 /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table | |
parent | 0cc1ad2b47ebde94a4954b9496c78afcae416ec9 (diff) |
feat:Optimize table filtering of slicing business page
Change-Id: If2c9967e0b742c399030228bda26f1f285653f83
Issue-ID: USECASEUI-369
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts index 030d9f56..23b8360b 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts @@ -41,6 +41,7 @@ export class SlicingBusinessTableComponent implements OnInit { getBusinessList(): void { this.loading = true; this.isSelect = false; + this.listOfData = []; let paramsObj = { pageNo: this.pageIndex, pageSize: this.pageSize @@ -54,22 +55,24 @@ export class SlicingBusinessTableComponent implements OnInit { this.loading = false; if (+result_code === 200) { this.total = record_number; - this.listOfData = slicing_business_list.map((item, index) => { - if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) { - let updata = (prodata: { operation_progress: string }) => { - item.last_operation_progress = prodata.operation_progress || item.last_operation_progress; - }; - let obj = { - serviceId: item.service_instance_id - }; - if (item.last_operation_type === 'DELETE') this.terminateStart = true; - this.queryProgress(obj, item.orchestration_status, index, updata).then((res) => { - item.last_operation_progress = '100'; - this.getBusinessList(); - }) - } - return item - }); + if(slicing_business_list !==null && slicing_business_list.length >0){ + this.listOfData = slicing_business_list.map((item, index) => { + if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) { + let updata = (prodata: { operation_progress: string }) => { + item.last_operation_progress = prodata.operation_progress || item.last_operation_progress; + }; + let obj = { + serviceId: item.service_instance_id + }; + if (item.last_operation_type === 'DELETE') this.terminateStart = true; + this.queryProgress(obj, item.orchestration_status, index, updata).then((res) => { + item.last_operation_progress = '100'; + this.getBusinessList(); + }) + } + return item + }); + } } }) } |