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