audit-data.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="home-container">
  3. <el-card class="home-container__card">
  4. <div class="title">
  5. <span>
  6. 业务看板
  7. </span>
  8. <span>
  9. <i
  10. class="el-icon-refresh-right"
  11. style="cursor: pointer;font-size:20px"
  12. @click="refresh"
  13. ></i>
  14. </span>
  15. </div>
  16. <div class="content" v-loading="loading">
  17. <div class="content-item" v-for="(item, index) in list" :key="index">
  18. <div class="card">
  19. <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
  20. <div class="card-content">
  21. <span class="card-content-num">{{ item.qty }}</span>
  22. <span class="card-content-text">{{ item.text }}</span>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </el-card>
  28. </div>
  29. </template>
  30. <script>
  31. import {
  32. checkDate,
  33. shipCheckDate,
  34. financeCheck,
  35. count
  36. } from "@/api/wel";
  37. export default {
  38. name: "basicContainer",
  39. props: {
  40. sysType: Number
  41. },
  42. data() {
  43. return {
  44. loading: false,
  45. list: [
  46. { icon: "el-icon-s-order", qty: "0", text: "今日新增柜数" },
  47. { icon: "el-icon-s-order", qty: "0", text: "未安排柜数" },
  48. { icon: "el-icon-s-goods", qty: "0", text: "今日派车数" },
  49. { icon: "el-icon-s-home", qty: "0", text: "可用车辆数" }
  50. ],
  51. tradeType: null
  52. };
  53. },
  54. created() {
  55. this.getSysType();
  56. },
  57. methods: {
  58. getCheckDate() {
  59. this.loading = true;
  60. count({ tradeType: this.tradeType })
  61. .then(res => {
  62. console.log(res.data.data)
  63. this.list.forEach(e => {
  64. if(e.text == "今日新增柜数")e.qty = res.data.data.newly
  65. if(e.text == "未安排柜数")e.qty = res.data.data.inactive
  66. if(e.text == "今日派车数")e.qty = res.data.data.send
  67. if(e.text == "可用车辆数")e.qty = res.data.data.usable
  68. });
  69. })
  70. .finally(() => {
  71. this.loading = false;
  72. });
  73. },
  74. refresh() {
  75. this.getCheckDate()
  76. }
  77. }
  78. };
  79. </script>
  80. <style lang="scss" scoped>
  81. .home-container {
  82. padding: 0px 5px 5px 5px;
  83. box-sizing: border-box;
  84. height: 100%;
  85. ::v-deep .el-card__body {
  86. padding: 10px 15px;
  87. font-size: 14px;
  88. }
  89. &__card {
  90. width: 100%;
  91. height: 100%;
  92. }
  93. .title {
  94. display: flex;
  95. justify-content: space-between;
  96. }
  97. }
  98. .content {
  99. display: flex;
  100. &-item {
  101. background-color: #f4f8ff;
  102. margin-top: 0.5vh;
  103. margin-right: 0.5vw;
  104. height: 13vh;
  105. width: 15vw;
  106. display: flex;
  107. align-items: center;
  108. padding-left: 1.5vw;
  109. .card {
  110. display: flex;
  111. align-items: center;
  112. &-content {
  113. padding-left: 1vw;
  114. display: flex;
  115. flex-direction: column;
  116. //justify-content: space-around;
  117. &-num {
  118. font-size: 20px;
  119. font-weight: 600;
  120. }
  121. &-text {
  122. color: #909399;
  123. }
  124. }
  125. }
  126. }
  127. }
  128. </style>