ProdTotal.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <a-row class="prod-total">
  3. <template v-for="(item, index) in wokbProd" :key="item.type">
  4. <a-col :xs="12" :sm="6" class="prod-total__item" :class="`prod-total__item-${index}`">
  5. <div class="img" :class="`prod-total__item-${index}-img`"></div>
  6. <div>{{ item.amount }}</div>
  7. <span>{{ item.type }}</span>
  8. </a-col>
  9. </template>
  10. </a-row>
  11. </template>
  12. <script lang="ts">
  13. import { defineComponent } from 'vue';
  14. import { Row, Col } from 'ant-design-vue';
  15. import { wokbProd } from '../data';
  16. // import {ProdTypeEnum} from '@/api/dashboard/model/wokbModel'
  17. export default defineComponent({
  18. components: { [Row.name]: Row, [Col.name]: Col },
  19. setup() {
  20. return { wokbProd };
  21. },
  22. });
  23. </script>
  24. <style lang="less" scoped>
  25. .prod-total {
  26. padding: 12px 4px 12px 12px;
  27. background: #fff;
  28. &__item {
  29. display: inline-block;
  30. flex: 0 0 calc(25% - 8px);
  31. padding: 20px 10px;
  32. margin-right: 8px;
  33. border-radius: 4px;
  34. span {
  35. font-size: 14px;
  36. line-height: 28px;
  37. }
  38. div {
  39. font-size: 26px;
  40. }
  41. .img {
  42. float: left;
  43. width: 62px;
  44. height: 62px;
  45. }
  46. &-0 {
  47. background: rgba(254, 97, 178, 0.1);
  48. &-img {
  49. background: url(../../../../assets/images/dashboard/wokb/datashow1.png) no-repeat;
  50. }
  51. div {
  52. color: #fe61b2;
  53. }
  54. }
  55. &-1 {
  56. background: rgba(254, 163, 64, 0.1);
  57. &-img {
  58. background: url(../../../..//assets/images/dashboard/wokb/datashow2.png) no-repeat;
  59. }
  60. div {
  61. color: #fea340;
  62. }
  63. }
  64. &-2 {
  65. background: rgba(172, 70, 255, 0.1);
  66. &-img {
  67. background: url(../../../..//assets/images/dashboard/wokb/datashow3.png) no-repeat;
  68. }
  69. div {
  70. color: #9e55ff;
  71. }
  72. }
  73. &-3 {
  74. background: rgba(0, 196, 186, 0.1);
  75. &-img {
  76. background: url(../../../..//assets/images/dashboard/wokb/datashow4.png) no-repeat;
  77. }
  78. div {
  79. color: #00c4ba;
  80. }
  81. }
  82. }
  83. }
  84. </style>