sectionBerth.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <!-- 路段泊位统计 -->
  2. <template>
  3. <view class="container">
  4. <view class="table">
  5. <view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
  6. <view class="table-box">
  7. <uni-table emptyText="暂无更多数据">
  8. <!-- 表头行 -->
  9. <uni-tr>
  10. <uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index" :width="item.width || ''">{{ item.field }}
  11. </uni-th>
  12. </uni-tr>
  13. <!-- 表格数据行 -->
  14. <uni-tr v-for="(item, index) in tableData.list" :key="index">
  15. <uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
  16. <uni-td class="table-box-td" align="center">{{ item.road }}</uni-td>
  17. <uni-td class="table-box-td" align="center">{{ item.num }}</uni-td>
  18. <uni-td class="table-box-td" align="center">{{ item.really }}</uni-td>
  19. </uni-tr>
  20. </uni-table>
  21. </view>
  22. <view class="table-pagination">
  23. <uni-pagination show-icon="true" :total="tableData.total" :current="tableData.current"></uni-pagination>
  24. </view>
  25. </view>
  26. <view class="total">
  27. <view>
  28. 停车数量<text>{{ totalData.num }}</text>辆,实收金额<text>{{ totalData.really }}</text>元
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. props: {
  36. currentDate: {
  37. type: Array,
  38. default: []
  39. },
  40. tableTh: {
  41. type: Array,
  42. default: () => {
  43. return [
  44. { field: '路段名称', width: 120 },
  45. { field: '所属泊位', width: 120 },
  46. { field: '停车数量(次)', width: 80 },
  47. { field: '实收金额(元)', width: 80 }
  48. ]
  49. }
  50. },
  51. tableData: {
  52. type: Object,
  53. default: () => {
  54. return {
  55. current: 1,
  56. total: 30,
  57. list: [{
  58. num: 1001,
  59. name: 'xxx',
  60. road: '金科路',
  61. really: 80
  62. },
  63. {
  64. num: 1001,
  65. name: 'xxx',
  66. road: '金科路',
  67. should: 100,
  68. really: 80
  69. },
  70. {
  71. num: 1001,
  72. name: 'xxx',
  73. road: '金科路',
  74. should: 100,
  75. really: 80
  76. },
  77. {
  78. num: 1001,
  79. name: 'xxx',
  80. road: '金科路',
  81. should: 100,
  82. really: 80
  83. },
  84. {
  85. num: 1001,
  86. name: 'xxx',
  87. road: '金科路',
  88. should: 100,
  89. really: 80
  90. },
  91. {
  92. num: 1001,
  93. name: 'xxx',
  94. road: '金科路',
  95. should: 100,
  96. really: 80
  97. },
  98. {
  99. num: 1001,
  100. name: 'xxx',
  101. road: '金科路',
  102. should: 100,
  103. really: 80
  104. },
  105. {
  106. num: 1001,
  107. name: 'xxx',
  108. road: '金科路',
  109. should: 100,
  110. really: 80
  111. },
  112. {
  113. num: 1001,
  114. name: 'xxx',
  115. road: '金科路',
  116. should: 100,
  117. really: 80
  118. }
  119. ]
  120. }
  121. }
  122. },
  123. totalData: {
  124. type: Object,
  125. default: () => {
  126. return {
  127. num: 100,
  128. really: 80
  129. }
  130. }
  131. }
  132. }
  133. }
  134. </script>
  135. <style lang="scss" scoped>
  136. @import './report.scss';
  137. </style>