1 import { Component, OnInit } from '@angular/core';
2 import {BUSINESS_STATUS} from "../../../../../constants/constants";
3 import { SlicingTaskServices } from '.././../../../core/services/slicingTaskServices';
5 selector: 'app-csmf-slicing-business-management',
6 templateUrl: './csmf-slicing-business-management.component.html',
7 styleUrls: ['./csmf-slicing-business-management.component.less']
9 export class CsmfSlicingBusinessManagementComponent implements OnInit {
12 private myhttp: SlicingTaskServices
16 this.getCSMFBusinessList()
18 selectedValue: string = BUSINESS_STATUS[0];
19 listOfData: any[] = [];
20 pageIndex: number = 1;
21 pageSize: number = 10;
24 isSelect: boolean = false;
25 statusOptions: any[] = BUSINESS_STATUS;
26 terminateStart: boolean = false;
28 getCSMFBusinessList(){
32 status:this.selectedValue,
33 pageNo: this.pageIndex,
34 pageSize: this.pageSize
36 this.myhttp.getCSMFSlicingBusinessList(paramsObj).subscribe(res => {
37 const { result_header: { result_code }, result_body: { slicing_service_list, record_number } } = res;
39 if (+result_code === 200) {
40 this.total = record_number;
41 if(slicing_service_list !==null && slicing_service_list.length >0){
42 this.listOfData = slicing_service_list.map((item, index) => {
43 if (item.last_operation_process && item.last_operation_type && Number(item.last_operation_process) < 100) {
45 if (item.last_operation_type === 'DELETE') this.terminateStart = true;
54 getListOfProcessingStatus() {
57 this.getCSMFBusinessList();
59 searchData(reset: boolean = false) {
60 this.getCSMFBusinessList();
63 switchChange(slicing, i) {
64 console.log(slicing,i,"slicing")
67 console.log(slicing,"slicing")