From f1317af16b96e4629f22796aebc6f7445bb36cc1 Mon Sep 17 00:00:00 2001 From: clay <20932067@zju.edu.cn> Date: Wed, 22 Mar 2023 14:24:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?clay=20:=20=E8=8A=82=E7=82=B9=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E7=BB=86=E8=8A=82=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/operation/OperationRender.vue | 112 +++++++++++------- 1 file changed, 68 insertions(+), 44 deletions(-) diff --git a/flowable-engine-web/src/views/common/operation/OperationRender.vue b/flowable-engine-web/src/views/common/operation/OperationRender.vue index 5522098..0eb3904 100644 --- a/flowable-engine-web/src/views/common/operation/OperationRender.vue +++ b/flowable-engine-web/src/views/common/operation/OperationRender.vue @@ -182,55 +182,77 @@ 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 (state === 'AGREE' || state === 'AUTO_PASS') { - this.$set(operation, "icon", "el-icon-check") - this.$set(operation, "color", "#0bbd87") - this.$set(operation, "remark", ' (已同意)') - } - if (state === 'PASS'){ - this.$set(operation, "icon", "el-icon-more") - this.$set(operation, "color", "#c0c4cc") - } - //审批处理中 - if (state === 'RUNNING') { - this.$set(operation, "icon", "el-icon-loading") - this.$set(operation, "color", "#f78f5f") - 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') { - this.$set(operation, "icon", "el-icon-s-promotion") - this.$set(operation, "color", "#3395f8") - this.$set(operation, "remark", ' (抄送成功)') + 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') { + this.$set(operation, "icon", "el-icon-more") + this.$set(operation, "color", "#c0c4cc") + } + //审批处理中 + if (state === 'RUNNING') { + this.$set(operation, "icon", "el-icon-loading") + this.$set(operation, "color", "#f78f5f") + this.$set(operation, "remark", ' (处理中)') + } + //回退 + if (state === 'ROLLBACK') { + this.$set(operation, "icon", "el-icon-refresh") + this.$set(operation, "color", "#f78f5f") + 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 (state === 'COMMENT') { - this.$set(operation, "icon", "el-icon-chat-dot-round") - this.$set(operation, "color", "#0bbd87") - 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", ' (填写拒绝理由)') + //触发器发送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", ' (失败)') + } } - //拒绝操作 - if ((state === 'REFUSE' || state === 'AUTO_REFUSE')&& type === 'OPINION') { - this.$set(operation, "icon", "el-icon-close") - this.$set(operation, "color", "#f56c6c") - 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; -- 2.40.1 From dfeddfb3410de3e0fd4972022c10fb306e66d113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Wed, 22 Mar 2023 15:27:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?dengjie=20:=20=E4=BF=AE=E6=94=B9=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E9=80=89=E6=8B=A9=E5=99=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/UserPicker.vue | 7 ------ .../src/views/common/process/nodes/Node.vue | 25 ++++--------------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/flowable-engine-web/src/components/common/UserPicker.vue b/flowable-engine-web/src/components/common/UserPicker.vue index 97afdd5..b56a9a7 100644 --- a/flowable-engine-web/src/components/common/UserPicker.vue +++ b/flowable-engine-web/src/components/common/UserPicker.vue @@ -69,12 +69,6 @@ export default { return []; } }, - selected: { - type: Array, - default: () => { - return []; - } - }, multiple: { //是否多选 default: true, type: Boolean @@ -135,7 +129,6 @@ export default { }, getList() { getUserTree(this.radio, this.chooseId).then(res => { - console.log('人员', res.data) // if (res.data) { if (this.selectItem.type === -1 || this.selectItem.type === -2) { this.dataList = res.data diff --git a/flowable-engine-web/src/views/common/process/nodes/Node.vue b/flowable-engine-web/src/views/common/process/nodes/Node.vue index 24fc062..9d03513 100644 --- a/flowable-engine-web/src/views/common/process/nodes/Node.vue +++ b/flowable-engine-web/src/views/common/process/nodes/Node.vue @@ -43,7 +43,6 @@ @@ -77,13 +76,6 @@ export default { default: "" }, //节点内容区域文字 - userInfo: { - type: Array, - default() { - return [] - } - }, - //节点内容区域文字 showAvatar: { type: Boolean, default: false @@ -131,20 +123,14 @@ export default { }, }, data() { - return {} + return { + userInfo:[] + } }, computed: { viewer() { return this.$store.state.diagramMode === 'viewer' - }, - _userInfo: { - get() { - return this.userInfo - }, - set(val) { - this.userInfo = val - } - }, + } }, methods: { selectedUser(select) { @@ -157,8 +143,7 @@ export default { } userInfoList.push(userInfo) } - //todo 确认是会包错,邓洁处理 - this._userInfo = userInfoList + this.userInfo = userInfoList this.$store.state.selectUserMap.set(this.$store.state.selectedNode.id, userInfoList) }, } -- 2.40.1 From fc892ec36af08996e03ec96ed452a4b980558a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Wed, 22 Mar 2023 15:39:13 +0800 Subject: [PATCH 3/4] =?UTF-8?q?dengjie=20:=20=E4=BF=AE=E6=94=B9=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E9=80=89=E6=8B=A9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flowable-engine-web/src/components/common/UserPicker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowable-engine-web/src/components/common/UserPicker.vue b/flowable-engine-web/src/components/common/UserPicker.vue index b56a9a7..974b25c 100644 --- a/flowable-engine-web/src/components/common/UserPicker.vue +++ b/flowable-engine-web/src/components/common/UserPicker.vue @@ -21,7 +21,7 @@ @node-click="handleChange" >
-
+
{{ node.label }}
-- 2.40.1 From 1235478f5cb6a2efa610b846794283158a0d577f Mon Sep 17 00:00:00 2001 From: clay <20932067@zju.edu.cn> Date: Wed, 22 Mar 2023 15:41:06 +0800 Subject: [PATCH 4/4] =?UTF-8?q?clay=20:=20=E8=8A=82=E7=82=B9=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E7=BB=86=E8=8A=82=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flowable-engine-web/src/views/admin/layout/FormBaseSetting.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowable-engine-web/src/views/admin/layout/FormBaseSetting.vue b/flowable-engine-web/src/views/admin/layout/FormBaseSetting.vue index 51ba364..3fd0658 100644 --- a/flowable-engine-web/src/views/admin/layout/FormBaseSetting.vue +++ b/flowable-engine-web/src/views/admin/layout/FormBaseSetting.vue @@ -43,7 +43,7 @@ - + -- 2.40.1