|
|
|
|
@ -80,18 +80,17 @@ export default { |
|
|
|
|
// if ((this.process.isOwner && this.process.status == 'todo') || !this.process.hasOwnProperty('isOwner')) c = { readable: true, writable: true }
|
|
|
|
|
// else c = { readable: true, writable: false }
|
|
|
|
|
// }
|
|
|
|
|
let event = ['change', 'blur', 'click', 'focus'] |
|
|
|
|
if (!isExForm) { // 非外置表单 处理事件
|
|
|
|
|
let event = ['change', 'blur', 'click', 'focus'] |
|
|
|
|
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 (c.writable) { // 可写,记录需要提交的字段、处理字段默认值
|
|
|
|
|
vars.push(col[props.prop]) |
|
|
|
|
if (col.value) col.value = _this.getDefaultValues(col.value) |
|
|
|
|
|
|
|
|
|
if (!isExForm) { // 非外置表单 处理事件
|
|
|
|
|
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'))) |
|
|
|
|
} |
|
|
|
|
} else { // 不可写,清除校验、默认值、事件
|
|
|
|
|
} else { // 不可写,清除校验、默认值
|
|
|
|
|
if (col.type == 'dynamic') { |
|
|
|
|
col.children.addBtn = false |
|
|
|
|
col.children.delBtn = false |
|
|
|
|
@ -101,8 +100,8 @@ export default { |
|
|
|
|
} |
|
|
|
|
delete col.rules |
|
|
|
|
delete col.value |
|
|
|
|
delete col.event |
|
|
|
|
event.forEach(e => delete col[e]) |
|
|
|
|
// delete col.event
|
|
|
|
|
// event.forEach(e => delete col[e])
|
|
|
|
|
} |
|
|
|
|
if (col.type == 'dynamic') { // 处理子表单
|
|
|
|
|
col.children.column = _this.filterAvueColumn(col.children.column, taskForm).column |
|
|
|
|
|