summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-02-13 20:44:33 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-02-13 20:44:39 +0800
commitc63489b9bb2071abc8180af4e53c2dcb143c127d (patch)
treebb7730cb155f693e3f5b719adeec72c708ac685d /usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
parent3db71a09cb73e24eda6d36f39df2e35f123f290b (diff)
feat:Optimize code for slice ordering and business code of csmf slicing
Change-Id: I62a00ed407796434239c2089788ac47330e1c0d8 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.ts15
1 files changed, 8 insertions, 7 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 76f0bcdf..766f9ed6 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
@@ -36,14 +36,14 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
statusOptions: any[] = BUSINESS_STATUS;
// isSelect: boolean = false;
progressingTimer: any[] = [];
- terminateStart: boolean = false;
+ terminateStart: any[] = [];
businessOrderShow: boolean = false;
getCSMFBusinessList() {
this.loading = true;
// this.isSelect = false;
this.listOfData = [];
let paramsObj = {
- status: this.selectedValue,
+ status: this.selectedValue.toLocaleLowerCase(),
pageNo: this.pageIndex,
pageSize: this.pageSize
};
@@ -66,7 +66,8 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
let obj = {
serviceId: item.order_id
};
- if (item.last_operation_type === 'DELETE') this.terminateStart = true;
+ if (item.last_operation_type === 'DELETE') this.terminateStart[index] = true
+ else this.terminateStart[index] = false;
this.queryProgress(obj, index, updata).then((res) => {
item.last_operation_progress = '100';
this.getCSMFBusinessList();
@@ -143,14 +144,14 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
})
}
- terminate(slicing) {
+ terminate(slicing,index) {
console.log(slicing, "slicing");
this.modalService.confirm({
nzTitle: 'Are you sure you want to terminate this task?',
nzContent: '<b>Name:&nbsp;</b>' + slicing.order_name,
nzOnOk: () => {
let paramsObj = { serviceId: slicing.order_id };
- this.terminateStart = true;
+ this.terminateStart[index] = true;
this.loading = true;
this.myhttp.terminateSlicingService(paramsObj).subscribe(res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
@@ -158,11 +159,11 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
if (+result_code === 200) {
this.getCSMFBusinessList();
} else {
- this.terminateStart = false;
+ this.terminateStart[index] = false;
}
}, () => {
this.loading = false;
- this.terminateStart = false;
+ this.terminateStart[index] = false;
})
},
nzCancelText: 'No',