update 增加选择角色
This commit is contained in:
parent
0c76ed60a2
commit
0f50569246
@ -169,21 +169,29 @@ const syncChange = (newVal) => {
|
|||||||
updateProperties({ 'flowable:async': newVal });
|
updateProperties({ 'flowable:async': newVal });
|
||||||
};
|
};
|
||||||
|
|
||||||
const dueDateChange = (newVal) => {
|
|
||||||
console.log(newVal);
|
|
||||||
updateProperties({ 'flowable:dueDate': newVal });
|
|
||||||
};
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => formData.value.auditUserType,
|
() => formData.value.auditUserType,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
formData.value.users = [];
|
formData.value.users = [];
|
||||||
|
formData.value.roles = [];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => formData.value.roles,
|
||||||
|
(newVal: Record<string, any>[]) => {
|
||||||
|
if (newVal.length > 0) {
|
||||||
|
// 获取userId 用逗号,隔开
|
||||||
|
const roleIds = newVal.map((item) => item.roleId).join(',');
|
||||||
|
updateProperties({ 'flowable:candidateGroups': roleIds });
|
||||||
|
} else {
|
||||||
|
updateProperties({ 'flowable:candidateGroups': undefined });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
);
|
||||||
watch(
|
watch(
|
||||||
() => formData.value.users,
|
() => formData.value.users,
|
||||||
(newVal: Record<string, any>[]) => {
|
(newVal: Record<string, any>[]) => {
|
||||||
updateProperties({ 'flowable:candidateGroups': undefined });
|
|
||||||
if (newVal.length === 1) {
|
if (newVal.length === 1) {
|
||||||
const user = newVal[0];
|
const user = newVal[0];
|
||||||
const userId = user.userId;
|
const userId = user.userId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user