<template>
  <section class="AppCreditReportApply">
    <component :is="currentPage" v-bind="$props"/>
  </section>
</template>

<script>
import List from "./list";
import Add from "./add";

export default {
  name: "AppCreditReportApply",
  components: {Add, List},
  label: "信息报告申请",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentPage() {
      let {hash} = this.$route
      return hash == "#add" ? Add : List
    }
  },
  created() {
    this.dict.load('creditReportType')
  }
}
</script>

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