<template>
  <tab-button class="foot_tabset" :active="-1">
    <tabs header="客户查询" v-if="permission('客户查询')">
      <user-query v-if="show.includes('客户查询')"></user-query>
    </tabs>
    <tabs header="表具查询" v-if="permission('表具查询')">
      <meter-query v-if="show.includes('表具查询')"></meter-query>
    </tabs>
    <tabs header="表具设备查询" v-if="permission('表具设备查询')">
      <equipment-query v-if="show.includes('表具设备查询')"></equipment-query>
    </tabs>
<!--    <tabs header="点火查询" v-if="permission('点火查询')">-->
<!--      <fire-query v-if="show.includes('点火查询')"></fire-query>-->
<!--    </tabs>-->
    <tabs header="综合档案信息查询" v-if="permission('综合档案信息查询')">
      <record-info-query v-if="show.includes('综合档案信息查询')"></record-info-query>
    </tabs>
    <tabs header="档案变更记录" v-if="permission('档案变更记录')">
      <changeuser-query v-if="show.includes('档案变更记录')" @deal-msg="dealMsg"></changeuser-query>
    </tabs>
    <tabs header="用户设备查询" v-if="permission('用户设备查询')">
      <user-equipment-query v-if="show.includes('用户设备查询')"></user-equipment-query>
    </tabs>
    <tabs header="调价记录查询" v-if="permission('调价记录查询')">
      <price-change-query v-if="show.includes('调价记录查询')"></price-change-query>
    </tabs>

    <tabs header="民用用气设备查询" v-if="permission('民用用气设备查询')">
      <my-gas-device-query v-if="show.includes('民用用气设备查询')"></my-gas-device-query>
    </tabs>

    <tabs header="非民用用气设备查询" v-if="permission('非民用用气设备查询')">
      <fmy-gas-device-query v-if="show.includes('非民用用气设备查询')"></fmy-gas-device-query>
    </tabs>
  </tab-button>

</template>

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