| | |
| | | watch: { |
| | | // 根据名称筛选部门树 |
| | | deptName(val) { |
| | | this.$refs.tree.filter(val); |
| | | console.log(val) |
| | | }, |
| | | treeId(newVal, oldVal) { |
| | | if (newVal) { |
| | |
| | | /** 查询用户列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | if(this.queryParams.deptId){ |
| | | listUser(this.addDateRange(this.queryParams, this.dateRange)).then( |
| | | (response) => { |
| | | response.rows.forEach((item, index) => { |
| | |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | } |
| | | |
| | | }, |
| | | /** 查询岗位列表 */ |
| | | getPostList() { |
| | |
| | | getDeptTree() { |
| | | deptTreeSelect().then((response) => { |
| | | this.deptOptions = response.data; |
| | | console.log( this.deptOptions) |
| | | this.treeId.push(this.deptOptions[0].id) |
| | | this.queryParams.deptId = this.deptOptions[0].id |
| | | console.log(this.queryParams.deptId) |
| | | }); |
| | | }, |
| | | // 筛选节点 |