| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-09-10 16:47:56 |
| | | * @Last Modified time: 2021-09-18 09:42:02 |
| | | * menu-name 保安员注册查询 |
| | | */ |
| | | <template> |
| | |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | |
| | | |
| | | |
| | | if (parentId == 0) { |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | |
| | | resolve( |
| | | |
| | | res.data.data.map((item) => { |
| | | |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | |
| | | }) |
| | | |
| | | ); |
| | | |
| | | }); |
| | | } else if (parentId == '1372091709474910209') { |
| | | |
| | | } else if (parentId == "1372091709474910209") { |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | |
| | | resolve( |
| | | |
| | | res.data.data[0].children.map((item) => { |
| | | |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | |
| | | }) |
| | | |
| | | ); |
| | | |
| | | }); |
| | | } else { |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | res.data.data = []; |
| | | resolve( |
| | | |
| | | res.data.data.map((item) => { |
| | | |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | |
| | | }) |
| | | |
| | | ); |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | |
| | | }, |
| | | "excelForm.isCovered"() { |
| | | if (this.excelForm.isCovered !== "") { |
| | | const column = this.findObject(this.excelOption.column, "excelFile"); |
| | | column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`; |
| | | try { |
| | | const column = this.findObject(this.excelOption.column, "excelFile"); |
| | | column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`; |
| | | } catch {} |
| | | } |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | column.dicData = res.data.data; |
| | | try { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | getDeptTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | try { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | getPostList(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | column.dicData = res.data.data; |
| | | try { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | }, |
| | | |