From 6e2ab82ca9fbe5e54f897e9faebf15236850de81 Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Tue, 7 Jun 2022 15:17:32 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameterlist/components/addModel.vue | 71 ++++++++----------- 1 file changed, 30 insertions(+), 41 deletions(-) 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')) } }) },