diff options
author | 2021-03-11 16:14:04 +0800 | |
---|---|---|
committer | 2021-03-11 16:15:11 +0800 | |
commit | c8053b27e26b505614d6c0f9b26804eff79936d2 (patch) | |
tree | a820e72694b48499f0602ac6ebc2ce879dd67191 /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts | |
parent | 387b2bfa70eb99535ab3148e31c9fed72c4d5e19 (diff) |
fix: fix the bug of nssi-modal
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com>
Change-Id: I21d5f4c8673bf07bc2da4ccd7bfcf50d082bf53f
Issue-ID: USECASEUI-527
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts | 125 |
1 files changed, 63 insertions, 62 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts index 5deb91b7..dd4c8126 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts @@ -1,66 +1,67 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {NzModalService, NzMessageService} from "ng-zorro-antd"; -import {SlicingTaskServices} from '.././../../../../../core/services/slicingTaskServices'; -import { SlicingBusinessModelComponent } from '../../slicing-business-management/slicing-business-model/slicing-business-model.component'; -import { NssiModelComponent } from '../../nssi-management/nssi-model/nssi-model.component'; +import { Component, Input, OnInit } from "@angular/core"; +import { NzModalService, NzMessageService } from "ng-zorro-antd"; +import { SlicingTaskServices } from ".././../../../../../core/services/slicingTaskServices"; +import { SlicingBusinessModelComponent } from "../../slicing-business-management/slicing-business-model/slicing-business-model.component"; +import { NssiModelComponent } from "../../nssi-management/nssi-model/nssi-model.component"; @Component({ - selector: 'app-nsi-model', - templateUrl: './nsi-model.component.html', - styleUrls: ['./nsi-model.component.less'] + selector: "app-nsi-model", + templateUrl: "./nsi-model.component.html", + styleUrls: ["./nsi-model.component.less"], }) export class NsiModelComponent implements OnInit { - - constructor( - private myhttp: SlicingTaskServices, - private modalService: NzModalService, - private message: NzMessageService - ) { - } - @Input() nsiId; - businessList: any[]; - nssiList: any[]; - isSpinning: boolean = true; - ngOnInit() { - this.getNsiDetail() - } - getNsiDetail() { - this.myhttp.getSlicingNsiDetail(this.nsiId).then(res => { - this.isSpinning = false; - const { result_body: {hosted_business_list,included_nssi_list} } = res; - this.businessList = hosted_business_list.map((item)=>{ - if(item.service_instance_id !==null){ - return item - } - }); - this.nssiList = included_nssi_list.map((item)=>{ - if(item.service_instance_id !==null){ - return item - } - }); - }) - } - showBusinessDetail(data){ - this.modalService.create({ - nzContent:SlicingBusinessModelComponent, - nzTitle:"Detail", - nzWidth:"70%", - nzOkText: null, - nzCancelText: null, - nzComponentParams:{ - businessId:data.service_instance_id - } - }); - } - showNssiDetail(data){ - this.modalService.create({ - nzContent:NssiModelComponent, - nzTitle:"Detail", - nzWidth:"70%", - nzOkText: null, - nzCancelText: null, - nzComponentParams:{ - nssiId:data.service_instance_id - } - }); - } + constructor( + private myhttp: SlicingTaskServices, + private modalService: NzModalService, + private message: NzMessageService + ) {} + @Input() nsiId; + businessList: any[]; + nssiList: any[]; + isSpinning: boolean = true; + ngOnInit() { + this.getNsiDetail(); + } + getNsiDetail() { + this.myhttp.getSlicingNsiDetail(this.nsiId).then((res) => { + this.isSpinning = false; + const { + result_body: { hosted_business_list, included_nssi_list }, + } = res; + this.businessList = hosted_business_list.map((item) => { + if (item.service_instance_id !== null) { + return item; + } + }); + this.nssiList = included_nssi_list.map((item) => { + if (item.service_instance_id !== null) { + return item; + } + }); + }); + } + showBusinessDetail(data) { + this.modalService.create({ + nzContent: SlicingBusinessModelComponent, + nzTitle: "Detail", + nzWidth: "70%", + nzOkText: null, + nzCancelText: null, + nzComponentParams: { + businessId: data.service_instance_id, + outerData: data, + }, + }); + } + showNssiDetail(data) { + this.modalService.create({ + nzContent: NssiModelComponent, + nzTitle: "Detail", + nzWidth: "70%", + nzOkText: null, + nzCancelText: null, + nzComponentParams: { + nssiId: data.service_instance_id, + }, + }); + } } |