<template>
  <div id="unit" class="flex-row" style="width: 100%">
    <div class="flex binary-left" style="flex: 1; width:60%">
      <safe-check-order-list @select-changed="selected" :style="style" :style2="style2" v-ref:list></safe-check-order-list>
    </div>
    <div class="flex binary-left" style="width:40%" v-if="showItem">
      <safe-check-order-apply-dispose-basics
        :row = "row"
        :title="title">
      </safe-check-order-apply-dispose-basics>
    </div>
  </div>
</template>

<script>
  export default {
    title: '整改审核',
    data () {
      return {
        row: {},
        title: '用户自行整改处理',
        showItem: false,
        style: 'col-sm-2 form-group',
        style2: 'col-sm-4 form-group'
      }
    },
    ready () {
    },
    methods: {
      init () {
        this.row = {}
      },
      selected(row) {
        this.init()
        this.row = row.val
        this.showItem = true
      },
      hidden() {
        this.showItem = !this.showItem
      },
      //  审核完成回调
      completeCheck() {
        this.$refs.list.search()
        this.showItem = false
      }
    },
    watch: {
      'showItem'(val) {
        //tag
        //tag
        if (val) {
          this.style = 'col-sm-3 form-group'
          this.style2 = 'col-sm-6 form-group'
        } else {
          this.style = 'col-sm-2 form-group'
          this.style2 = 'col-sm-4 form-group'
        }
      }
    }
  }
</script>
<style>
</style>
