From 39ef71246be00e0e60bbbc6c79328903997b7e03 Mon Sep 17 00:00:00 2001
From: hewenqiang <1527468660@qq.com>
Date: Sat, 12 Feb 2022 14:51:22 +0800
Subject: [PATCH] =?UTF-8?q?fix=20--=20=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8B?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E7=94=A8=E6=88=B7=E4=BB=BB=E5=8A=A1=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=EF=BC=8C=E9=80=89=E6=8B=A9=E5=9B=BA=E5=AE=9A=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E9=99=90=E5=88=B6=E5=8F=AA=E8=83=BD=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=94=A8=E6=88=B7=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../penal/task/task-components/TagSelect.vue | 2 +-
.../penal/task/task-components/UserTask.vue | 35 +++++++++++++------
2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/ruoyi-ui/src/plugins/package/penal/task/task-components/TagSelect.vue b/ruoyi-ui/src/plugins/package/penal/task/task-components/TagSelect.vue
index e9906b1e..7a54ca50 100644
--- a/ruoyi-ui/src/plugins/package/penal/task/task-components/TagSelect.vue
+++ b/ruoyi-ui/src/plugins/package/penal/task/task-components/TagSelect.vue
@@ -17,7 +17,7 @@ export default {
name: 'TagSelect',
props: {
value: {
- type: [Object, Array]
+ type: [Object, Array, String]
}
},
data () {
diff --git a/ruoyi-ui/src/plugins/package/penal/task/task-components/UserTask.vue b/ruoyi-ui/src/plugins/package/penal/task/task-components/UserTask.vue
index 193946d3..bde1b6cf 100644
--- a/ruoyi-ui/src/plugins/package/penal/task/task-components/UserTask.vue
+++ b/ruoyi-ui/src/plugins/package/penal/task/task-components/UserTask.vue
@@ -8,8 +8,10 @@
- 固定
- 动态
+
+ 固定
+ 动态
+
@@ -73,13 +75,8 @@
-
-
+
+
@@ -212,10 +209,10 @@ export default {
} else if (key === "candidateGroups") {
// TODO 2022/01/28 添加候选组的设值 this.$set(this.userTaskForm, key, value);
} else if (key === "assignee") {
+ this.formData.groupType = 'ASSIGNEE';
let val = this.bpmnElement?.businessObject[key] || this.defaultTaskForm[key];
// 判断是否为动态用户
if (val && val.startsWith('${') && val.endsWith('}')) {
- this.formData.groupType = 'ASSIGNEE';
this.formData.assignType = '2';
this.$set(this.userTaskForm, key, val);
} else {
@@ -265,6 +262,17 @@ export default {
}
);
},
+ selectEnable(row, index) {
+ if (this.formData.groupType === 'ASSIGNEE') {
+ if (this.selectedUserDate.length > 0) {
+ return this.selectedUserDate[0].userId === row.userId;
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ },
// 筛选节点
filterNode(value, data) {
if (!value) return true;
@@ -278,6 +286,7 @@ export default {
// 关闭标签
handleClose(tag) {
this.selectedUserDate.splice(this.selectedUserDate.indexOf(tag), 1);
+ this.$refs.multipleTable.toggleRowSelection(tag);
},
// 多选框选中数据
handleSelectionChange(selection) {
@@ -304,9 +313,15 @@ export default {
},
onGroupTypeChange(val) {
this.userTaskForm = {}
+ // 清空已选候选人数据
if (val === 'ASSIGNEE') {
this.formData.assignType = '1'
}
+ this.selectedUserDate = []
+ this.$refs.multipleTable?.clearSelection();
+ },
+ onAssignTypeChange() {
+ this.userTaskForm.assignee = null
},
onSelectAssignee() {
this.getDeptTreeSelect();