<template>
  <tab-button v-ref:list>
    <tabs header="计划下发" v-if="permission('计划下发')">
      <machine-down v-if="show.includes('计划下发')"></machine-down>
    </tabs>
    <tabs header="机表抄表" v-if="permission('机表抄表')">
      <machine-hand v-if="show.includes('机表抄表')"></machine-hand>
    </tabs>
    <tabs header="抄表审核" v-if="permission('抄表审核')">
      <machine-hand-audit v-if="show.includes('抄表审核')"></machine-hand-audit>
    </tabs>
    <tabs header="抄表查询" v-if="permission('抄表查询')">
      <sale-handplan-query v-if="show.includes('抄表查询')"></sale-handplan-query>
    </tabs>
    <tabs header="欠费查询" v-if="permission('欠费查询')">
      <sale-arrears-query v-if="show.includes('欠费查询')"></sale-arrears-query>
    </tabs>
    <!--<tabs header="帮助" title="核心配置项:机表抄表管理，包含页面配置项:计划下发、机表抄表、抄表审核、抄表查询、欠费查询">-->
      <!--<div style="align-content: center">-->
        <!--<span><h3>核心配置项:机表抄表管理</h3></span>-->
        <!--<br/>-->
        <!--<span><h4>包含页面配置项:计划下发、机表抄表、抄表审核、抄表查询、欠费查询</h4></span>-->
      <!--</div>-->

    <!--</tabs>-->
  </tab-button>
</template>
<script>
  import TabButton from './../comprehen/common/TabButton'
  import Tabs from './../comprehen/common/Tabs'
  export default {
    name: 'machineHandManager',
    title: '机表抄表管理',
    data () {
      return {// 页面开关
        f_start_date: '',
        f_end_date: '',
        listpage: true,
        width: {
          left: '100%',
          right: '0%'
        },
        showupload: false,
        // searchNumber:'',
        rowData: {},
        show: []
      }
    },
    components: {Tabs, TabButton},
    ready () {
      console.log(this.$refs.list)
    },
    methods: {
      permission (name) {
        if (this.$login.r.find(value => value == '机表抄表管理')) {
          if (!this.$login.r.find(value => value == name)) {
            return false
          }
        }
        return true
      },
      cancel (obj) {
        this.listpage = true
      },
      dealMsg (obj) {
        this.rowData = obj
        this.listpage = false
        console.log(obj.model)
        this.f_start_date = obj.model.startDate
        this.f_end_date = obj.model.endDate
      }
    }
  }
</script>

<style scoped>

</style>
