This commit is contained in:
itcast 2025-12-24 18:39:53 +08:00
parent 1cff4203b1
commit 5472b1417b
1 changed files with 18 additions and 0 deletions

View File

@ -371,6 +371,11 @@ export default {
components: {Treeselect},
data() {
return {
// 1. ID
selectedDeptId: undefined,
// 2.
selectedDeptName: '',
// ...
//
loading: true,
//
@ -556,6 +561,8 @@ export default {
//
handleNodeClick(data) {
this.queryParams.deptId = data.id
this.selectedDeptId = data.id; // ID
this.selectedDeptName = data.label; //
this.handleQuery()
},
//
@ -614,6 +621,9 @@ export default {
this.dateRange = []
this.resetForm('queryForm')
this.queryParams.deptId = undefined
this.selectedDeptId = undefined; // ID
this.selectedDeptName = ''; //
this.$refs.tree.setCurrentKey(null)
this.handleQuery()
},
@ -654,6 +664,14 @@ export default {
this.open = true
this.title = '添加用户'
this.form.password = this.initPassword
// form.deptIdIDtreeselect
if (this.selectedDeptId) {
this.form.deptId = this.selectedDeptId;
// treeselect
this.$nextTick(() => {
this.$forceUpdate();
});
}
})
},
/** 修改按钮操作 */