clay : 节点渲染细节处理
This commit is contained in:
parent
27b4cd4971
commit
f1317af16b
|
|
@ -182,55 +182,77 @@ export default {
|
||||||
let state = operation.state
|
let state = operation.state
|
||||||
let type = operation.operation
|
let type = operation.operation
|
||||||
//创建节点
|
//创建节点
|
||||||
if (state === 'CREATE') {
|
if (type === '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")
|
||||||
}
|
}
|
||||||
//审批通过
|
if (type === 'OPINION') {
|
||||||
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
//审批通过
|
||||||
this.$set(operation, "icon", "el-icon-check")
|
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
||||||
this.$set(operation, "color", "#0bbd87")
|
this.$set(operation, "icon", "el-icon-check")
|
||||||
this.$set(operation, "remark", ' (已同意)')
|
this.$set(operation, "color", "#0bbd87")
|
||||||
}
|
this.$set(operation, "remark", ' (已同意)')
|
||||||
if (state === 'PASS'){
|
}
|
||||||
this.$set(operation, "icon", "el-icon-more")
|
if (state === 'PASS') {
|
||||||
this.$set(operation, "color", "#c0c4cc")
|
this.$set(operation, "icon", "el-icon-more")
|
||||||
}
|
this.$set(operation, "color", "#c0c4cc")
|
||||||
//审批处理中
|
}
|
||||||
if (state === 'RUNNING') {
|
//审批处理中
|
||||||
this.$set(operation, "icon", "el-icon-loading")
|
if (state === 'RUNNING') {
|
||||||
this.$set(operation, "color", "#f78f5f")
|
this.$set(operation, "icon", "el-icon-loading")
|
||||||
this.$set(operation, "remark",' (处理中)')
|
this.$set(operation, "color", "#f78f5f")
|
||||||
}
|
this.$set(operation, "remark", ' (处理中)')
|
||||||
//回退
|
}
|
||||||
if (state === 'ROLLBACK') {
|
//回退
|
||||||
this.$set(operation, "icon", "el-icon-refresh")
|
if (state === 'ROLLBACK') {
|
||||||
this.$set(operation, "color", "#f78f5f")
|
this.$set(operation, "icon", "el-icon-refresh")
|
||||||
this.$set(operation, "remark", ' (回退成功)')
|
this.$set(operation, "color", "#f78f5f")
|
||||||
}
|
this.$set(operation, "remark", ' (回退成功)')
|
||||||
//抄送
|
}
|
||||||
if (type === 'CC') {
|
//拒绝操作
|
||||||
this.$set(operation, "icon", "el-icon-s-promotion")
|
if (state === 'REFUSE' || state === 'AUTO_REFUSE') {
|
||||||
this.$set(operation, "color", "#3395f8")
|
this.$set(operation, "icon", "el-icon-close")
|
||||||
this.$set(operation, "remark", ' (抄送成功)')
|
this.$set(operation, "color", "#f56c6c")
|
||||||
|
this.$set(operation, "remark", ' (拒绝)')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//评论
|
//评论
|
||||||
if (state === 'COMMENT') {
|
if (type === 'COMMENT') {
|
||||||
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
//评论
|
||||||
this.$set(operation, "color", "#0bbd87")
|
if (state === 'COMMENT') {
|
||||||
this.$set(operation, "remark", ' (添加了评论)')
|
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
||||||
|
this.$set(operation, "color", "#0bbd87")
|
||||||
|
this.$set(operation, "remark", ' (添加了评论)')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//拒绝后评论
|
//触发器发送http请求
|
||||||
if (state === 'REFUSE' && type === 'COMMENT') {
|
if (type === 'TRIGGER_WEBHOOK') {
|
||||||
this.$set(operation, "icon", "el-icon-chat-dot-round")
|
this.$set(operation, "icon", "el-icon-share")
|
||||||
this.$set(operation, "color", "#f56c6c")
|
if (state === 'SUCCESS') {
|
||||||
this.$set(operation, "remark", ' (填写拒绝理由)')
|
this.$set(operation, "color", "#0bbd87")
|
||||||
|
this.$set(operation, "remark", ' (成功)')
|
||||||
|
} else if (state === 'RUNNING') {
|
||||||
|
this.$set(operation, "color", "#f78f5f")
|
||||||
|
this.$set(operation, "remark", ' (成功)')
|
||||||
|
} else {
|
||||||
|
this.$set(operation, "color", "#f56c6c")
|
||||||
|
this.$set(operation, "remark", ' (失败)')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//拒绝操作
|
|
||||||
if ((state === 'REFUSE' || state === 'AUTO_REFUSE')&& type === 'OPINION') {
|
//触发器发送邮件
|
||||||
this.$set(operation, "icon", "el-icon-close")
|
if (type === 'TRIGGER_EMAIL') {
|
||||||
this.$set(operation, "color", "#f56c6c")
|
this.$set(operation, "icon", "el-icon-message")
|
||||||
this.$set(operation, "remark", ' (拒绝)')
|
if (state === 'SUCCESS') {
|
||||||
|
this.$set(operation, "color", "#0bbd87")
|
||||||
|
this.$set(operation, "remark", ' (成功)')
|
||||||
|
} else if (state === 'RUNNING') {
|
||||||
|
this.$set(operation, "color", "#f78f5f")
|
||||||
|
this.$set(operation, "remark", ' (成功)')
|
||||||
|
} else {
|
||||||
|
this.$set(operation, "color", "#f56c6c")
|
||||||
|
this.$set(operation, "remark", ' (失败)')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return operation;
|
return operation;
|
||||||
},
|
},
|
||||||
|
|
@ -243,7 +265,8 @@ export default {
|
||||||
/deep/ .el-card__body, .el-main {
|
/deep/ .el-card__body, .el-main {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
.avatar_name{
|
|
||||||
|
.avatar_name {
|
||||||
width: 45px;
|
width: 45px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -256,7 +279,8 @@ export default {
|
||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
right: 1px;
|
right: 1px;
|
||||||
}
|
}
|
||||||
.username{
|
|
||||||
|
.username {
|
||||||
width: 45px;
|
width: 45px;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue