2abe8d44fd3936ee9572a6a0ef5cd31f699ff7a2
[usecase-ui.git] /
1 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
3 @Component({
4   selector: 'app-slicing-task-model',
5   templateUrl: './slicing-task-model.component.html',
6   styleUrls: ['./slicing-task-model.component.less']
7 })
8 export class SlicingTaskModelComponent implements OnInit {
9   @Input() showDetail: boolean;
10   @Input() moduleTitle: string;
11   @Input() modelData: object;
12   @Output() cancel = new EventEmitter<boolean>();
13
14   constructor() { }
15   checkDetail: [{}] = [{
16     id: "b1bb0ce7-ebca-4fa7-95ed-4840d70a1177",
17     name: "5G Slice eMMB",
18     snssai: "1-010101",
19     arrivedtime: "2019-10-29 10:00",
20     status: "Checking"
21   }]; //配置审核详情
22   businessRequirement: [{}] = [{
23     name: "5G Slice eMMB",
24     snssai: "1-010101",
25     expiretime: "2019-10-29 10:00",
26     area: "Beijing",
27   }];//业务需求信息
28   NSTinfo: [{}] = [{
29     id: "46da8cf8-0878-48ac-bea3-f2200959411a",
30     name: "eMBB instancel"
31   }];//匹配NST信息
32   selectedServiceId = '46da8cf8-0878-48ac-bea3-f2200959411a';
33   selectedServiceName = '';
34   serviceId = ['46da8cf8-0878-48ac-bea3-f2200959411a', '46da8cf8-0878-48ac-bea3-f2200959411b', '46da8cf8-0878-48ac-bea3-f2200959411c'];
35   serviceData: {} = {
36     "46da8cf8-0878-48ac-bea3-f2200959411a": "eMBB instancela",
37     "46da8cf8-0878-48ac-bea3-f2200959411b": "eMBB instancelb",
38     "46da8cf8-0878-48ac-bea3-f2200959411c": "eMBB instancelc",
39   };
40
41   ngOnInit() {
42     this.serviceIdChange(this.selectedServiceId)
43   }
44
45   serviceIdChange(value: string): void {
46     this.selectedServiceName = this.serviceData[value];
47     console.log(this.selectedServiceName, "=====")
48   }
49   resetService() {
50     this.selectedServiceId = "";
51     this.serviceIdChange(this.selectedServiceId);
52   }
53
54   handleCancel() {
55     this.showDetail = false;
56     this.cancel.emit(this.showDetail);
57   }
58   handleOk() {
59     this.handleCancel();
60   }
61 }