| | |
| | | </div> |
| | | <div class="head-container"> |
| | | <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" |
| | | :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current |
| | | :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all :default-expanded-keys="treeId" highlight-current |
| | | @node-click="handleNodeClick" /> |
| | | </div> |
| | | </el-col> |
| | |
| | | userInfoList: [], |
| | | hospList: [], |
| | | activeNames: ["1"], |
| | | treeId: [], |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | |
| | | deptName(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | treeId(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.$nextTick(() => { |
| | | document |
| | | .querySelector('.el-tree-node__children .el-tree-node__content') |
| | | .click(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | type() { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDeptTree(); |
| | | this.getList(); |
| | | |
| | | // this.getRoleList(); |
| | | // this.getConfigKey("sys.user.initPassword").then((response) => { |
| | | // this.initPassword = response.msg; |
| | |
| | | getDeptTree() { |
| | | deptTreeSelect().then((response) => { |
| | | this.deptOptions = response.data; |
| | | this.treeId.push(this.deptOptions[0].id) |
| | | this.queryParams.deptId = this.deptOptions[0].id |
| | | }); |
| | | }, |
| | | // 筛选节点 |