<template>
  <div class="app-container">
    <transition name="el-zoom-in-center">
      <job-log-list v-if="options.showList" @showCard="showCard"></job-log-list>
    </transition>
    <transition name="el-zoom-in-bottom">
      <job-log-detail v-if="options.showDetail" :data="options.data" @showCard="showCard"></job-log-detail>
    </transition>
  </div>
</template>

<script>
import JobLogList from './JobLogList'
import JobLogDetail from './JobLogDetail'

export default {
  name: 'JobLog',
  components: { JobLogList, JobLogDetail },
  data () {
    return {
      options: {
        data: {},
        showList: true,
        showDetail: false
      }
    }
  },
  methods: {
    showCard (data) {
      Object.assign(this.options, data)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
