<template>
  <section class="AppPortalUser">
    <component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
  </section>
</template>

<script>

import PumDetail from "./pumDetail";
import PumList from "./pumList";

export default {
  name: "AppPortalUser",
  components: {PumList, PumDetail},
  label: "经营主体",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentComponent() {
      return !!this.$route.query.id ? PumDetail : PumList
    }
  },
  data() {
    return {}
  },
  created() {
    this.dict.load("enterpriseType", "enterpriseStatus", "enterpriseAuditStatus")
  }
}
</script>

<style lang="scss" scoped>
.AppPortalUser {
  height: 100%;
}
</style>
