| | |
| | | /* |
| | | * @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-09-17 17:13:04 |
| | | * menu-name 保安员注册查询 |
| | | */ |
| | | <template> |
| | | <div> |
| | | <el-row class="registersss"> |
| | | <el-col :span="spanLeft"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="spanRight"> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option" |
| | | :search.sync="search" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <!-- @on-load="onLoad" --> |
| | | <!-- @row-click="handleRowClick" --> |
| | | <!-- <template slot-scope="{row}" |
| | | slot="tenantName"> |
| | | <el-tag>{{row.tenantName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="roleName"> |
| | | <el-tag>{{row.roleName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="deptName"> |
| | | <el-tag>{{row.deptName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="userTypeName"> |
| | | <el-tag>{{row.userTypeName}}</el-tag> |
| | | </template> --> |
| | | <template slot-scope="{ row }" slot="deptId"> |
| | | <el-tag |
| | | class="rowClickSelf" |
| | |
| | | deptTree: [], |
| | | }, |
| | | |
| | | treeDeptId: "", |
| | | jurisdiction: "", |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: "id", |
| | | defaultExpandAll: true, |
| | | 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, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "value", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | |
| | | option: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | |
| | | searchSpan: 5, |
| | | display: false, |
| | | overHidden: true, |
| | | search: true, |
| | | // search: true, |
| | | width: 280, |
| | | }, |
| | | { |
| | |
| | | }; |
| | | this.dialogVisible = true; |
| | | }, |
| | | nodeClick(data) { |
| | | // this.treeDeptId = data.id; |
| | | // console.log(data, 55555); |
| | | if (data.title != "南昌市公安局") { |
| | | this.jurisdiction = data.id; |
| | | } else { |
| | | this.jurisdiction = ""; |
| | | } |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | }, |
| | | initData(tenantId) { |
| | | getRoleTree(tenantId).then((res) => { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | |
| | | this.loading = true; |
| | | params["jurisdiction"] = this.jurisdiction; |
| | | if (this.departmentid) { |
| | | deptId = this.departmentid; |
| | | params["deptId"] = this.departmentid; |
| | | } |
| | | 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; |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | |
| | | platformSelectionClear() { |
| | | this.platformSelectionList = []; |
| | | this.$refs.platformCrud.toggleSelection(); |