<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
    }
  },
  data() {
    return {}
  },
  created() {
    this.dict.load("enterpriseName")
  }
}
</script>

<style lang="scss" scoped>
.AppGrabLog {
}
</style>
