From 935b94e1c0f27c8cf411495ab0bc43310ae8f73b Mon Sep 17 00:00:00 2001 From: cyuamber Date: Fri, 10 Apr 2020 17:08:02 +0800 Subject: fix: Fix detail bug of service page Change-Id: I48c77a53e3fd8911c08ef1edc688f2478677ee3d Issue-ID: USECASEUI-369 Signed-off-by: cyuamber --- .../services-list/create-model/create-model.component.html | 4 ++-- .../services-list/create-model/create-model.component.ts | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'usecaseui-portal/src/app/views/services/services-list/create-model') diff --git a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html index cbc5f3e3..3d65623e 100644 --- a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html +++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html @@ -6,8 +6,8 @@ >
{{"i18nTextDefine_Customer" | translate}} : - +
diff --git a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts index cf7404d8..48b2061c 100644 --- a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts @@ -42,12 +42,13 @@ export class CreateModelComponent implements OnInit { this.getAlltemplates(); } - getServiceType(): void{ + getServiceType() { this.http.getServiceTypes(this.currentCustomer) .subscribe((data) => { this.serviceTypes = data.map((item) => { return { name: item["service-type"] } }); + this.currentServiceType = this.serviceTypes[0] }) } @@ -89,8 +90,10 @@ export class CreateModelComponent implements OnInit { this.loadingAnimateShow = false; } - customerChange(value): void { - this.currentCustomer = value; + customerChange(id): void { + this.currentCustomer = this.customerList.find(item=>{ + return item.id === id + }); this.getServiceType(); } -- cgit 1.2.3-korg