<template>
  <div id="unit" class="flex-row" :class="{'binary':showItem}">
<!--    <section>-->

    <div  :class="{'basic-main':!showItem,'binary-left':showItem}" >
          <select-check-noplan @select-changed="selected" :style="style" :style2="style2" @checkstatus-changed="checkstatusChange" v-ref:check></select-check-noplan>
        </div>
    <div  class="binary-right" v-show="showItem">
      <div class="flex">
          <check-nodetail v-if='$refs.check && $refs.check.selected' :check='$refs.check.selected' :checkstatus="checkstatus" :checkstart="$refs.check.f_start_time" :checkend="$refs.check.f_end_time"
                        v-ref:detail></check-nodetail>
        </div>
    </div>

<!--    </section>-->
  </div>
</template>

<script>
    import SelectCheckPlan from '././SelectCheckPlan'
    import CheckDetail from './../../../components/checkplan/CheckDetail'

    export default {
        title: '无计划安检单汇总',
        props: ['f'],
        components: {SelectCheckPlan, CheckDetail},
        data() {
            return {
                showItem: false,
                checkstatus: null,
              style:'col-sm-2 form-group',
              style2:'col-sm-4 form-group'
            }
        },
        methods: {
          selected(row) {
            // //tag
            this.showItem = true
          },
          checkstatusChange(val){
            this.checkstatus = val
          }
        }
    }
</script>
<style>
  .form-input-group label {
    text-align: right;
    width: auto;
  }

  .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>
