<template>
    <div id="unit" class="flex-row" :class="{'binary':showItem}">
      <div :class="{'basic-main':!showItem,'binary-left':showItem}">
        <check-search-area class="flex" :tempval="hidden" :style="style" :style2="style2"  @select-changed="selected"
                           @canel-main="close" v-ref:checksearch></check-search-area>
      </div>
      <div class="binary-right" v-show="showItem">
        <div class="flex">
          <check-user-list style="height: 100%" :row="rowData"></check-user-list>
        </div>
      </div>
    </div>
  </template>

<script>

  export default {
    title: '小区安检率统计查询',
    name: 'CheckPaperSearchUser',
    data() {
      return {
        style: 'col-sm-2 form-group',
        style2: 'col-sm-4 form-group',
        hidden: true,
        barwidth: '100%',
        showItem: false,
        rowData: {}
      }
    },
    methods: {
      show() {
        this.showItem = this.showItem ? false : true
      },
      selected(row) {
        this.showItem = true
        this.barwidth = '60%'
        this.rowData = row.val
        this.hidden = false
        //tag
      },

      close() {
        this.showItem = false
        this.barwidth = '100%'
        this.hidden = true
      }
    }
  }

</script>

