diff --git a/jero-web/src/views/parameter/parameterlist/components/addModel.vue b/jero-web/src/views/parameter/parameterlist/components/addModel.vue index 38e59dbf6..84eb2b126 100644 --- a/jero-web/src/views/parameter/parameterlist/components/addModel.vue +++ b/jero-web/src/views/parameter/parameterlist/components/addModel.vue @@ -508,49 +508,38 @@ export default { this.visible = false }, handleSubmit() { - // 校验nio编号 - getAction(this.url.checkNIOnumber + `?nioNumber=${this.formInline.nioNumber}`, {} ).then((res) => { - if (res) { - this.$refs.ruleForm.validate(valid => { - if (valid) { - // this.$refs.ruleFormItem.validate(valid => { - // if (valid) { - let url = '' - let Action - this.formInline.paramsTemplateId = this.$route.query.id - if (this.formInline.id) { - url = this.url.edit - Action = postAction - } else { - url = this.url.add - Action = postAction - } - let query = JSON.parse(JSON.stringify(this.formInline)) - Object.keys(query).forEach(res => { - if (query[res] && query[res] instanceof Array) { - query[res] = query[res].join(',') - } - }) - let querycontentList = JSON.parse(JSON.stringify(this.contentList)) - query.certCategoryParamsInfoEOList = querycontentList - this.confirmLoading = true - Action(url, query).then((res) => { - if (res.success) { - this.confirmLoading = false - this.$message.success(this.$t('OperationSuccessful')) - this.visible = false - this.$emit('addModelList') - } else { - this.$message.warning(res.message) - this.confirmLoading = false - } - }) - // } - // }) + this.$refs.ruleForm.validate(valid => { + if (valid) { + let url = '' + let Action + this.formInline.paramsTemplateId = this.$route.query.id + if (this.formInline.id) { + url = this.url.edit + Action = postAction + } else { + url = this.url.add + Action = postAction + } + let query = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(query).forEach(res => { + if (query[res] && query[res] instanceof Array) { + query[res] = query[res].join(',') + } + }) + let querycontentList = JSON.parse(JSON.stringify(this.contentList)) + query.certCategoryParamsInfoEOList = querycontentList + this.confirmLoading = true + Action(url, query).then((res) => { + if (res.success) { + this.confirmLoading = false + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.$emit('addModelList') + } else { + this.$message.warning(res.message) + this.confirmLoading = false } }) - } else { - this.$message.warning(this.$t('NiOnumberalreadyexists')) } }) },