index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <script setup lang="ts">
  2. import { shallowRef, onMounted } from "vue";
  3. import All from "./components/all.vue";
  4. import Business from "./components/business.vue";
  5. import { usePermission } from "/@/hooks/core";
  6. import NoAuth from "/@/components/NoAuth/NoAuth.vue";
  7. const pageName = "supplierBusinessAnalysis"
  8. const actived = shallowRef("");
  9. const { hasPermissionWithCode } = usePermission(pageName);
  10. // onMounted(() => {
  11. // if (hasPermissionWithCode("3")) {
  12. // actived.value = "3";
  13. // } else if (hasPermissionWithCode("11")) {
  14. // actived.value = "11";
  15. // }
  16. // });
  17. </script>
  18. <template>
  19. <div class="report-container">
  20. <!-- <el-tabs v-model="actived" style="color: #fff" v-if="actived === '11'"> -->
  21. <!-- <el-tab-pane label="查看全部" name="3" v-if="hasPermissionWithCode('3')">
  22. <all v-if="actived === '3'" />
  23. </el-tab-pane> -->
  24. <!-- <el-tab-pane
  25. name="11"
  26. label="查看供应商"
  27. v-if="hasPermissionWithCode('11')"
  28. > -->
  29. <business />
  30. <!-- </el-tab-pane> -->
  31. <!-- </el-tabs> -->
  32. <!-- <no-auth v-else /> -->
  33. </div>
  34. </template>
  35. <style scoped lang="scss">
  36. .report-container {
  37. height: calc(100vh - 48px);
  38. :deep(.el-tabs__header) {
  39. background-color: #fff;
  40. padding: 10px 10px 0;
  41. }
  42. }
  43. </style>