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

<script>

import GrabDetail from "./grabDetail";
import GrabList from "./grabList";

export default {
  name: "AppGrabLog",
  components: {GrabList, GrabDetail},
  label: "抢单记录",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentComponent() {
      return !!this.$route.query.id ? GrabDetail : GrabList
    }
  },
  created() {
    this.dict.load("financingDemandStatus", "productRepaymentTimeline", "financialFundPurpose")
  }
}
</script>

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