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

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

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