update 标准法规入库/变更流程
This commit is contained in:
+24
-16
@@ -718,8 +718,19 @@ export default {
|
|||||||
// 处理业务信息
|
// 处理业务信息
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (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 = {
|
formData.businessInfoDTO = {
|
||||||
businessMap: { ...this.formInline }
|
businessMap: formInline
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false
|
flag = false
|
||||||
@@ -746,28 +757,25 @@ export default {
|
|||||||
}
|
}
|
||||||
return flag
|
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 () {
|
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 = {
|
const formData = {
|
||||||
basicProcessInfoDTO: Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()), // 流程信息
|
basicProcessInfoDTO: Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()), // 流程信息
|
||||||
businessInfoDTO: {
|
businessInfoDTO: {
|
||||||
businessMap: { ...this.formInline }
|
businessMap: formInline
|
||||||
}, // 业务信息
|
}, // 业务信息
|
||||||
basicTaskInfoDTO: Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()), // 流程审批信息
|
basicTaskInfoDTO: Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()), // 流程审批信息
|
||||||
userInfoMap: this.$refs.personnelInfo.getDataObj() // 用户信息
|
userInfoMap: this.$refs.personnelInfo.getDataObj() // 用户信息
|
||||||
|
|||||||
Reference in New Issue
Block a user