list.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <!-- 订单列表-查看订单流量明细 -->
  3. <div class="trafficUse">
  4. <ul class="order_list_box">
  5. <li class="list_box_item" v-for="(item, index) in data" key="index">
  6. <div class="list_item_left">
  7. <a-progress type="circle" :percent="0.2" />
  8. </div>
  9. <div class="list_item_right">
  10. <p>
  11. <span>{{ $t('lotCard.orderID') }}:{{ item.id }}</span>
  12. <!-- <span class="list_item_right_span">{{ $t('lotCard.orderType') }}:{{ item.orderType }}</span> -->
  13. <!-- <span>更新时间:{{ item.updated_at }}</span> -->
  14. </p>
  15. <template v-if="item.trafficList">
  16. <p v-for="trafficVal in item.trafficList" :key="trafficVal.id">
  17. <span class="list_item_right_span"> 流量总量:{{ trafficVal.qtaconsumption }}</span>
  18. <span class="list_item_right_span">流量使用时间:{{ trafficVal.time }}</span>
  19. <span>国家:中国</span>
  20. </p>
  21. </template>
  22. </div>
  23. </li>
  24. </ul>
  25. </div>
  26. </template>
  27. <script setup>
  28. import lotCard from '@/i18n/zh/lotCard';
  29. const props = defineProps({
  30. data: Array
  31. });
  32. </script>
  33. <style scoped lang="less">
  34. ul,
  35. li,
  36. p,
  37. span {
  38. margin: 0;
  39. padding: 0;
  40. line-height: 1.5;
  41. }
  42. .order_list_box {
  43. list-style: none;
  44. max-height: 700px;
  45. overflow-y: scroll;
  46. margin: auto;
  47. padding: 0 20px;
  48. }
  49. .list_box_item {
  50. display: flex;
  51. align-items: center;
  52. margin-bottom: 10px;
  53. .list_item_left {
  54. width: 60px;
  55. height: 60px;
  56. // background: gainsboro;
  57. margin-right: 10px;
  58. }
  59. .list_item_right {
  60. p {
  61. display: flex;
  62. align-items: center;
  63. margin: 5px 0;
  64. }
  65. span {
  66. display: flex;
  67. align-items: center;
  68. }
  69. .list_item_right_span::after {
  70. content: "";
  71. display: inline-block;
  72. width: 1px;
  73. height: 20px;
  74. background-color: gray;
  75. margin: 0 10px;
  76. }
  77. }
  78. }
  79. </style>