MrShi
2024-02-05 5019ed6016b47221321bf395cd102dc4b51b4724
platform/src/components/system/role/PermissionConfigWindow.vue
@@ -26,7 +26,7 @@
<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 },
@@ -46,12 +46,14 @@
    /**
     * @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