feat : 审批记录打印

This commit is contained in:
2024-08-03 21:32:00 +08:00
parent 790cac67ef
commit 28257ceefe

View File

@@ -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