clay : 节点渲染细节处理
This commit is contained in:
parent
a84bbbeedb
commit
92e66c2f45
|
|
@ -65,7 +65,7 @@ export default {
|
||||||
this.$set(user, "color", "#0bbd87")
|
this.$set(user, "color", "#0bbd87")
|
||||||
}
|
}
|
||||||
//审批通过
|
//审批通过
|
||||||
if (state === 'AGREE') {
|
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
||||||
this.$set(user, "icon", "el-icon-check")
|
this.$set(user, "icon", "el-icon-check")
|
||||||
this.$set(user, "color", "#0bbd87")
|
this.$set(user, "color", "#0bbd87")
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +75,7 @@ export default {
|
||||||
this.$set(user, "color", "#f78f5f")
|
this.$set(user, "color", "#f78f5f")
|
||||||
}
|
}
|
||||||
//拒绝后评论
|
//拒绝后评论
|
||||||
if (state === 'REFUSE') {
|
if (state === 'REFUSE' || state === 'AUTO_REFUSE') {
|
||||||
this.$set(user, "icon", "el-icon-close")
|
this.$set(user, "icon", "el-icon-close")
|
||||||
this.$set(user, "color", "#f56c6c")
|
this.$set(user, "color", "#f56c6c")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@
|
||||||
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
|
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="operation.operation === 'comment' || operation.operation === 'refuse'">
|
<template v-if="operation.comment">
|
||||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
||||||
<div>
|
<div>
|
||||||
{{ operation.comment.context }}
|
{{ operation.comment.context }}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px;" v-if="operation.comment.attachments.length > 0">
|
<div style="margin-top: 10px;" v-if="operation.comment.attachments && operation.comment.attachments.length > 0">
|
||||||
<template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">
|
<template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 100px; height: 100px"
|
style="width: 100px; height: 100px"
|
||||||
|
|
@ -125,11 +125,13 @@ export default {
|
||||||
for (let i = 0;i<this.operationList.length;i++) {
|
for (let i = 0;i<this.operationList.length;i++) {
|
||||||
let operationNew = this.initOperationFun(this.operationList[i])
|
let operationNew = this.initOperationFun(this.operationList[i])
|
||||||
let userList = []
|
let userList = []
|
||||||
for (let user of operationNew.userInfo) {
|
if (operationNew.userInfo){
|
||||||
let userNew = this.initUser(user)
|
for (let user of operationNew.userInfo) {
|
||||||
userList.push(userNew)
|
let userNew = this.initUser(user)
|
||||||
|
userList.push(userNew)
|
||||||
|
}
|
||||||
|
operationNew.userInfo = userList
|
||||||
}
|
}
|
||||||
operationNew.userInfo = userList
|
|
||||||
// operationListNew.push(operationNew)
|
// operationListNew.push(operationNew)
|
||||||
// this.operationList.push(operationNew)
|
// this.operationList.push(operationNew)
|
||||||
this.operationList[i] = operationNew
|
this.operationList[i] = operationNew
|
||||||
|
|
@ -138,9 +140,12 @@ export default {
|
||||||
//获取到对应附件的地址
|
//获取到对应附件的地址
|
||||||
getAttachmentList(attachments, image) {
|
getAttachmentList(attachments, image) {
|
||||||
let result = [];
|
let result = [];
|
||||||
for (let attachment of attachments) {
|
console.log(attachments)
|
||||||
if (attachment.isImage === image) {
|
if (attachments){
|
||||||
result.push(attachment)
|
for (let attachment of attachments) {
|
||||||
|
if (attachment.isImage === image) {
|
||||||
|
result.push(attachment)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -153,7 +158,7 @@ export default {
|
||||||
this.$set(user, "color", "#0bbd87")
|
this.$set(user, "color", "#0bbd87")
|
||||||
}
|
}
|
||||||
//审批通过
|
//审批通过
|
||||||
if (state === 'AGREE') {
|
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
||||||
this.$set(user, "icon", "el-icon-check")
|
this.$set(user, "icon", "el-icon-check")
|
||||||
this.$set(user, "color", "#0bbd87")
|
this.$set(user, "color", "#0bbd87")
|
||||||
}
|
}
|
||||||
|
|
@ -180,13 +185,12 @@ export default {
|
||||||
if (state === 'CREATE') {
|
if (state === 'CREATE') {
|
||||||
this.$set(operation, "icon", "el-icon-check")
|
this.$set(operation, "icon", "el-icon-check")
|
||||||
this.$set(operation, "color", "#0bbd87")
|
this.$set(operation, "color", "#0bbd87")
|
||||||
this.$set(operation, "remark", operation.userInfo.name)
|
|
||||||
}
|
}
|
||||||
//审批通过
|
//审批通过
|
||||||
if (state === 'AGREE') {
|
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
||||||
this.$set(operation, "icon", "el-icon-check")
|
this.$set(operation, "icon", "el-icon-check")
|
||||||
this.$set(operation, "color", "#0bbd87")
|
this.$set(operation, "color", "#0bbd87")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (已同意)')
|
this.$set(operation, "remark", ' (已同意)')
|
||||||
}
|
}
|
||||||
if (state === 'PASS'){
|
if (state === 'PASS'){
|
||||||
this.$set(operation, "icon", "el-icon-more")
|
this.$set(operation, "icon", "el-icon-more")
|
||||||
|
|
@ -196,31 +200,37 @@ export default {
|
||||||
if (state === 'RUNNING') {
|
if (state === 'RUNNING') {
|
||||||
this.$set(operation, "icon", "el-icon-loading")
|
this.$set(operation, "icon", "el-icon-loading")
|
||||||
this.$set(operation, "color", "#f78f5f")
|
this.$set(operation, "color", "#f78f5f")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (处理中)')
|
this.$set(operation, "remark",' (处理中)')
|
||||||
|
}
|
||||||
|
//回退
|
||||||
|
if (state === 'ROLLBACK') {
|
||||||
|
this.$set(operation, "icon", "el-icon-refresh")
|
||||||
|
this.$set(operation, "color", "#f78f5f")
|
||||||
|
this.$set(operation, "remark", ' (回退成功)')
|
||||||
}
|
}
|
||||||
//抄送
|
//抄送
|
||||||
if (type === 'CC') {
|
if (type === 'CC') {
|
||||||
this.$set(operation, "icon", "el-icon-s-promotion")
|
this.$set(operation, "icon", "el-icon-s-promotion")
|
||||||
this.$set(operation, "color", "#3395f8")
|
this.$set(operation, "color", "#3395f8")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (抄送成功)')
|
this.$set(operation, "remark", ' (抄送成功)')
|
||||||
}
|
}
|
||||||
//评论
|
//评论
|
||||||
if (state === 'COMMENT') {
|
if (state === 'COMMENT') {
|
||||||
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
||||||
this.$set(operation, "color", "#0bbd87")
|
this.$set(operation, "color", "#0bbd87")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (添加了评论)')
|
this.$set(operation, "remark", ' (添加了评论)')
|
||||||
}
|
}
|
||||||
//拒绝后评论
|
//拒绝后评论
|
||||||
if (state === 'REFUSE' && type === 'COMMENT') {
|
if (state === 'REFUSE' && type === 'COMMENT') {
|
||||||
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
||||||
this.$set(operation, "color", "#f56c6c")
|
this.$set(operation, "color", "#f56c6c")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (填写拒绝理由)')
|
this.$set(operation, "remark", ' (填写拒绝理由)')
|
||||||
}
|
}
|
||||||
//拒绝操作
|
//拒绝操作
|
||||||
if (state === 'REFUSE' && type === 'OPINION') {
|
if ((state === 'REFUSE' || state === 'AUTO_REFUSE')&& type === 'OPINION') {
|
||||||
this.$set(operation, "icon", "el-icon-close")
|
this.$set(operation, "icon", "el-icon-close")
|
||||||
this.$set(operation, "color", "#f56c6c")
|
this.$set(operation, "color", "#f56c6c")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (拒绝)')
|
this.$set(operation, "remark", ' (拒绝)')
|
||||||
}
|
}
|
||||||
return operation;
|
return operation;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue