[update] 配置

This commit is contained in:
zhaomeijing
2022-06-07 15:17:32 +08:00
parent 015c488a12
commit 6e2ab82ca9
@@ -508,49 +508,38 @@ export default {
this.visible = false this.visible = false
}, },
handleSubmit() { handleSubmit() {
// 校验nio编号 this.$refs.ruleForm.validate(valid => {
getAction(this.url.checkNIOnumber + `?nioNumber=${this.formInline.nioNumber}`, {} ).then((res) => { if (valid) {
if (res) { let url = ''
this.$refs.ruleForm.validate(valid => { let Action
if (valid) { this.formInline.paramsTemplateId = this.$route.query.id
// this.$refs.ruleFormItem.validate(valid => { if (this.formInline.id) {
// if (valid) { url = this.url.edit
let url = '' Action = postAction
let Action } else {
this.formInline.paramsTemplateId = this.$route.query.id url = this.url.add
if (this.formInline.id) { Action = postAction
url = this.url.edit }
Action = postAction let query = JSON.parse(JSON.stringify(this.formInline))
} else { Object.keys(query).forEach(res => {
url = this.url.add if (query[res] && query[res] instanceof Array) {
Action = postAction query[res] = query[res].join(',')
} }
let query = JSON.parse(JSON.stringify(this.formInline)) })
Object.keys(query).forEach(res => { let querycontentList = JSON.parse(JSON.stringify(this.contentList))
if (query[res] && query[res] instanceof Array) { query.certCategoryParamsInfoEOList = querycontentList
query[res] = query[res].join(',') this.confirmLoading = true
} Action(url, query).then((res) => {
}) if (res.success) {
let querycontentList = JSON.parse(JSON.stringify(this.contentList)) this.confirmLoading = false
query.certCategoryParamsInfoEOList = querycontentList this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = true this.visible = false
Action(url, query).then((res) => { this.$emit('addModelList')
if (res.success) { } else {
this.confirmLoading = false this.$message.warning(res.message)
this.$message.success(this.$t('OperationSuccessful')) this.confirmLoading = false
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
// }
// })
} }
}) })
} else {
this.$message.warning(this.$t('NiOnumberalreadyexists'))
} }
}) })
}, },