<template>
  <div class="pagePadding">
    <div v-if="powers.some((i) => i == '001')">
      <el-tabs v-model="activeName">
        <el-tab-pane label="商品基本信息报表" name="table3">
          <table3 v-if="activeName == 'table3'"></table3>
        </el-tab-pane>
        <el-tab-pane label="商品成本信息报表" name="table1">
          <table1 v-if="activeName == 'table1'"></table1>
        </el-tab-pane>
        <el-tab-pane label="商品售价信息报表" name="table2">
          <table2 v-if="activeName == 'table2'"></table2>
        </el-tab-pane>
      </el-tabs>
    </div>
    <div v-else>
      <no-auth></no-auth>
    </div>
  </div>
</template>

<script>
import mixinPage from "@/mixins/elPaginationHandle";
import resToken from "@/mixins/resToken";
import { mapGetters } from "vuex";
//标签页组件引入
const table1 = () => import("./components/table1");
const table2 = () => import("./components/table2");
const table3 = () => import("./components/table3");
export default {
  mixins: [mixinPage, resToken],
  components: {
    table1,
    table2,
    table3,
  },

  computed: {
    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
    powers() {
      const tran =
        this.$store.getters.btnList.find((i) => i.menu_route == "productReport") || {};
      const { action } = tran ?? {};
      return action ?? [];
    },
  },
  data() {
    return {
      activeName: "table3",
    };
  },
  methods: {
    //   handleClick(tab, event) {
    //     console.log(tab, event);
    //   }
  },
};
</script>

<style lang="scss" scoped></style>
