From 28257ceefeae85c796accd852863eba54e885a69 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sat, 3 Aug 2024 21:32:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E5=AE=A1=E6=89=B9=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/common/OperationRender.vue | 46 +------------------ 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/src/views/workflow/common/OperationRender.vue b/src/views/workflow/common/OperationRender.vue index ff86294..b78ed11 100644 --- a/src/views/workflow/common/OperationRender.vue +++ b/src/views/workflow/common/OperationRender.vue @@ -184,18 +184,7 @@ const init = () => { } // let operationListNew = [] for (let i = 0; i < props.operationList?.length; i++) { - let operationNew = initOperationFun(props.operationList[i]) - let userList = [] - if (operationNew.userInfo) { - for (let user of operationNew.userInfo) { - let userNew = initUser(user, operationNew.operation) - userList.push(userNew) - } - operationNew.userInfo = userList - } - // operationListNew.push(operationNew) - // this.operationList.push(operationNew) - props.operationList[i] = operationNew + props.operationList[i] = initOperationFun(props.operationList[i]) } } //获取到对应附件的地址 @@ -212,39 +201,6 @@ const getAttachmentList = (attachments, image) => { return result; } -const initUser = (user, type) => { - let state = user.state - //创建节点 - if (state === 'CREATE') { - user["icon"] = 'CircleCheckFilled' - user["color"] = "#0bbd87" - } - //审批通过 - if (state === 'AGREE' || state === 'AUTO_PASS') { - user["icon"] = 'CircleCheckFilled' - user["color"] = "#0bbd87" - } - if (type === "CC") { - user["icon"] = "Promotion" - user["color"] = "#3395f8" - } - //审批处理中 - if (state === 'RUNNING') { - user["icon"] = 'Loading' - user["color"] = "#f78f5f" - user["class"] = 'is-loading' - } - //拒绝后评论 - if (state === 'REFUSE') { - user["icon"] = 'Close' - user["color"] = "#f56c6c" - } - if (state === 'PASS') { - user["icon"] = 'MoreFilled' - user["color"] = "#c0c4cc" - } - return user; -} const initOperationFun = (operation) => { let state = operation.state