clay : 节点渲染细节处理

This commit is contained in:
clay 2023-03-22 14:24:02 +08:00
parent 27b4cd4971
commit f1317af16b
1 changed files with 68 additions and 44 deletions

View File

@ -182,17 +182,18 @@ export default {
let state = operation.state
let type = operation.operation
//
if (state === 'CREATE') {
if (type === 'CREATE') {
this.$set(operation, "icon", "el-icon-check")
this.$set(operation, "color", "#0bbd87")
}
if (type === 'OPINION') {
//
if (state === 'AGREE' || state === 'AUTO_PASS') {
this.$set(operation, "icon", "el-icon-check")
this.$set(operation, "color", "#0bbd87")
this.$set(operation, "remark", ' (已同意)')
}
if (state === 'PASS'){
if (state === 'PASS') {
this.$set(operation, "icon", "el-icon-more")
this.$set(operation, "color", "#c0c4cc")
}
@ -200,7 +201,7 @@ export default {
if (state === 'RUNNING') {
this.$set(operation, "icon", "el-icon-loading")
this.$set(operation, "color", "#f78f5f")
this.$set(operation, "remark",' (处理中)')
this.$set(operation, "remark", ' (处理中)')
}
//退
if (state === 'ROLLBACK') {
@ -208,29 +209,50 @@ export default {
this.$set(operation, "color", "#f78f5f")
this.$set(operation, "remark", ' (回退成功)')
}
//
if (type === 'CC') {
this.$set(operation, "icon", "el-icon-s-promotion")
this.$set(operation, "color", "#3395f8")
this.$set(operation, "remark", ' (抄送成功)')
//
if (state === 'REFUSE' || state === 'AUTO_REFUSE') {
this.$set(operation, "icon", "el-icon-close")
this.$set(operation, "color", "#f56c6c")
this.$set(operation, "remark", ' (拒绝)')
}
}
//
if (type === 'COMMENT') {
//
if (state === 'COMMENT') {
this.$set(operation, "icon", "el-icon-chat-dot-round")
this.$set(operation, "color", "#0bbd87")
this.$set(operation, "remark", ' (添加了评论)')
}
//
if (state === 'REFUSE' && type === 'COMMENT') {
this.$set(operation, "icon", "el-icon-chat-dot-round")
this.$set(operation, "color", "#f56c6c")
this.$set(operation, "remark", ' (填写拒绝理由)')
}
//
if ((state === 'REFUSE' || state === 'AUTO_REFUSE')&& type === 'OPINION') {
this.$set(operation, "icon", "el-icon-close")
//http
if (type === 'TRIGGER_WEBHOOK') {
this.$set(operation, "icon", "el-icon-share")
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", ' (拒绝)')
this.$set(operation, "remark", ' (失败)')
}
}
//
if (type === 'TRIGGER_EMAIL') {
this.$set(operation, "icon", "el-icon-message")
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;
},
@ -243,7 +265,8 @@ export default {
/deep/ .el-card__body, .el-main {
padding: 10px;
}
.avatar_name{
.avatar_name {
width: 45px;
display: flex;
flex-direction: column;
@ -256,7 +279,8 @@ export default {
bottom: 20px;
right: 1px;
}
.username{
.username {
width: 45px;
padding-top: 2px;
text-align: center;