| | |
| | | :visible.sync="box" |
| | | width="345px"> |
| | | <el-tabs type="border-card"> |
| | | <el-tab-pane label="菜单权限"> |
| | | <el-tab-pane label="权限"> |
| | | <el-tree :data="menuGrantList" |
| | | show-checkbox |
| | | node-key="id" |
| | |
| | | :props="props"> |
| | | </el-tree> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="数据权限"> |
| | | <!-- <el-tab-pane label="数据权限"> |
| | | <el-tree :data="dataScopeGrantList" |
| | | show-checkbox |
| | | node-key="id" |
| | |
| | | :default-checked-keys="apiScopeTreeObj" |
| | | :props="props"> |
| | | </el-tree> |
| | | </el-tab-pane> |
| | | </el-tab-pane> --> |
| | | </el-tabs> |
| | | |
| | | <span slot="footer" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {add, getList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role"; |
| | | import {add, getList, getRoleList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role"; |
| | | import {mapGetters} from "vuex"; |
| | | import website from '@/config/website'; |
| | | |
| | |
| | | }, |
| | | submit() { |
| | | const menuList = this.$refs.treeMenu.getCheckedKeys(); |
| | | const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
| | | const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
| | | const dataScopeList = []; |
| | | const apiScopeList = []; |
| | | grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { |
| | | this.box = false; |
| | | this.$message({ |
| | |
| | | grantTree() |
| | | .then(res => { |
| | | this.menuGrantList = res.data.data.menu; |
| | | this.dataScopeGrantList = res.data.data.dataScope; |
| | | this.apiScopeGrantList = res.data.data.apiScope; |
| | | // this.dataScopeGrantList = res.data.data.dataScope; |
| | | // this.apiScopeGrantList = res.data.data.apiScope; |
| | | getRole(this.ids).then(res => { |
| | | this.menuTreeObj = res.data.data.menu; |
| | | this.dataScopeTreeObj = res.data.data.dataScope; |
| | | this.apiScopeTreeObj = res.data.data.apiScope; |
| | | // this.dataScopeTreeObj = res.data.data.dataScope; |
| | | // this.apiScopeTreeObj = res.data.data.apiScope; |
| | | this.box = true; |
| | | }); |
| | | }); |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | getRoleList(Object.assign(params, this.query)).then(res => { |
| | | this.data = res.data.data; |
| | | this.loading = false; |
| | | this.selectionClear(); |