BdcTabCard.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <a-card :loading="loading" :bordered="false" :body-style="{ padding: '0' }">
  3. <div class="salesCard">
  4. <a-tabs default-active-key="1" size="large" :tab-bar-style="{ marginBottom: '24px', paddingLeft: '16px' }">
  5. <template #rightExtra>
  6. <div class="extra-wrapper">
  7. <div class="extra-item">
  8. <a>今日</a>
  9. <a>本周</a>
  10. <a>本月</a>
  11. <a>本年</a>
  12. </div>
  13. <a-range-picker :style="{ width: '256px' }" />
  14. </div>
  15. </template>
  16. <a-tab-pane loading="true" tab="受理监管" key="1">
  17. <a-row>
  18. <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
  19. <QuickNav :loading="loading" class="enter-y" :bordered="false" :body-style="{ padding: 0 }" />
  20. </a-col>
  21. </a-row>
  22. </a-tab-pane>
  23. <a-tab-pane tab="交互监管" key="2">
  24. <a-row>
  25. <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
  26. <QuickNav :loading="loading" class="enter-y" :bordered="false" :body-style="{ padding: 0 }" />
  27. </a-col>
  28. </a-row>
  29. </a-tab-pane>
  30. <a-tab-pane tab="存储监管" key="3">
  31. <a-row>
  32. <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
  33. <QuickNav :loading="loading" class="enter-y" :bordered="false" :body-style="{ padding: 0 }" />
  34. </a-col>
  35. </a-row>
  36. </a-tab-pane>
  37. </a-tabs>
  38. </div>
  39. </a-card>
  40. </template>
  41. <script lang="ts" setup>
  42. import { ref, computed } from 'vue';
  43. import QuickNav from './QuickNav.vue';
  44. import { useRootSetting } from '/@/hooks/setting/useRootSetting';
  45. defineProps({
  46. loading: {
  47. type: Boolean,
  48. },
  49. });
  50. const { getThemeColor } = useRootSetting();
  51. const interactiveColor = ref();
  52. const rankList = [];
  53. for (let i = 0; i < 7; i++) {
  54. rankList.push({
  55. name: '白鹭岛 ' + (i + 1) + ' 号店',
  56. total: 1234.56 - i * 100,
  57. });
  58. }
  59. const barData = [];
  60. for (let i = 0; i < 12; i += 1) {
  61. barData.push({
  62. name: `${i + 1}月`,
  63. value: Math.floor(Math.random() * 1000) + 200,
  64. });
  65. }
  66. const barMultiData = [];
  67. for (let j = 0; j < 2; j++) {
  68. for (let i = 0; i < 12; i += 1) {
  69. barMultiData.push({
  70. type: j == 0 ? 'jeecg' : 'jeebt',
  71. name: `${i + 1}月`,
  72. value: Math.floor(Math.random() * 1000) + 200,
  73. });
  74. }
  75. }
  76. const seriesColor = computed(() => {
  77. interactiveColor.value = [
  78. { type: 'jeecg', color: getThemeColor.value },
  79. { type: 'jeebt', color: getRandomColor() },
  80. ];
  81. return getThemeColor.value;
  82. });
  83. function getRandomColor() {
  84. var letters = '0123456789ABCDEF';
  85. var color = '#';
  86. for (var i = 0; i < 6; i++) {
  87. color += letters[Math.floor(Math.random() * 16)];
  88. }
  89. return color;
  90. }
  91. </script>
  92. <style lang="less" scoped>
  93. .extra-wrapper {
  94. line-height: 55px;
  95. padding-right: 24px;
  96. .extra-item {
  97. display: inline-block;
  98. margin-right: 24px;
  99. a {
  100. margin-left: 24px;
  101. }
  102. }
  103. }
  104. </style>