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

    <div  :class="{'basic-main':!showItem,'binary-left':showItem}" >
          <select-check-plan_outhelp @select-changed="selected" :style="style" :style2="style2" @checkstatus-changed="checkstatusChange" v-ref:check></select-check-plan_outhelp>
        </div>
    <div  class="binary-right" v-show="showItem">
      <div class="flex">
          <check-detail_outhelp v-if='$refs.check && $refs.check.selected' :residentialarea = '$refs.check.f_residential_area' :planname ='$refs.check.planname'  :check='$refs.check.selected' :checkstatus="checkstatus" :starttime="$refs.check.f_start_time" :endtime="$refs.check.f_end_time" :checkstart="$refs.check.f_check_start" :checkstart="$refs.check.f_check_start" :checkend="$refs.check.f_check_end"
                        v-ref:detail></check-detail_outhelp>
        </div>
    </div>
  </div>
</template>

<script>
    import SelectCheckPlan from './SelectCheckPlan'
    import CheckDetail from './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>
