<template>
  <tab-button :active="-1">
    <tabs header="用户稽查" v-if="permission('用户稽查')">
      <inspect-list-user v-if="show.includes('用户稽查')"></inspect-list-user>
    </tabs>
    <tabs header="购气稽查" v-if="permission('购气稽查')">
      <inspect-list-gas v-if="show.includes('购气稽查')"></inspect-list-gas>
    </tabs>
    <tabs header="错误查询" v-if="permission('错误查询')">
      <error-handplan-query v-if="show.includes('错误查询')"></error-handplan-query>
    </tabs>
    <tabs header="用气稽查" v-if="permission('用气稽查')">
      <gas-inspection v-if="show.includes('用气稽查')"></gas-inspection>
    </tabs>

  </tab-button>

</template>

<script>
  import TabButton from "../common/TabButton";
  import Tabs from "../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>
