summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts
blob: 8115a79b1408323696bf75cae68b5db3d266f129 (plain)
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
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;
    ngOnInit() {
        console.log(this.businessId, "id");
        this.getDetail()
    }

    getDetail() {
        this.myhttp.getSlicingBusinessDetail(this.businessId).subscribe(res => {
            const {result_header: {result_code}, result_body: {business_demand_info,nst_info,nsi_info} } = res;
            if (+result_code === 200) {
                // business_demand_info.coverage_area_ta_list.map((item)=>{
                //     item.replace(";","   ")
                // });
                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:{
                businessId:data.nsi_id
            }
        });
    }
}