diff --git a/src/views/workCenter/standardEntryOrChangeProcess/StandardEntryOrChangeProcess.vue b/src/views/workCenter/standardEntryOrChangeProcess/StandardEntryOrChangeProcess.vue index 87008b55..a7346365 100644 --- a/src/views/workCenter/standardEntryOrChangeProcess/StandardEntryOrChangeProcess.vue +++ b/src/views/workCenter/standardEntryOrChangeProcess/StandardEntryOrChangeProcess.vue @@ -718,8 +718,19 @@ export default { // 处理业务信息 this.$refs.ruleForm.validate(valid => { if (valid) { + const formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] instanceof Array) { + if (formInline[res][0] instanceof Object) { + // 说明是树选择 + formInline[res] = formInline[res].map(item => item.value).join(',') + } else { + formInline[res] = formInline[res].josn(',') + } + } + }) formData.businessInfoDTO = { - businessMap: { ...this.formInline } + businessMap: formInline } } else { flag = false @@ -746,28 +757,25 @@ export default { } return flag }, - dealBusinessData (data) { - // 下划线转驼峰 - const toHump = (name) => { - return name.replace(/\_(\w)/g, function (all, letter) { - return letter.toUpperCase() - }) - } - const resultData = {} - Object.keys(data).forEach(key => { - const newKey = toHump(key) - resultData[newKey] = data[key] - }) - return resultData - }, /** * 保存 */ handleSave () { + const formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] instanceof Array) { + if (formInline[res][0] instanceof Object) { + // 说明是树选择 + formInline[res] = formInline[res].map(item => item.value).join(',') + } else { + formInline[res] = formInline[res].join(',') + } + } + }) const formData = { basicProcessInfoDTO: Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()), // 流程信息 businessInfoDTO: { - businessMap: { ...this.formInline } + businessMap: formInline }, // 业务信息 basicTaskInfoDTO: Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()), // 流程审批信息 userInfoMap: this.$refs.personnelInfo.getDataObj() // 用户信息