From 9ec32a0245141bb1bd93ff34cfae4a7d1a5b8f80 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Mon, 25 Jan 2021 18:33:53 +0800 Subject: feat: add coverage area number Change-Id: I97fe766e3b35fd47ed7f5c802cf44916a288711b Issue-ID: USECASEUI-527 Signed-off-by: cyuamber --- usecaseui-portal/src/app/shared/utils/http.ts | 1 - .../business-order/business-order.component.html | 49 ++++++++++++---------- .../business-order/business-order.component.ts | 32 ++++++++++---- usecaseui-portal/src/constants/constants.ts | 4 ++ 4 files changed, 56 insertions(+), 30 deletions(-) (limited to 'usecaseui-portal/src') diff --git a/usecaseui-portal/src/app/shared/utils/http.ts b/usecaseui-portal/src/app/shared/utils/http.ts index 598d2afb..4f01bb8c 100644 --- a/usecaseui-portal/src/app/shared/utils/http.ts +++ b/usecaseui-portal/src/app/shared/utils/http.ts @@ -43,7 +43,6 @@ export class Http { } promise .then((response) => { - console.log(response,"------> response") if (response.status === 200 || 304) { const { result_header: { result_code, result_message } } = response.data if(+result_code === 200){ 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 be199b5e..e540c655 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 @@ -1,61 +1,68 @@ + (nzOnOk)="handleOk()" nzWidth="80%">
- + + {{ item.title }} + + {{ item.title }} + [(ngModel)]="slicing_order_info[item.key]" + [ngClass]="{'error-input-border':validateRulesShow[i] === true}" + *ngIf=" item.title === 'Communication Service Name' " + (blur)="this.Util.validator(item.title,item.key,slicing_order_info[item.key],i,rulesText,validateRulesShow)" /> + [(ngModel)]="slicing_order_info[item.key]" + [ngClass]="{'error-input-border':validateRulesShow[i] === true}" + *ngIf=" item.title !== 'Communication Service Name' && item.title !== 'Coverage Area Number'&&item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' && item.title !== 'Area' " + (blur)="this.Util.validator(item.title,item.key,slicing_order_info[item.key],i,rulesText,validateRulesShow)" + (focus)="changeTooltipText(item.title)" /> + *ngIf="item.title === 'Resource Sharing Level'"> + *ngIf="item.title === 'Mobility'"> + *ngFor="let option of item.options"> {{rulesText[i]}} + *ngIf=" item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' && item.title !== 'Area' && validateRulesShow[i]" + class="validateRules">{{rulesText[i]}} +
+ class="subnet_params_area" *ngFor="let item of area; let ind = index"> + (nzOpenChange)="handleChange(area, item)" + (ngModelChange)=" handleChangeSelected(area, item) "> 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 cac2bb29..9e31c705 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 @@ -36,7 +36,8 @@ export class BusinessOrderComponent implements OnInit { expDataRateUL: null, resourceSharingLevel: "shared", uEMobilityLevel: "stationary", - coverageArea: '' + coverageArea: '', + coverageAreaNumber: null }; areaList: any[] = []; isSpinning: boolean = false; @@ -152,7 +153,8 @@ export class BusinessOrderComponent implements OnInit { expDataRateUL: null, resourceSharingLevel: "shared", uEMobilityLevel: "stationary", - coverageArea: '' + coverageArea: '', + coverageAreaNumber: null }; } @@ -169,15 +171,21 @@ export class BusinessOrderComponent implements OnInit { } handleOk(): void { + const coverage_list: string[] = []; + let coverageAreaNumber = null; + let coverageAreas; + COMMUNICATION_FORM_ITEMS.forEach((item, index) => { - if (item.key !== 'resourceSharingLevel' && item.key !== 'uEMobilityLevel' && item.key !== 'coverageArea') { + if (item.key !== 'resourceSharingLevel' && item.key !== 'uEMobilityLevel' && item.key !== 'coverageArea' && item.key !== 'coverageAreaNumber') { this.Util.validator(item.title,item.key, this.slicing_order_info[item.key], index, this.rulesText, this.validateRulesShow) + }else if(item.key === 'coverageAreaNumber'){ + coverageAreaNumber = this.slicing_order_info[item.key] } }); if (this.validateRulesShow.indexOf(true) > -1) { return } - const coverage_list: string[] = []; + this.areaList.forEach(item => { let str = ''; item.forEach(area => { @@ -185,16 +193,24 @@ export class BusinessOrderComponent implements OnInit { }); coverage_list.push(str.substring(0, str.length - 1)); }); + if (coverage_list.length > 1) { - this.slicing_order_info.coverageArea = coverage_list.join('|') + coverageAreas = coverage_list.join('|') } else { - this.slicing_order_info.coverageArea = coverage_list.toString(); + coverageAreas = coverage_list.toString(); } - let paramsObj = { + if(coverageAreaNumber){ + this.slicing_order_info.coverageArea = `${coverageAreas}-${coverageAreaNumber}`; + }else{ + this.slicing_order_info.coverageArea = `${coverageAreas}`; + } + delete this.slicing_order_info.coverageAreaNumber + + const paramsObj = { slicing_order_info: this.slicing_order_info }; this.isSpinning = true; - let csmfSlicingPurchaseFailedCallback = () => { + const csmfSlicingPurchaseFailedCallback = () => { this.handleCancel(); this.isSpinning = false; } diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts index 48f9aeb8..f5954d00 100644 --- a/usecaseui-portal/src/constants/constants.ts +++ b/usecaseui-portal/src/constants/constants.ts @@ -554,6 +554,10 @@ export const COMMUNICATION_FORM_ITEMS = [ { title: 'Area', key: 'coverageArea' + }, + { + title: 'Coverage Area Number', + key: 'coverageAreaNumber' } ] -- cgit 1.2.3-korg