<template>
  <!--预约安检和开户计划下发-->
  <div id="unit" class="flex-row" v-show="!itemShow">
    <!--展示查询界面-->
    <order-and-open-plan-list class="flex datapanel" style="width:100%;" @select-changed="selected" @additem="additem"></order-and-open-plan-list>
    <div style="width: 50%;" class="flex datapanel" v-if="showItem">
      <div style="height:100%;overflow: auto;">
        <plan-uers-list style="height: 100%;" :item="rowData"  v-ref:uerslist></plan-uers-list>
      </div>
    </div>
  </div>
</template>

<script>
  import OrderAndOpenPlanList from './OrderAndOpenPlanList'
  import PlanUersList from './PlanUersList'

  export default {
    title: '安检计划下发',
    components: { OrderAndOpenPlanList, PlanUersList },
    data () {
      return {
        showItem:false,
        rowData:{},
        itemShow:false,
        checkplan:{}
      }
    },
    methods: {
      additem(row){
        this.checkplan = row
        this.itemShow = true
      },
      show () {
        this.showItem = this.showItem ? false : true
      },
      finish(){
        this.itemShow = false
        this.$refs.uerslist.search()
      },
      selected (row) {
        this.showItem = true
        this.rowData = row.val
      }
    }
  }

</script>
<style>
  .datapanel {
    color: #333;
    background-color: white;
    box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
    padding: 5px 7px 5px 7px;
    border-radius:10px;
  }
</style>
