summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
authorwangyuerg <wangyuerg@chinamobile.com>2020-12-07 19:18:44 +0800
committerwangyuerg <wangyuerg@chinamobile.com>2020-12-07 19:20:19 +0800
commit0c91d09baac3c4749f4aad4ec40f278240a11bf1 (patch)
treebfc63f681bd8e79b916496260446262ee0306c78 /usecaseui-portal/src/app/views
parentd8f2792db89ec0e20751be2bf6be04a2f8382b1a (diff)
fix the bug of create-model
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com> Change-Id: Ic74397429fa99ed477b9ccdfe154f0453cb7d743 Issue-ID: USECASEUI-505
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts7
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts13
2 files changed, 18 insertions, 2 deletions
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 48b2061c..9d0dd610 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
@@ -145,7 +145,12 @@ export class CreateModelComponent implements OnInit {
this.http.getTemplateParameters(types, chosedtemplates)
.subscribe((data) => {
this.loadingAnimateShow = false;
- if (data.status == "FAILED") {
+ if (!data || !data.status) {
+ this.temParametersTips = true;
+ this.isVisible = true;
+ this.msg.error('Back end data format error')
+ }
+ else if (data.status == "FAILED") {
this.temParametersTips = true;
this.isVisible = true;
} else {
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
index 649b5eb1..119f87d4 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
@@ -283,7 +283,18 @@ export class SubnetParamsModelComponent implements OnInit {
params = {...this.formData};
}
// Verify that each item is not empty, include special handeling of area_list
- if (this.Util.deepCheck(params) && this.areaCheckBeforeSubmit(params)) {
+ console.log(params)
+ let checkParams = params
+ if (this.title === 'An' || this.title === 'Cn') {
+ checkParams = this.coreFormItems.filter((item) => {
+ return item.required === true
+ })
+ } else if (this.title = 'Tn') {
+ checkParams = this.transferFormItems.filter((item) => {
+ return item.required === true
+ })
+ }
+ if (this.Util.deepCheck(checkParams) && this.areaCheckBeforeSubmit(params)) {
this.paramsDataChange.emit(params);
this.handleCancel();
} else {