<template>
  <tab-button class="foot_tabset" :active="-1">
    <tabs header="指令分析" v-if="permission('指令分析')">
      <user-instruct-list v-if="show.includes('指令分析')"></user-instruct-list>
    </tabs>
    <tabs header="抄表分析" v-if="permission('抄表分析')">
      <user-gas-list v-if="show.includes('抄表分析')"></user-gas-list>
    </tabs>
    <tabs header="异常分析" v-if="permission('异常分析')">
      <total-exception-by-meter v-if="show.includes('异常分析')"></total-exception-by-meter>
    </tabs>
    <tabs header="失联分析" v-if="permission('失联分析')">
      <lost-contact-analysis-manage v-if="show.includes('失联分析')"></lost-contact-analysis-manage>
    </tabs>
    <tabs header="未用气分析" v-if="permission('未用气分析')">
      <new-webmeter-user-gas-all v-if="show.includes('未用气分析')"></new-webmeter-user-gas-all>
    </tabs>
    <tabs header="调价分析" v-if="permission('调价分析')">
      <price-instruct-manage v-if="show.includes('调价分析')"></price-instruct-manage>
    </tabs>
  </tab-button>

</template>

<script>
  import TabButton from '../sale/common/TabButton'
  import Tabs from '../sale/common/Tabs'

  export default {
    title: '物联分析',
    data () {
      return {
        show: []
      }
    },
    components: {Tabs, TabButton},
    methods: {
      permission (name) {
        // 保留是为了后面可能也会和综合查询一样加权限
        // if (this.$login.r.find(value => value == '物联查询')) {
        //   if (!this.$login.r.find(value => value == name)) {
        //     return false
        //   }
        // }
        return true
      }
    }
  }
</script>

<style scoped>
</style>
