<template>
  <div id="unit" class="flex-row" v-if="listpage" >
    <div :class="{'basic-main':((!isdetail) && (!usershow) && (!isdetail2)),'binary-left':isdetail||usershow||isdetail2}" >
      <security-check-ledger1 v-ref:list :row="row"></security-check-ledger1>
    </div>
    <div class="binary-right" style="overflow-y: scroll" v-if="isdetail">
      <security-check-ledger2 :checkrow="checkrow" ></security-check-ledger2>
    </div>
    <div class="binary-right" style="overflow-y: scroll" v-if="isdetail2">
      <security-check-ledger3 :checkrow="checkrow" ></security-check-ledger3>
    </div>
  </div>
</template>
<script>
import Vue from 'vue'

export default {
  title: '安检情况汇总',
  data () {
    return {
      f_userinfo_id: '',
      f_filialeid: this.$login.f.orgid,
      config: {
        isLimit: false, // 限购
        audit: false,  // 启用审核
        heatingSeason: false, // 采暖季
        deductionWay: 'cycle'  // 'cycle: 周期扣费； day: 日运算扣费； singleHS: 采暖季独立扣费； dayHS: 采暖季日扣费；' 此值不配置默认周期扣费
      },
      listpage: true,
      row: null,
      checkrow: null,
      parentData: '',
      isdetail: false,
      isdetail2: false,
      gasPriceShow: false,
      usershow: false,
      // 控制气价信息界面和变更操作记录界面的展示
      changeView: false,
      nocivilshow:true,
      modalshow:false,
    }
  },
  ready () {
  },
  methods: {
    cancel(obj) {
      this.listpage = true
    },
    dealMsg(val) {
      this.listpage = false
      this.f_userinfo_id = val.f_userinfo_id
    },
    selected (obj) {
      this.checkrow = obj.val
      this.isdetail = true
      this.isdetail2 = false
      this.usershow = false
      this.listpage = true
    },
    selected2 (obj) {
      this.checkrow = obj.val
      this.isdetail = false
      this.isdetail2 = true
      this.usershow = false
      this.listpage = true
    },
    refresh () {
      this.row = null
      this.gasPriceShow = false
      this.isdetail = false
      this.usershow =false
      this.listpage=true
      this.$refs.list.search()
    }
  },
  events: {
    'success' (name, row, res) {
      this.row = row
      this.gasPriceShow = false
      this.isdetail = false
      this.usershow =false
      this.listpage=true
      this.$refs.list.search()
    },
    'error' (name, row, res) {
      this.row = row
      this.gasPriceShow = false
      this.isdetail = false
      this.usershow =false
      this.listpage=true
      this.$refs.list.search()
    },
    'close' (res) {
      this.row = null
      this.gasPriceShow = false
      this.isdetail = false
      this.usershow =false
      this.listpage=true
    },
    'search' () {
      this.row = null
      this.gasPriceShow = false
      this.isdetail = false
      this.usershow =false
      this.listpage=true
      // this.$refs.list.search()
    }
  }
}
</script>
<style>

</style>
