8115a79b1408323696bf75cae68b5db3d266f129
[usecase-ui.git] /
1 import {Component, OnInit, Input} from '@angular/core';
2 import {NzModalService} from "ng-zorro-antd";
3 import {SlicingTaskServices} from '.././../../../../../core/services/slicingTaskServices';
4 import {NsiModelComponent} from "../../nsi-management/nsi-model/nsi-model.component";
5
6 @Component({
7     selector: 'app-slicing-business-model',
8     templateUrl: './slicing-business-model.component.html',
9     styleUrls: ['./slicing-business-model.component.less']
10 })
11 export class SlicingBusinessModelComponent implements OnInit {
12
13     constructor(
14         private myhttp: SlicingTaskServices,
15         private modalService: NzModalService
16     ) {
17     }
18
19     @Input() businessId;
20     businessRequirement: any[];
21     NSTinfo: any[];
22     nsiInfo: any[];
23     taskModel: boolean = false;
24     ngOnInit() {
25         console.log(this.businessId, "id");
26         this.getDetail()
27     }
28
29     getDetail() {
30         this.myhttp.getSlicingBusinessDetail(this.businessId).subscribe(res => {
31             const {result_header: {result_code}, result_body: {business_demand_info,nst_info,nsi_info} } = res;
32             if (+result_code === 200) {
33                 // business_demand_info.coverage_area_ta_list.map((item)=>{
34                 //     item.replace(";","   ")
35                 // });
36                 this.businessRequirement = [business_demand_info];
37                 this.NSTinfo = [nst_info];
38                 this.nsiInfo = [nsi_info];
39             }
40         })
41     }
42     showdetail(data) {
43         console.log(data,"data.nsi_id");
44         const nsiModal = this.modalService.create({
45             nzTitle:"Detail",
46             nzContent: NsiModelComponent,
47             nzWidth:"70%",
48             nzOkText: null,
49             nzCancelText: null,
50             nzComponentParams:{
51                 businessId:data.nsi_id
52             }
53         });
54     }
55 }