<template>
  <a-card :bordered="false" :class="$style.newcard">
    <a-tabs default-active-key="1" class="sd-has-table ">
      <a-tab-pane key="1" tab="维护权限配置">
        <iam-audit-editpermission :lib-category="type"></iam-audit-editpermission>
      </a-tab-pane>
      <a-tab-pane key="2" tab="查看权限配置" force-render>
        <iam-audit-viewpermission :lib-category="type"></iam-audit-viewpermission>
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>

<script>
import iamAuditEditpermission from './iam-audit-editpermission.vue'
import iamAuditViewpermission from './iam-audit-viewpermission.vue'
import PermissionService from './permission-service'
import components from './_import-components/permission-config-import'

export default {
  name: 'PermissionConfig',
  metaInfo: {
    title: '分级授权维护',
  },
  components: {
    ...components,
    iamAuditEditpermission,
    iamAuditViewpermission,
  },
  data() {
    return {
      type: 'SJ',
      orgId: 1,
      orgName: '',
      editpermission: [],
      viewpermission: [],
      config: [],
    }
  },
  mounted() {},
  created() {
    // PermissionService.getParentOrgInfo().then((res) => {
    //   if (res.data.length > 0) {
    //     this.orgId = res.data[0].id
    //     this.orgName = res.data[0].text
    //   }
    // })
    if (this.$route.query.type !== undefined) {
      this.type = this.$route.query.type
    }
  },
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
