From fc288926d5f425ca37cc3ce8cebdf92149839923 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Mon, 13 Mar 2023 00:55:08 +0800
Subject: [PATCH 1/5] =?UTF-8?q?dengjie=20:=20=E5=AE=A1=E6=89=B9=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/common/AvatarEllipsis.vue | 37 +++++++++++++------
.../src/views/common/process/nodes/Node.vue | 22 ++++++++---
2 files changed, 42 insertions(+), 17 deletions(-)
diff --git a/flowable-engine-web/src/components/common/AvatarEllipsis.vue b/flowable-engine-web/src/components/common/AvatarEllipsis.vue
index 34e4618..c09aa58 100644
--- a/flowable-engine-web/src/components/common/AvatarEllipsis.vue
+++ b/flowable-engine-web/src/components/common/AvatarEllipsis.vue
@@ -4,9 +4,8 @@
:style="{'--row':row}">
-
-
+
{{ placeholder }}
@@ -77,7 +79,7 @@ export default {
//节点内容区域文字
userInfo: {
type: Array,
- default(){
+ default() {
return []
}
},
@@ -129,7 +131,7 @@ export default {
},
},
data() {
- return{}
+ return {}
},
computed: {
viewer() {
@@ -148,7 +150,7 @@ export default {
userInfoList.push(userInfo)
}
this.userInfo = userInfoList
- this.$store.state.selectUserMap.set(this.$store.state.selectedNode.id,userInfoList)
+ this.$store.state.selectUserMap.set(this.$store.state.selectedNode.id, userInfoList)
},
}
}
@@ -229,6 +231,16 @@ export default {
color: #656363;
font-size: 14px;
+ .avatar_button {
+ display: flex;
+
+ button {
+ height: 40px;
+ flex-shrink: 0;
+ flex-grow: 0;
+ }
+ }
+
i {
position: absolute;
top: 55%;
--
2.40.1
From 87b1d9d2c088106a6d3feeb1ef11c59d2abee9ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Sat, 18 Mar 2023 18:57:29 +0800
Subject: [PATCH 2/5] =?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=A9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/common/UserPicker.vue | 23 +++++-----
.../common/operation/OperationRender.vue | 45 ++++++++++++++-----
2 files changed, 45 insertions(+), 23 deletions(-)
diff --git a/flowable-engine-web/src/components/common/UserPicker.vue b/flowable-engine-web/src/components/common/UserPicker.vue
index e404743..fdc9ce5 100644
--- a/flowable-engine-web/src/components/common/UserPicker.vue
+++ b/flowable-engine-web/src/components/common/UserPicker.vue
@@ -127,6 +127,7 @@ 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 = this.setData(res.data)
@@ -141,7 +142,6 @@ export default {
setData(source) {
for (let item of source) {
this.$set(item, "value", this.selectItem.value + "-" + item.id)
- this.$set(item, "children", [])
}
return source;
},
@@ -162,20 +162,19 @@ export default {
if (item.type !== 0) {
this.chooseId = item.id
this.getList()
+ return
}
- if (!item.children) {
- if (this.multiple) {
- //不添加重复的数据到右边
- for (let i = 0; i < this.selectList.length; i++) {
- if (this.selectList[i].id === item.id) {
- this.selectList.splice(i, 1);
- break;
- }
+ if (this.multiple) {
+ //不添加重复的数据到右边
+ for (let i = 0; i < this.selectList.length; i++) {
+ if (this.selectList[i].id === item.id) {
+ this.selectList.splice(i, 1);
+ break;
}
- this.selectList.push(item);
- } else {
- this.selectList = [item];
}
+ this.selectList.push(item);
+ } else {
+ this.selectList = [item];
}
// this._value = this.selectList
},
diff --git a/flowable-engine-web/src/views/common/operation/OperationRender.vue b/flowable-engine-web/src/views/common/operation/OperationRender.vue
index 3ebf6f8..8b4e089 100644
--- a/flowable-engine-web/src/views/common/operation/OperationRender.vue
+++ b/flowable-engine-web/src/views/common/operation/OperationRender.vue
@@ -9,18 +9,21 @@
placement="top">
-
-
-
+
+ {{ user.name }}
+
{{ operation.operationName }}
@@ -230,5 +233,25 @@ export default {
/deep/ .el-card__body, .el-main {
padding: 10px;
}
-
+.avatar_name{
+ width: 45px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ position: relative;
+ margin-right: 5px;
+}
+.avatar_icon{
+ position: absolute;
+ bottom: 16px;
+ right: -2px;
+}
+.username{
+ width: 45px;
+ padding-top: 2px;
+ text-align: center;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden
+}
--
2.40.1
From f98ca9efbb2a32ea7a5f5667887f873ff2a76efc Mon Sep 17 00:00:00 2001
From: clay <20932067@zju.edu.cn>
Date: Sat, 18 Mar 2023 19:40:07 +0800
Subject: [PATCH 3/5] =?UTF-8?q?clay=20:=20fix=20userPicker=E6=8A=A5?=
=?UTF-8?q?=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/common/UserPicker.vue | 44 +++++++++++++------
.../common/form/components/UserPicker.vue | 2 +-
.../src/views/common/process/nodes/Node.vue | 7 ++-
3 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/flowable-engine-web/src/components/common/UserPicker.vue b/flowable-engine-web/src/components/common/UserPicker.vue
index fdc9ce5..159d8e7 100644
--- a/flowable-engine-web/src/components/common/UserPicker.vue
+++ b/flowable-engine-web/src/components/common/UserPicker.vue
@@ -19,7 +19,6 @@
@@ -70,6 +69,12 @@ export default {
return [];
}
},
+ selected: {
+ type: Array,
+ default: () => {
+ return [];
+ }
+ },
multiple: { //是否多选
default: true,
type: Boolean
@@ -128,32 +133,42 @@ export default {
getList() {
getUserTree(this.radio, this.chooseId).then(res => {
console.log('人员', res.data)
- if (res.data) {
+ // if (res.data) {
if (this.selectItem.type === -1 || this.selectItem.type === -2) {
- this.dataList = this.setData(res.data)
- } else if (this.selectItem.type === 1) {
+ this.dataList = res.data
+ }
+ else if (this.selectItem.type === 1) {
this.selectItem.children = res.data
} else if (this.selectItem.type === 2) {
- this.selectItem.children = this.setData(res.data)
+ this.selectItem.children = res.data
}
- }
+ // }
});
},
setData(source) {
- for (let item of source) {
- this.$set(item, "value", this.selectItem.value + "-" + item.id)
- }
+ // for (let item of source) {
+ // this.$set(item, "value", this.selectItem.value + "-" + item.id)
+ // }
return source;
},
//通过关键字过滤树节点
- filterNode(value, data) {
- if (!value) return true;
- return data.name.indexOf(value) !== -1;
- },
+ // filterNode(value, data) {
+ // if (!value) return true;
+ // return data.name.indexOf(value) !== -1;
+ // },
//用于用户选择
showUserPicker() {
- this.getList();
+ this.selectItem = {
+ type: -1,
+ value: '0',
+ }
+ this.dataList = []
+ // this.selectList = []
+ this.chooseId = 0
+ this.radio = 0
this.visible = true;
+ this.getList();
+
},
//渲染子节点用户或部门及用户数据
handleChange(item, check) {
@@ -201,6 +216,7 @@ export default {
//确定按钮
selectConfirm() {
this.$emit("ok", this.selectList);
+ // this.dataList = []
this.visible = false;
}
}
diff --git a/flowable-engine-web/src/views/common/form/components/UserPicker.vue b/flowable-engine-web/src/views/common/form/components/UserPicker.vue
index 9432879..4060104 100644
--- a/flowable-engine-web/src/views/common/form/components/UserPicker.vue
+++ b/flowable-engine-web/src/views/common/form/components/UserPicker.vue
@@ -9,7 +9,7 @@
选择人员
-
+
{{ placeholder }}
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 2d5ee9e..f1905ed 100644
--- a/flowable-engine-web/src/views/common/process/nodes/Node.vue
+++ b/flowable-engine-web/src/views/common/process/nodes/Node.vue
@@ -42,8 +42,8 @@
@insertNode="type => $emit('insertNode', type)">
-
@@ -137,6 +137,9 @@ export default {
viewer() {
return this.$store.state.diagramMode === 'viewer'
},
+ getUserInfo(){
+ return this.userInfo
+ }
},
methods: {
selectedUser(select) {
--
2.40.1
From cde76e13cbe6fcc920e80b0fb75fec523180dc07 Mon Sep 17 00:00:00 2001
From: clay <20932067@zju.edu.cn>
Date: Sat, 18 Mar 2023 19:48:39 +0800
Subject: [PATCH 4/5] =?UTF-8?q?clay=20:=20fix=20userPicker=E6=8A=A5?=
=?UTF-8?q?=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/common/process/nodes/Node.vue | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
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 f1905ed..937c85d 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,7 @@
@@ -137,9 +137,14 @@ export default {
viewer() {
return this.$store.state.diagramMode === 'viewer'
},
- getUserInfo(){
- return this.userInfo
- }
+ _userInfo: {
+ get() {
+ return this.userInfo
+ },
+ set(val) {
+ this.userInfo = val
+ }
+ },
},
methods: {
selectedUser(select) {
@@ -152,7 +157,8 @@ export default {
}
userInfoList.push(userInfo)
}
- this.userInfo = userInfoList
+ //todo 确认是会包错,邓洁处理
+ this._userInfo = userInfoList
this.$store.state.selectUserMap.set(this.$store.state.selectedNode.id, userInfoList)
},
}
--
2.40.1
From 9285814edc3faf90717e0ce73f3df88c2adf9252 Mon Sep 17 00:00:00 2001
From: clay <20932067@zju.edu.cn>
Date: Mon, 20 Mar 2023 17:28:25 +0800
Subject: [PATCH 5/5] =?UTF-8?q?clay=20:=20=E4=BB=BB=E6=84=8F=E8=8A=82?=
=?UTF-8?q?=E7=82=B9=E9=80=80=E5=9B=9E=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/common/AvatarEllipsis.vue | 10 +++----
.../common/operation/OperationRender.vue | 26 +++++++++----------
.../src/views/common/process/nodes/CcNode.vue | 2 +-
.../src/views/workspace/WorkSpace.vue | 4 ++-
4 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/flowable-engine-web/src/components/common/AvatarEllipsis.vue b/flowable-engine-web/src/components/common/AvatarEllipsis.vue
index c09aa58..ea36a66 100644
--- a/flowable-engine-web/src/components/common/AvatarEllipsis.vue
+++ b/flowable-engine-web/src/components/common/AvatarEllipsis.vue
@@ -60,26 +60,26 @@ export default {
initUser(user) {
let state = user.state
//创建节点
- if (state === 'create') {
+ if (state === 'CREATE') {
this.$set(user, "icon", "el-icon-check")
this.$set(user, "color", "#0bbd87")
}
//审批通过
- if (state === 'agree') {
+ if (state === 'AGREE') {
this.$set(user, "icon", "el-icon-check")
this.$set(user, "color", "#0bbd87")
}
//审批处理中
- if (state === 'running') {
+ if (state === 'RUNNING') {
this.$set(user, "icon", "el-icon-loading")
this.$set(user, "color", "#f78f5f")
}
//拒绝后评论
- if (state === 'refuse') {
+ if (state === 'REFUSE') {
this.$set(user, "icon", "el-icon-close")
this.$set(user, "color", "#f56c6c")
}
- if (state === 'pass') {
+ if (state === 'PASS') {
this.$set(user, "icon", "el-icon-more")
this.$set(user, "color", "#c0c4cc")
}
diff --git a/flowable-engine-web/src/views/common/operation/OperationRender.vue b/flowable-engine-web/src/views/common/operation/OperationRender.vue
index 8b4e089..fe7ffe6 100644
--- a/flowable-engine-web/src/views/common/operation/OperationRender.vue
+++ b/flowable-engine-web/src/views/common/operation/OperationRender.vue
@@ -148,26 +148,26 @@ export default {
initUser(user) {
let state = user.state
//创建节点
- if (state === 'create') {
+ if (state === 'CREATE') {
this.$set(user, "icon", "el-icon-check")
this.$set(user, "color", "#0bbd87")
}
//审批通过
- if (state === 'agree') {
+ if (state === 'AGREE') {
this.$set(user, "icon", "el-icon-check")
this.$set(user, "color", "#0bbd87")
}
//审批处理中
- if (state === 'running') {
+ if (state === 'RUNNING') {
this.$set(user, "icon", "el-icon-loading")
this.$set(user, "color", "#f78f5f")
}
//拒绝后评论
- if (state === 'refuse') {
+ if (state === 'REFUSE') {
this.$set(user, "icon", "el-icon-close")
this.$set(user, "color", "#f56c6c")
}
- if (state === 'pass'){
+ if (state === 'PASS'){
this.$set(user, "icon", "el-icon-more")
this.$set(user, "color", "#c0c4cc")
}
@@ -177,47 +177,47 @@ export default {
let state = operation.state
let type = operation.operation
//创建节点
- if (state === 'create') {
+ if (state === 'CREATE') {
this.$set(operation, "icon", "el-icon-check")
this.$set(operation, "color", "#0bbd87")
this.$set(operation, "remark", operation.userInfo.name)
}
//审批通过
- if (state === 'agree') {
+ if (state === 'AGREE') {
this.$set(operation, "icon", "el-icon-check")
this.$set(operation, "color", "#0bbd87")
this.$set(operation, "remark", operation.userInfo.name + ' (已同意)')
}
- if (state === 'pass'){
+ if (state === 'PASS'){
this.$set(operation, "icon", "el-icon-more")
this.$set(operation, "color", "#c0c4cc")
}
//审批处理中
- if (state === 'running') {
+ if (state === 'RUNNING') {
this.$set(operation, "icon", "el-icon-loading")
this.$set(operation, "color", "#f78f5f")
this.$set(operation, "remark", operation.userInfo.name + ' (处理中)')
}
//抄送
- if (type === 'cc') {
+ if (type === 'CC') {
this.$set(operation, "icon", "el-icon-s-promotion")
this.$set(operation, "color", "#3395f8")
this.$set(operation, "remark", operation.userInfo.name + ' (抄送成功)')
}
//评论
- if (state === 'comment') {
+ if (state === 'COMMENT') {
this.$set(operation, "icon", "el-icon-chat-dot-round")
this.$set(operation, "color", "#0bbd87")
this.$set(operation, "remark", operation.userInfo.name + ' (添加了评论)')
}
//拒绝后评论
- if (state === 'refuse' && type === 'comment') {
+ if (state === 'REFUSE' && type === 'COMMENT') {
this.$set(operation, "icon", "el-icon-chat-dot-round")
this.$set(operation, "color", "#f56c6c")
this.$set(operation, "remark", operation.userInfo.name + ' (填写拒绝理由)')
}
//拒绝操作
- if (state === 'refuse' && type === 'opinion') {
+ if (state === 'REFUSE' && type === 'OPINION') {
this.$set(operation, "icon", "el-icon-close")
this.$set(operation, "color", "#f56c6c")
this.$set(operation, "remark", operation.userInfo.name + ' (拒绝)')
diff --git a/flowable-engine-web/src/views/common/process/nodes/CcNode.vue b/flowable-engine-web/src/views/common/process/nodes/CcNode.vue
index db5a088..fd63a57 100644
--- a/flowable-engine-web/src/views/common/process/nodes/CcNode.vue
+++ b/flowable-engine-web/src/views/common/process/nodes/CcNode.vue
@@ -27,7 +27,7 @@ export default {
computed:{
selectUser(){
return {
- show: this.config.props.shouldAdd,
+ show: this.config.props.assignedType !== 'ASSIGN_USER',
multiple: true
};
},
diff --git a/flowable-engine-web/src/views/workspace/WorkSpace.vue b/flowable-engine-web/src/views/workspace/WorkSpace.vue
index 3cd9fde..e60bade 100644
--- a/flowable-engine-web/src/views/workspace/WorkSpace.vue
+++ b/flowable-engine-web/src/views/workspace/WorkSpace.vue
@@ -120,10 +120,12 @@ export default {
// todo 提交流程测试
submitForm(){
let processInstance = this.$refs.processInstance;
+ let selectUserMap = {}
+ this.$store.state.selectUserMap.forEach(((value, key) => {selectUserMap[key]=value}))
let paramsData = {
processDefinitionId: this.selectForm.processDefinitionId,
formData: JSON.stringify(processInstance.formData),
- selectUserMap: this.$store.state.selectUserMap
+ optionalUser: selectUserMap
}
processInstance.validate(valid => {
if (valid) {
--
2.40.1