|
|
@@ -292,7 +292,7 @@ export default {
|
|
|
roleOptions: [],
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
-
|
|
|
+ selectDeptId: undefined,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
@@ -350,6 +350,9 @@ export default {
|
|
|
methods: {
|
|
|
/** 查询用户列表 */
|
|
|
getList() {
|
|
|
+ if (this.selectDeptId) {
|
|
|
+ this.queryParams.deptId = this.selectDeptId
|
|
|
+ }
|
|
|
listUser(this.queryParams).then(response => {
|
|
|
this.userList = response.data.records;
|
|
|
this.total = response.data.total;
|
|
|
@@ -364,6 +367,7 @@ export default {
|
|
|
},
|
|
|
// 节点单击事件
|
|
|
deptSelect(data) {
|
|
|
+ this.selectDeptId = data
|
|
|
this.queryParams.deptId = data;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
@@ -437,6 +441,7 @@ export default {
|
|
|
this.reset();
|
|
|
getUser('').then(response => {
|
|
|
this.roleOptions = response.data.roles;
|
|
|
+ this.form.deptId = this.selectDeptId
|
|
|
this.open = true;
|
|
|
this.title = "添加用户";
|
|
|
this.form.password = this.initPassword;
|