From d896c833adb8cba9525cbe34834afda8c2b13870 Mon Sep 17 00:00:00 2001 From: ssc <273702440@qq.com> Date: Tue, 8 Mar 2022 13:40:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A8=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=9D=9E=E5=BE=85=E5=8A=9E=E6=9C=AA=E5=A4=84=E7=90=86=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/process/components/detail.vue | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/views/plugin/workflow/process/components/detail.vue b/src/views/plugin/workflow/process/components/detail.vue index 306efd6..c4068e4 100644 --- a/src/views/plugin/workflow/process/components/detail.vue +++ b/src/views/plugin/workflow/process/components/detail.vue @@ -163,23 +163,13 @@ export default { if (status != 'todo') { // 已办,删除字段默认值 option.detail = true if (column && column.length > 0) { // 处理column - column.forEach(col => { - if (col.type == 'dynamic') col.children.column.forEach(cc => { - delete cc.value - }) - delete col.value - }) + 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 => { - if (col.type == 'dynamic') col.children.column.forEach(cc => { - delete cc.value - }) - delete col.value - }) + gro.column.forEach(col => this.handleResolveEvent(col)) } }) } @@ -202,6 +192,17 @@ export default { } return { option, vars } }, + handleResolveEvent(col) { + const _this = this + delete col.value + 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 (col.type == 'dynamic') col.children.column.forEach(cc => _this.handleResolveEvent(cc)) + }, // 审核 handleExamine(pass) { this.submitLoading = true