diff options
author | 2020-04-10 17:08:02 +0800 | |
---|---|---|
committer | 2020-04-10 17:08:09 +0800 | |
commit | 935b94e1c0f27c8cf411495ab0bc43310ae8f73b (patch) | |
tree | 4c3d693bbace04191350b181c35f6e3446fa8d2a /usecaseui-portal/src/app/views/services/services-list/create-model | |
parent | ae3914b676f32b690596c78fa622988f7ed47bf0 (diff) |
fix: Fix detail bug of service page
Change-Id: I48c77a53e3fd8911c08ef1edc688f2478677ee3d
Issue-ID: USECASEUI-369
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/services-list/create-model')
2 files changed, 8 insertions, 5 deletions
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 @@ > <div class="select-list"> <span> {{"i18nTextDefine_Customer" | translate}} : </span> - <nz-select [(ngModel)]="currentCustomer.name" nzAllowClear - (ngModelChange)="customerChange(currentCustomer)"> + <nz-select [(ngModel)]="currentCustomer.id" nzAllowClear + (ngModelChange)="customerChange(currentCustomer.id)"> <nz-option *ngFor="let item of customerList" [nzValue]="item.name" [nzLabel]="item.name"></nz-option> </nz-select> </div> 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(); } |