| | |
| | | }, |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getDeptTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getPostList(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |
| | |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then((res) => { |
| | | try { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | getDeptTree(tenantId).then((res) => { |
| | | try { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | getPostList(tenantId).then((res) => { |
| | | try { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-07-10 15:41:13 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-11-26 09:16:21 |
| | | * menu-name 保安员注册查询 |
| | | */ |
| | | <template> |
| | |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | <!-- <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | /> --> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | |
| | | if (parentId == 0) { |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | } 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, |
| | |
| | | }, |
| | | 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 (error) {} |
| | | }); |
| | | 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 (error) {} |
| | | }); |
| | | 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 (error) {} |
| | | }); |
| | | }, |
| | | |
| | |
| | | if (this.departmentid) { |
| | | deptId = this.departmentid; |
| | | } |
| | | params["deptId"] = deptId; |
| | | getListSecurity( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query), |
| | | deptId |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | |
| | | }, |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getDeptTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getPostList(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | try { |
| | | const column = this.findObject(this.option.group, "postId"); |
| | | } catch (error) {} |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |