fix: 表单值为0时错误过滤

master
ssc 3 years ago
parent 6eec545b3b
commit 435e45da89
  1. 9
      src/views/plugin/workflow/process/components/detail.vue

@ -149,7 +149,7 @@ export default {
const { option, vars } = this.handleResolveOption(eval('(' + allForm + ')'), taskForm, status)
option.menuBtn = false
for (let key in variables) {
if (!variables[key]) delete variables[key]
if (!this.validatenull(variables[key])) delete variables[key]
}
if (option.column && process.variables && process.variables.serialNumber) {
option.column.unshift({
@ -221,13 +221,16 @@ export default {
if (valid) {
const variables = {}
this.vars.forEach(v => {
if (v != 'comment' && this.form[v]) variables[v] = this.form[v]
if (!this.validatenull(this.form[v])) {
variables[v] = this.form[v]
if (this.form[`$${v}`]) variables[`$${v}`] = this.form[`$${v}`]
}
})
this.handleCompleteTask(pass, variables).then(() => {
this.$message.success("处理成功")
this.handleCloseTag('/plugin/workflow/process/todo')
}).catch(() => {
}).catch(() => {
if (typeof done == 'function') done()
this.submitLoading = false
})

Loading…
Cancel
Save