修改可拖拽部门树

This commit is contained in:
weiwei committed 2025-02-18 11:12:15 +08:00
1 parent 2d0948e7ba
commit a6b0903481
3 files changed
+78 -126

No files matched your search

+10 -10
View File
@@ -7,8 +7,8 @@
:query="deptData.queryList"
:show-expand="true"
@node-click="handleNodeClick"
@treeDeepSearch="treeDeepSearch"
@treeNodeCheckChange="treeNodeCheckChange"
@treeDeepSearch="treeDeepSearch"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
@@ -236,23 +236,17 @@ const deptData = reactive({
},
})
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
// 清空搜索条件
const resetQuery = () => {
queryRef.value?.resetFields()
state.queryForm.deptId = ""
draggableDepTreeRef.value.getTreeData()
draggableDepTreeRef.value.resetData()
getDataList()
}
// 点击树
const handleNodeClick = (e: any) => {
state.queryForm.deptId = e.id
const handleNodeClick = (clickedNode: any) => {
state.queryForm.deptId = clickedNode.id
getDataList()
}
@@ -262,6 +256,12 @@ const treeNodeCheckChange = (checkedNodes: any) => {
getDataList()
}
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
// 导出excel
const exportExcel = () => {
downBlobFile("/admin/user/export", Object.assign(state.queryForm, { ids: selectObjs }), "users.xlsx")