<template>
  <div id="unit" class="flex-row" style="height: 100%">
    <div class="basic-main">
    <dep-list  @select-changed="selected"
              style="width:auto;"
              v-ref:todolist></dep-list>
    </div>
    <div class="binary-right" style="width: 60%;" v-if="row">
      <dep-compile-list v-if="row" :data="row" :look='true'></dep-compile-list>
    </div>
  </div>
</template>
<script>
  import {HttpResetClass} from 'vue-client'
  export default {
    title: '部门管理',
    data () {
      return {
        row: null,
      }
    },
    methods: {
      //选中数据实现两边数据绑定
      async selected (obj) {
        delete obj.val.num
        this.row = null
        this.row = obj.val
      }
    },
    events: {
      //返回
      'cancel' () {
        this.row = null
      },
    }
  }
</script>
<style>
</style>
