|
|
|
@ -180,24 +180,11 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleResolveOption(option, taskForm, status) { |
|
|
|
handleResolveOption(option, taskForm, status) { |
|
|
|
const { column, group } = option |
|
|
|
let { column, group } = option |
|
|
|
let vars = [] |
|
|
|
let vars = [] |
|
|
|
if (status != 'todo') { // 已办,删除字段默认值 |
|
|
|
if (taskForm) { |
|
|
|
option.detail = true |
|
|
|
|
|
|
|
if (column && column.length > 0) { // 处理column |
|
|
|
|
|
|
|
column.forEach(col => this.handleResolveEvent(col)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (group && group.length > 0) { // 处理group |
|
|
|
|
|
|
|
group.forEach(gro => { |
|
|
|
|
|
|
|
if (gro.column && gro.column.length > 0) { |
|
|
|
|
|
|
|
gro.column.forEach(col => this.handleResolveEvent(col)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const columnFilter = this.filterAvueColumn(column, taskForm) |
|
|
|
const columnFilter = this.filterAvueColumn(column, taskForm) |
|
|
|
const columnArr = columnFilter.column |
|
|
|
column = columnFilter.column |
|
|
|
vars = columnFilter.vars || [] |
|
|
|
vars = columnFilter.vars || [] |
|
|
|
|
|
|
|
|
|
|
|
const groupArr = [] |
|
|
|
const groupArr = [] |
|
|
|
@ -209,21 +196,39 @@ export default { |
|
|
|
if (gro.column.length > 0) groupArr.push(gro) |
|
|
|
if (gro.column.length > 0) groupArr.push(gro) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
option.column = columnArr |
|
|
|
group = groupArr |
|
|
|
option.group = groupArr |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status != 'todo') { // 已办,删除字段默认值 |
|
|
|
|
|
|
|
option.detail = true |
|
|
|
|
|
|
|
if (column && column.length > 0) { // 处理column |
|
|
|
|
|
|
|
column.forEach(col => this.handleResolveEvent(col, taskForm)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (group && group.length > 0) { // 处理group |
|
|
|
|
|
|
|
group.forEach(gro => { |
|
|
|
|
|
|
|
if (gro.column && gro.column.length > 0) { |
|
|
|
|
|
|
|
gro.column.forEach(col => this.handleResolveEvent(col, taskForm)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
option.column = column |
|
|
|
|
|
|
|
option.group = group |
|
|
|
return { option, vars } |
|
|
|
return { option, vars } |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleResolveEvent(col) { |
|
|
|
handleResolveEvent(col, taskForm) { |
|
|
|
const _this = this |
|
|
|
const _this = this |
|
|
|
delete col.value |
|
|
|
delete col.value |
|
|
|
let event = ['change', 'blur', 'click', 'focus'] |
|
|
|
if (!taskForm) { |
|
|
|
event.forEach(e => { |
|
|
|
let event = ['change', 'blur', 'click', 'focus'] |
|
|
|
if (col[e]) col[e] = eval((col[e] + '').replace(/this/g, '_this')) |
|
|
|
event.forEach(e => { |
|
|
|
}) |
|
|
|
if (col[e]) col[e] = eval((col[e] + '').replace(/this/g, '_this')) |
|
|
|
if (col.event) Object.keys(col.event).forEach(key => col.event[key] = eval((col.event[key] + '').replace(/this/g, '_this'))) |
|
|
|
}) |
|
|
|
|
|
|
|
if (col.event) Object.keys(col.event).forEach(key => col.event[key] = eval((col.event[key] + '').replace(/this/g, '_this'))) |
|
|
|
|
|
|
|
|
|
|
|
if (col.type == 'dynamic') col.children.column.forEach(cc => _this.handleResolveEvent(cc)) |
|
|
|
} |
|
|
|
|
|
|
|
if (col.type == 'dynamic') col.children.column.forEach(cc => _this.handleResolveEvent(cc, taskForm)) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 审核 |
|
|
|
// 审核 |
|
|
|
handleExamine(pass) { |
|
|
|
handleExamine(pass) { |
|
|
|
|