diff options
author | 2021-01-25 18:33:53 +0800 | |
---|---|---|
committer | 2021-01-25 18:34:02 +0800 | |
commit | 9ec32a0245141bb1bd93ff34cfae4a7d1a5b8f80 (patch) | |
tree | 6cf234739ba3caf9eae7fd15c2fef85ec5c5e33c /usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts | |
parent | 73b5dcc7bbed03dfc45aae64e18e00bf3a9c3eb1 (diff) |
feat: add coverage area number
Change-Id: I97fe766e3b35fd47ed7f5c802cf44916a288711b
Issue-ID: USECASEUI-527
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts | 32 |
1 files changed, 24 insertions, 8 deletions
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; } |