✨ 再次点击组织取消人员筛选

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-21 11:53:55 +08:00
parent 4a0af452e8
commit c1863d0b6a
+15 -2
View File
@@ -4,7 +4,7 @@
<div class="box">
<el-scrollbar>
<basic-container>
<avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
<avue-tree ref="deptTree" :option="treeOption" :data="treeData" @node-click="nodeClick" />
</basic-container>
</el-scrollbar>
</div>
@@ -647,7 +647,17 @@ export default {
},
methods: {
nodeClick(data) {
this.treeDeptId = data.id;
const deptId = data?.id;
if (deptId != null && String(this.treeDeptId) === String(deptId)) {
this.treeDeptId = '';
this.page.currentPage = 1;
this.$nextTick(() => {
this.$refs.deptTree?.setCurrentKey?.(null);
});
this.onLoad(this.page);
return;
}
this.treeDeptId = deptId;
this.page.currentPage = 1;
this.onLoad(this.page);
},
@@ -1075,6 +1085,9 @@ export default {
searchReset() {
this.query = {};
this.treeDeptId = '';
this.$nextTick(() => {
this.$refs.deptTree?.setCurrentKey?.(null);
});
this.onLoad(this.page);
},
searchChange(params, done) {