| | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { createRolePermission } from '@/api/system/role' |
| | | import { fetchAll, fetchAllCom } from '@/api/system/permission' |
| | | import { fetchAll } from '@/api/system/permission' |
| | | export default { |
| | | name: 'PermissionConfigWindow', |
| | | components: { GlobalWindow }, |
| | |
| | | /** |
| | | * @role 角色对象 |
| | | */ |
| | | open (role, type=0) { |
| | | debugger |
| | | open (role) { |
| | | if (this.$refs.permissionTransfer) { |
| | | this.$refs.permissionTransfer.clearQuery('left') |
| | | this.$refs.permissionTransfer.clearQuery('right') |
| | | } |
| | | let action = type==0 ? fetchAll : fetchAllCom |
| | | action() |
| | | fetchAll() |
| | | .then(records => { |
| | | this.role = role |
| | | this.permissions = records |