From 4e5ee8be65a0499d9befb72545be063c52b9d467 Mon Sep 17 00:00:00 2001
From: konbai <1527468660@qq.com>
Date: Sat, 14 May 2022 16:32:45 +0800
Subject: [PATCH] =?UTF-8?q?fix=20--=20=E5=AE=8C=E5=96=84=E6=B5=81=E7=A8=8B?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=80=99=E9=80=89=E4=BA=BA=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../penal/task/task-components/UserTask.vue | 38 +++++++++++--------
1 file changed, 23 insertions(+), 15 deletions(-)
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 deee7766..e4c2a2e2 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
@@ -19,7 +19,7 @@
0 && userText && userText.length > 0) {
this.selectedUser.ids = userIdData?.toString().split(',');
this.selectedUser.text = userText?.split(',');
- } else {
- this.selectedUser.ids = []
- this.selectedUser.text = []
+ }
+ if (this.selectedUser.ids.length > 1) {
+ this.showMultiFlog = true;
}
} else if (this.dataType === 'ROLES') {
this.getRoleOptions();
@@ -212,6 +210,7 @@ export default {
if (roleIdData && roleIdData.length > 0) {
this.roleIds = roleIdData.split(',')
}
+ this.showMultiFlog = true;
} else if (this.dataType === 'DEPTS') {
this.getDeptTreeData().then(() => {
let deptIdData = bpmnElementObj['candidateGroups'] || [];
@@ -219,9 +218,22 @@ export default {
this.deptIds = deptIdData.split(',');
}
});
+ this.showMultiFlog = true;
}
this.getElementLoop(bpmnElementObj);
},
+ /**
+ * 清空选项数据
+ */
+ clearOptionsData() {
+ this.selectedUser.ids = [];
+ this.selectedUser.text = [];
+ this.roleIds = [];
+ this.deptIds = [];
+ },
+ /**
+ * 跟新节点数据
+ */
updateElementTask() {
const taskAttr = Object.create(null);
for (let key in userTaskForm) {
@@ -334,13 +346,9 @@ export default {
this.updateElementTask()
this.userOpen = false;
},
- handleSaveRoles() {
- if (!this.roleIds || this.roleIds.length <= 0) {
- this.$modal.msgError('请选择角色');
- return;
- }
- userTaskForm.candidateGroups = this.roleIds.join() || null;
- let textArr = this.roleOptions.filter(k => this.roleIds.indexOf(`ROLE${k.roleId}`) >= 0);
+ changeSelectRoles(val) {
+ userTaskForm.candidateGroups = val.join() || null;
+ let textArr = this.roleOptions.filter(k => val.indexOf(`ROLE${k.roleId}`) >= 0);
userTaskForm.text = textArr?.map(k => k.roleName).join() || null;
this.updateElementTask();
},
@@ -400,7 +408,7 @@ export default {
userTaskForm.text = "流程发起人";
}
this.updateElementTask();
- if (val === 'ROLES' || val === 'DEPTS' || (val === 'USERS' && userTaskForm.text.indexOf(',') > 0)) {
+ if (val === 'ROLES' || val === 'DEPTS' || (val === 'USERS' && this.selectedUser.ids.length > 1)) {
this.showMultiFlog = true;
} else {
this.showMultiFlog = false;