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

<script>

import LoanDetail from "./loanDetail";
import LoanList from "./loanList";

export default {
  name: "AppLoanAudit",
  components: {LoanList, LoanDetail},
  label: "贷款审核",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentComponent() {
      return !!this.$route.query.id ? LoanDetail : LoanList
    }
  },
  created() {
    this.dict.load("productRepaymentTimeline", "financialFundPurpose", "enterpriseAuditStatus", "financialLoanApplyStatus","financialOrganizationType")
  }
}
</script>

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