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

<script>
import PaList from "./paList";
import PaDetail from "./paDetail";

export default {
  name: "AppPortalAccount",
  components: {PaDetail, PaList},
  label: "用户账号(经营主体)",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentComponent() {
      return !!this.$route.query.id ? PaDetail : PaList
    }
  },
  created() {
    this.dict.load("portalUserStatus", "enterpriseStatus", "userEnterpriseStatus","enterpriseType")
  }
}
</script>

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