[update] 修改bug80633
This commit is contained in:
@@ -663,7 +663,7 @@ export default {
|
|||||||
submit () {
|
submit () {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
const formInline = { ...this.formInline }
|
||||||
Object.keys(formInline).forEach(res => {
|
Object.keys(formInline).forEach(res => {
|
||||||
if (formInline[res] instanceof Array) {
|
if (formInline[res] instanceof Array) {
|
||||||
if (formInline[res][0] instanceof Object) {
|
if (formInline[res][0] instanceof Object) {
|
||||||
@@ -672,6 +672,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
formInline[res] = formInline[res].join(',')
|
formInline[res] = formInline[res].join(',')
|
||||||
}
|
}
|
||||||
|
} else if (typeof formInline[res] === 'undefined') {
|
||||||
|
// 说明是undefined,改成空字符串,为了解决下拉框改成undefined时,不会传给后端该字段,改不了下拉框值的问题
|
||||||
|
formInline[res] = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$emit('submitFormData', formInline)
|
this.$emit('submitFormData', formInline)
|
||||||
|
|||||||
Reference in New Issue
Block a user