|
|
|
|
@ -39,7 +39,7 @@
|
|
|
|
|
multiple
|
|
|
|
|
clearable
|
|
|
|
|
checkStrictly
|
|
|
|
|
nodeKey="id"
|
|
|
|
|
node-key="deptId"
|
|
|
|
|
:checkedKeys="deptIds"
|
|
|
|
|
@change="checkedDeptChange">
|
|
|
|
|
</tree-select>
|
|
|
|
|
@ -90,6 +90,7 @@
|
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
|
:filter-node-method="filterNode"
|
|
|
|
|
ref="tree"
|
|
|
|
|
node-key="deptId"
|
|
|
|
|
default-expand-all
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
/>
|
|
|
|
|
@ -99,8 +100,12 @@
|
|
|
|
|
<el-col :span="17">
|
|
|
|
|
<el-table ref="multipleTable" height="600" :data="userTableList" border @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
|
|
<el-table-column label="用户名" align="center" prop="nickName" />
|
|
|
|
|
<el-table-column label="部门" align="center" prop="dept.deptName" />
|
|
|
|
|
<el-table-column label="用户名" align="center" prop="realName" />
|
|
|
|
|
<el-table-column label="部门" align="center" prop="deptNames" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{scope.row.deptNames ? scope.row.deptNames.join('、') : '-'}}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
:total="userTotal"
|
|
|
|
|
@ -157,7 +162,7 @@ export default {
|
|
|
|
|
deptOptions: [],
|
|
|
|
|
deptProps: {
|
|
|
|
|
children: "children",
|
|
|
|
|
label: "label"
|
|
|
|
|
label: "deptName"
|
|
|
|
|
},
|
|
|
|
|
deptTempOptions: [],
|
|
|
|
|
userTableList: [],
|
|
|
|
|
@ -268,7 +273,7 @@ export default {
|
|
|
|
|
getDeptTreeData() {
|
|
|
|
|
function refactorTree(data) {
|
|
|
|
|
return data.map(node => {
|
|
|
|
|
let treeData = { id: `DEPT${node.id}`, label: node.label, parentId: node.parentId, weight: node.weight };
|
|
|
|
|
let treeData = { deptId: `DEPT${node.deptId}`, deptName: node.deptName, parentId: node.parentId, weight: node.weight };
|
|
|
|
|
if (node.children && node.children.length > 0) {
|
|
|
|
|
treeData.children = refactorTree(node.children);
|
|
|
|
|
}
|
|
|
|
|
@ -306,11 +311,11 @@ export default {
|
|
|
|
|
// 筛选节点
|
|
|
|
|
filterNode(value, data) {
|
|
|
|
|
if (!value) return true;
|
|
|
|
|
return data.label.indexOf(value) !== -1;
|
|
|
|
|
return data.deptName.indexOf(value) !== -1;
|
|
|
|
|
},
|
|
|
|
|
// 节点单击事件
|
|
|
|
|
handleNodeClick(data) {
|
|
|
|
|
this.queryParams.deptId = data.id;
|
|
|
|
|
this.queryParams.deptId = data.deptId;
|
|
|
|
|
this.getUserList();
|
|
|
|
|
},
|
|
|
|
|
// 关闭标签
|
|
|
|
|
@ -334,18 +339,18 @@ export default {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
userTaskForm.dataType = 'USERS';
|
|
|
|
|
this.selectedUser.text = this.selectedUserDate.map(k => k.nickName) || [];
|
|
|
|
|
this.selectedUser.text = this.selectedUserDate.map(k => k.realName) || [];
|
|
|
|
|
if (this.selectedUserDate.length === 1) {
|
|
|
|
|
let data = this.selectedUserDate[0];
|
|
|
|
|
userTaskForm.assignee = data.userId;
|
|
|
|
|
userTaskForm.text = data.nickName;
|
|
|
|
|
userTaskForm.assignee = data.id;
|
|
|
|
|
userTaskForm.text = data.realName;
|
|
|
|
|
userTaskForm.candidateUsers = null;
|
|
|
|
|
this.showMultiFlog = false;
|
|
|
|
|
this.multiLoopType = 'Null';
|
|
|
|
|
this.changeMultiLoopType();
|
|
|
|
|
} else {
|
|
|
|
|
userTaskForm.candidateUsers = this.selectedUserDate.map(k => k.userId).join() || null;
|
|
|
|
|
userTaskForm.text = this.selectedUserDate.map(k => k.nickName).join() || null;
|
|
|
|
|
userTaskForm.candidateUsers = this.selectedUserDate.map(k => k.id).join() || null;
|
|
|
|
|
userTaskForm.text = this.selectedUserDate.map(k => k.realName).join() || null;
|
|
|
|
|
userTaskForm.assignee = null;
|
|
|
|
|
this.showMultiFlog = true;
|
|
|
|
|
}
|
|
|
|
|
@ -386,12 +391,12 @@ export default {
|
|
|
|
|
if(temp.children) {
|
|
|
|
|
stark = temp.children.concat(stark);
|
|
|
|
|
}
|
|
|
|
|
if(id === temp.id) {
|
|
|
|
|
if(id === temp.deptId) {
|
|
|
|
|
textArr.push(temp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
text = textArr?.map(k => k.label).join() || null;
|
|
|
|
|
text = textArr?.map(k => k.deptName).join() || null;
|
|
|
|
|
} else {
|
|
|
|
|
userTaskForm.dataType = null;
|
|
|
|
|
this.multiLoopType = 'Null';
|
|
|
|
|
@ -442,12 +447,12 @@ export default {
|
|
|
|
|
if(temp.children) {
|
|
|
|
|
stark = temp.children.concat(stark);
|
|
|
|
|
}
|
|
|
|
|
if(id === temp.id) {
|
|
|
|
|
if(id === temp.deptId) {
|
|
|
|
|
textArr.push(temp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
userTaskForm.text = textArr?.map(k => k.label).join() || null;
|
|
|
|
|
userTaskForm.text = textArr?.map(k => k.deptName).join() || null;
|
|
|
|
|
}
|
|
|
|
|
} else if (val === 'INITIATOR') {
|
|
|
|
|
userTaskForm.assignee = "${initiator}";
|
|
|
|
|
|