You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

trafficFlow.vue 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <div class="top">
  3. <!-- 输入框 -->
  4. <div class="topstyle">
  5. <el-input v-model="input4" placeholder="请输入ETC卡号"> </el-input>
  6. </div>
  7. <div class="topstyle">
  8. <el-input v-model="input4" placeholder="请输入车牌号"> </el-input>
  9. </div>
  10. <!-- 日期框 -->
  11. <div class="topstyle" >
  12. <el-date-picker
  13. v-model="value1"
  14. type="datetime"
  15. placeholder="开始日志日期"
  16. format="YYYY/MM/DD hh:mm:ss"
  17. />
  18. <!-- <span>-</span> -->
  19. <!-- <el-button>至</el-button> -->
  20. <el-date-picker
  21. v-model="value1"
  22. type="datetime"
  23. placeholder="结束日志日期"
  24. format="YYYY/MM/DD hh:mm:ss"
  25. style="margin-left: 5px;"
  26. />
  27. </div>
  28. <!-- 按钮 -->
  29. <div class="topstyle">
  30. <el-button v-model="input4" type="success" :icon="Search" @click="search">搜索</el-button>
  31. <el-button type="warning" :icon="Refresh" @click="reset">重置</el-button>
  32. <el-button type="primary" plain @click="exportCurrentPage">导出当前页</el-button>
  33. <el-button type="primary" plain @click="exportAll">导出所有</el-button>
  34. </div>
  35. </div>
  36. <div style="padding-top: 12px">
  37. <el-table :data="tableData" border style="width: 100%">
  38. <el-table-column property="date1" label="序号" width="60" />
  39. <el-table-column property="date2" label="ETC卡号" width="140" />
  40. <el-table-column property="date3" label="车牌号" width="100" />
  41. <el-table-column property="date4" label="消费类型" width="90" />
  42. <el-table-column property="date5" label="入口时间" width="110" />
  43. <el-table-column property="date6" label="入口站名" width="110" />
  44. <el-table-column property="date7" label="出口时间" width="110" />
  45. <el-table-column property="date8" label="出口站名" width="110" />
  46. <el-table-column property="date9" label="交易前余额(元)" width="140" />
  47. <el-table-column property="date10" label="交易金额(元)" width="125" />
  48. <el-table-column property="date11" label="交易后金额(元)" width="140" />
  49. </el-table>
  50. </div>
  51. <div style="padding-top: 12px" class="as-gravity-center-end">
  52. <el-pagination
  53. :page-sizes="[10, 20, 30, 40]"
  54. layout="sizes, prev, pager, next"
  55. :total="1000"
  56. />
  57. </div>
  58. </template>
  59. <script lang="ts" setup>
  60. import { reactive, ref } from 'vue'
  61. import { useRoute, useRouter } from 'vue-router'
  62. import { Calendar, Search, Refresh } from '@element-plus/icons-vue'
  63. import type { ElTable } from 'element-plus'
  64. const input3 = ref('')
  65. const input4 = ref('')
  66. const value1 = ref('')
  67. function reset() {}
  68. function search() {}
  69. function exportCurrentPage() {}
  70. function exportAll() {}
  71. interface User {
  72. date1: string
  73. date2: string
  74. date3: string
  75. date4: string
  76. date5: string
  77. date6: string
  78. date7: string
  79. date8: string
  80. date9: string
  81. date10: string
  82. date11: string
  83. }
  84. const currentRow = ref()
  85. const singleTableRef = ref<InstanceType<typeof ElTable>>()
  86. const setCurrent = (row?: User) => {
  87. singleTableRef.value!.setCurrentRow(row)
  88. }
  89. const handleCurrentChange = (val: User | undefined) => {
  90. currentRow.value = val
  91. }
  92. // const objectService = {
  93. // url: 'http://localhost:8888/list2',
  94. // }
  95. // const { data } = useRequest(objectService)
  96. // console.log(data.value);
  97. // const tableData = data
  98. const tableData: User[] = [
  99. {
  100. date1: '1',
  101. date2: '52011328220200481698',
  102. date3: '贵A710AE',
  103. date4: '省内流水',
  104. date5: '2019-12-27 20:14:02',
  105. date6: '贵阳西主线站',
  106. date7: '2019-12-27 20:18:20',
  107. date8: '贵阳西主线站',
  108. date9: '38.25',
  109. date10: '0.00',
  110. date11: '38.25',
  111. },
  112. {
  113. date1: '2',
  114. date2: '52011328220200481698',
  115. date3: '贵A710AE',
  116. date4: '省内流水',
  117. date5: '2019-12-27 20:14:02',
  118. date6: '贵阳西主线站',
  119. date7: '2019-12-27 20:18:20',
  120. date8: '贵阳西主线站',
  121. date9: '38.25',
  122. date10: '0.00',
  123. date11: '38.25',
  124. },
  125. {
  126. date1: '3',
  127. date2: '52011328220200481698',
  128. date3: '贵A710AE',
  129. date4: '省内流水',
  130. date5: '2019-12-27 20:14:02',
  131. date6: '贵阳西主线站',
  132. date7: '2019-12-27 20:18:20',
  133. date8: '贵阳西主线站',
  134. date9: '38.25',
  135. date10: '0.00',
  136. date11: '38.25',
  137. },
  138. {
  139. date1: '4',
  140. date2: '52011328220200481698',
  141. date3: '贵A710AE',
  142. date4: '省内流水',
  143. date5: '2019-12-27 20:14:02',
  144. date6: '贵阳西主线站',
  145. date7: '2019-12-27 20:18:20',
  146. date8: '贵阳西主线站',
  147. date9: '38.25',
  148. date10: '0.00',
  149. date11: '38.25',
  150. },
  151. {
  152. date1: '5',
  153. date2: '52011328220200481698',
  154. date3: '贵A710AE',
  155. date4: '省内流水',
  156. date5: '2019-12-27 20:14:02',
  157. date6: '贵阳西主线站',
  158. date7: '2019-12-27 20:18:20',
  159. date8: '贵阳西主线站',
  160. date9: '38.25',
  161. date10: '0.00',
  162. date11: '38.25',
  163. },
  164. {
  165. date1: '6',
  166. date2: '52011328220200481698',
  167. date3: '贵A710AE',
  168. date4: '省内流水',
  169. date5: '2019-12-27 20:14:02',
  170. date6: '贵阳西主线站',
  171. date7: '2019-12-27 20:18:20',
  172. date8: '贵阳西主线站',
  173. date9: '38.25',
  174. date10: '0.00',
  175. date11: '38.25',
  176. },
  177. ]
  178. </script>
  179. <style lang="scss" scoped>
  180. .top {
  181. display: flex;
  182. margin-left: 10px;
  183. }
  184. .topstyle {
  185. display: flex;
  186. height: 40px;
  187. margin-right: 10px;
  188. align-items: center;
  189. justify-content: flex-start;
  190. }
  191. </style>