From db0ce30f2215a7983d43a86855d0a36bf0b12bc0 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Tue, 26 Jan 2021 19:22:38 +0800 Subject: feat: change the ui struc of csmf creating model Change-Id: I5963b93d6ca0ef21556da2728e39e15b8b72f260 Issue-ID: USECASEUI-531 Signed-off-by: cyuamber --- .../business-order/business-order.component.html | 29 +++++-------- .../business-order/business-order.component.ts | 1 + .../business-order/constants.ts | 47 ++++++++++++++++++---- 3 files changed, 52 insertions(+), 25 deletions(-) (limited to 'usecaseui-portal/src/app/views') diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html index e540c655..38ecbf11 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html @@ -4,48 +4,41 @@
- - {{ item.title }} - - + {{ item.title }} + *ngIf=" item.type === 'input'&&!item.scoped " + [placeholder]="item.placeholder?item.placeholder:''" + (blur)="item.required?this.Util.validator(item.title,item.key,slicing_order_info[item.key],i,rulesText,validateRulesShow):this.Util.validator()" /> - + *ngIf="item.type === 'radio'"> + *ngIf="item.type === 'select'"> - {{rulesText[i]}} + + {{rulesText[i]}} - -
+ +
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts index ef7971fd..8e58a60c 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts @@ -209,6 +209,7 @@ export class BusinessOrderComponent implements OnInit { const paramsObj = { slicing_order_info: this.slicing_order_info }; + console.log(paramsObj,"===>paramsObj") this.isSpinning = true; const csmfSlicingPurchaseFailedCallback = () => { this.handleCancel(); diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/constants.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/constants.ts index 4a42b957..4f64a5c7 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/constants.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/constants.ts @@ -1,27 +1,53 @@ export const COMMUNICATION_FORM_ITEMS = [ + /*** + title: MARK THE ITEM NAME, + key: MARK THE ITEM KEY, + type: MARKE THE ITEM TYPE, CAN BE ADDED IF NECESSARY: input/select/radio/city-select + required: IF REQUIRED, + scoped: IF SCOPED NUMBERS, CAN BE EMITTED IF NOT + placeholder: IF PLACEHOLDER, CAN BE EMITTED IF NOT + options: IF ITEM NEEDS OPTIONS, CAN BE EMITTED IF NOT + ***/ { title: 'Communication Service Name', - key: 'name' + key: 'name', + type:"input", + required:true + }, { title: 'Max Number of UEs', - key: 'maxNumberofUEs' + key: 'maxNumberofUEs', + type:"input", + scoped:true, + required:true }, { title: 'Data Rate Downlink (Mbps)', - key: 'expDataRateDL' + key: 'expDataRateDL', + type:"input", + scoped:true, + required:true }, { title: 'Latency', - key: 'latency' + key: 'latency', + type:"input", + scoped:true, + required:true }, { title: 'Data Rate Uplink (Mbps)', - key: 'expDataRateUL' + key: 'expDataRateUL', + type:"input", + scoped:true, + required:true }, { title: 'Resource Sharing Level', key: 'resourceSharingLevel', + type:"radio", + required:true, options: [ { title: 'Shared', @@ -36,6 +62,8 @@ export const COMMUNICATION_FORM_ITEMS = [ { title: 'Mobility', key: 'uEMobilityLevel', + type:"select", + required:true, options: [ { title: 'Stationary', @@ -57,11 +85,16 @@ export const COMMUNICATION_FORM_ITEMS = [ }, { title: 'Area', - key: 'coverageArea' + key: 'coverageArea', + type:"city-select", + required:true }, { title: 'Coverage Area Number', - key: 'coverageAreaNumber' + key: 'coverageAreaNumber', + type:"input", + placeholder:"Please enter the coverage area number. use , to separate them if necessary", + required:false } ] -- cgit 1.2.3-korg