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