<template>
  <div class="nowCount pagePadding">
    <div
      v-if=" powers.some((i) => i == '001')"
    >
      <div style="width: 100%">
        <el-row>
          <el-col>
            <el-tabs v-model="activeName">
               <el-tab-pane label="商品维度" name="productWeido"
                ><product-weido
              /></el-tab-pane>
             <el-tab-pane label="仓库维度" name="dataWeido">
                <data-weido
              /></el-tab-pane>
               <el-tab-pane label="区间统计" name="count">
                <space-count
              /></el-tab-pane>
            </el-tabs>
          </el-col>
        </el-row>
      </div>
    </div>
    <div v-else>
      <no-auth></no-auth>
    </div>
  </div>
</template>
   <script>
import mixinPage from "@/mixins/elPaginationHandle";
import resToken from "@/mixins/resToken";
import DataWeido from "./components/dataWeido";
import ProductWeido from "./components/productWeido";
import SpaceCount from "./components/spaceCount";

import { mapGetters } from "vuex";

export default {
  name: "stockCount",
  mixins: [mixinPage, resToken],
  components: {
    DataWeido,
    ProductWeido,
    SpaceCount,
  },
  computed: {
    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
    powers() {
      const tran =
        this.$store.getters.btnList.find(
          (item) => item.menu_route == "stockCount"
        ) || {};
      const { action } = tran ?? {};
      return action ?? [];
    },
  },
  data() {
    return {
      activeName: "productWeido", //默认选中的区间统计选项
    };
  },
  methods: {},
};
</script>
   