<template>
  <div>
    <TwoColumnPage>
      <template slot="left">
        <ItemLeftList ref="leftModal" @on-result-change="_leftResult" />
      </template>
      <template slot="right">
        <ItemRightList ref="rightModal" @on-result-change="_rightResult" />
      </template>
    </TwoColumnPage>
  </div>
</template>

<script>
import TwoColumnPage from '../../../components/base/TwoColumnPage'
import ItemLeftList from './ItemDispatchLeftList'
import ItemRightList from './ItemDispatchRightList'

export default {
  components: {
    TwoColumnPage,
    ItemLeftList,
    ItemRightList
  },
  data() {
    return {}
  },
  methods: {
    _leftResult(data) {
      this.$refs.rightModal._open(data)
    },
    _rightResult() {
      this.$refs.leftModal._page()
    },
    _open() {
      this.$refs.leftModal._open()
      this.$refs.rightModal._init()
    }
  }
}
</script>
