productInfo.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div style="padding-right: 10px;">
  3. <a-card title="产品数量" :bordered="false">
  4. <a-row>
  5. <a-col :span="8">
  6. <div class="item">
  7. <p class="title">产品总数</p>
  8. <countUp v-if="data.prodcut" :endVal="data.prodcut && data.prodcut.total"></countUp>
  9. </div>
  10. </a-col>
  11. <a-col :span="8">
  12. <div class="item">
  13. <p class="title">正常数量</p>
  14. <countUp v-if="data.prodcut" :endVal="data.prodcut && data.prodcut.used"></countUp>
  15. </div>
  16. </a-col>
  17. <a-col :span="8">
  18. <div class="item">
  19. <p class="title">禁用数量</p>
  20. <countUp v-if="data.prodcut" :endVal="data.prodcut && data.prodcut.unused"></countUp>
  21. </div>
  22. </a-col>
  23. </a-row>
  24. </a-card>
  25. </div>
  26. </template>
  27. <script setup>
  28. import countUp from './countUp.vue'
  29. import {ref, defineProps, defineEmits} from 'vue'
  30. import Api from '@/api/api'
  31. import utils from '@/utils/utils'
  32. let emit = defineEmits([])
  33. let props = defineProps(['data'])
  34. </script>
  35. <style scoped>
  36. .item {
  37. background: linear-gradient(to right,rgba(235, 245, 253, 1),rgba(255, 255, 255, 1));
  38. padding: 12rem 12rem 0 12rem;
  39. box-shadow: 0px 0px 6rem 1px rgba(0,70,132,0.2);
  40. margin-right: 16rem;
  41. }
  42. .title {
  43. font-size: 14rem;
  44. margin-bottom: 0px;
  45. }
  46. .item p:last-child {
  47. font-weight: bold;
  48. font-size: 30rem;
  49. margin-bottom: 0 !important;
  50. }
  51. /deep/.ant-card-head-title {
  52. font-size: 16rem !important;
  53. }
  54. /deep/.ant-card-body {
  55. padding: 24rem !important;
  56. }
  57. /deep/.ant-card-head-title {
  58. padding-bottom: 10rem !important;
  59. }
  60. </style>