diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2020-02-13 21:05:21 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2020-02-13 21:05:25 +0800 |
commit | 7669d892d9032312d4f0bd6e76e630fe11a0d384 (patch) | |
tree | aeead27e096caf7c0bdd0813dc70a868d8ca57ef /usecaseui-portal/src/app/views | |
parent | c63489b9bb2071abc8180af4e53c2dcb143c127d (diff) |
feat:Modify some error messages during form submission
Change-Id: I7ec165377e66dd7a8f3c6b61873171cbd912c4e4
Issue-ID: USECASEUI-368
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts | 22 |
1 files changed, 18 insertions, 4 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 7fc95e41..28f99336 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 @@ -146,7 +146,18 @@ export class BusinessOrderComponent implements OnInit { handleCancel() { this.showModel = false; - this.cancel.emit(this.showModel) + this.cancel.emit(this.showModel); + this.slicing_order_info = { + name: null, + maxNumberofUEs: null, + expDataRateDL: null, + latency: null, + expDataRateUL: null, + resourceSharingLevel: "shared", + uEMobilityLevel: "stationary", + useInterval: null, + coverageArea: '' + }; } getRulesText = (words,title,val,index) => { @@ -156,11 +167,12 @@ export class BusinessOrderComponent implements OnInit { validator(key,val,i){ if(val === null || val.replace(/\s*/g,'').length<=0){ this.validateRules[i] = true; - this.getRulesText('Please enter',key,val,i); + this.getRulesText('Please enter',key,val,i,); return false }else { this.validateRules[i] = false; - }if(key === 'maxNumberofUEs' && !/^([1-9]\d{0,4}|100000)$/.test(val) && isNaN(val)){ + } + if(key === 'maxNumberofUEs' && !/^([1-9]\d{0,4}|100000)$/.test(val) && isNaN(val)){ this.validateRules[i] = true; this.getRulesText('Only numbers can be entered','','',i); return false @@ -206,7 +218,9 @@ export class BusinessOrderComponent implements OnInit { handleOk(): void { Object.keys(this.slicing_order_info).forEach((item,index)=>{ - this.validator(item,this.slicing_order_info[item],index) + if(item !== 'resourceSharingLevel' && item !== 'uEMobilityLevel' && item !== 'coverageArea'){ + this.validator(item,this.slicing_order_info[item],index) + } }); if(this.validateRules.indexOf(true)>-1){ return |