diff options
author | 2020-02-05 19:57:54 +0800 | |
---|---|---|
committer | 2020-02-05 19:58:01 +0800 | |
commit | 67e32a3411851851185bdc22320687c317ea35bf (patch) | |
tree | 872757132e185add4fc8d59f4bc5bc23680e6c16 /usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts | |
parent | 5a8962154a63fbc18a7849a0184d7f10ebd7f6f6 (diff) |
feat: add CSMF slice task management interface page code
Change-Id: I88acbf7d23aed9910f4dfb3ee6e79aa4b51d9ba6
Issue-ID: USECASEUI-368
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts | 60 |
1 files changed, 57 insertions, 3 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts index dddbacf7..8b844f5f 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; - +import {BUSINESS_STATUS} from "../../../../../constants/constants"; +import { SlicingTaskServices } from '.././../../../core/services/slicingTaskServices'; @Component({ selector: 'app-csmf-slicing-business-management', templateUrl: './csmf-slicing-business-management.component.html', @@ -7,9 +8,62 @@ import { Component, OnInit } from '@angular/core'; }) export class CsmfSlicingBusinessManagementComponent implements OnInit { - constructor() { } - + constructor( + private myhttp: SlicingTaskServices + ) { + } ngOnInit() { + this.getCSMFBusinessList() } + selectedValue: string = BUSINESS_STATUS[0]; + listOfData: any[] = []; + pageIndex: number = 1; + pageSize: number = 10; + total: number = 0; + loading = false; + isSelect: boolean = false; + statusOptions: any[] = BUSINESS_STATUS; + terminateStart: boolean = false; + + getCSMFBusinessList(){ + this.loading = true; + this.listOfData = []; + let paramsObj = { + status:this.selectedValue, + pageNo: this.pageIndex, + pageSize: this.pageSize + }; + this.myhttp.getCSMFSlicingBusinessList(paramsObj).subscribe(res => { + const { result_header: { result_code }, result_body: { slicing_service_list, record_number } } = res; + this.loading = false; + if (+result_code === 200) { + this.total = record_number; + if(slicing_service_list !==null && slicing_service_list.length >0){ + this.listOfData = slicing_service_list.map((item, index) => { + if (item.last_operation_process && item.last_operation_type && Number(item.last_operation_process) < 100) { + + if (item.last_operation_type === 'DELETE') this.terminateStart = true; + } + return item + }); + } + } + }) + } + + getListOfProcessingStatus() { + this.pageIndex = 1; + this.pageSize = 10; + this.getCSMFBusinessList(); + } + searchData(reset: boolean = false) { + this.getCSMFBusinessList(); + } + switchChange(slicing, i) { + console.log(slicing,i,"slicing") + } + terminate(slicing) { + console.log(slicing,"slicing") + } } |