平安校园
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.
 
 
 
 
 
 

169 lines
3.5 KiB

  1. <template>
  2. <view style="height: 100%;">
  3. <u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty>
  4. <u-list @scrolltolower="scrolltolower" style="height: calc(100% - 0rpx);">
  5. <u-list-item v-for="(item, index) in list" :key="index">
  6. <view class="whiteCard">
  7. <view class="row1">
  8. 摄像头:教室(海康)、大厅(魔豆)
  9. </view>
  10. <view class="row2">
  11. 查询时间:2024-08-14 08:34:59
  12. </view>
  13. <view class="row3">
  14. <view class="">
  15. <text>开始时间:</text>2024-08-14 08:34:59
  16. </view>
  17. <view class="">
  18. <text>结束时间:</text>2024-08-14 08:34:59
  19. </view>
  20. <view class="type">
  21. <text>分片类型:<text style="color: #333;">小时</text></text>
  22. <view class="peopleNum">
  23. <image src="@/static/image/peopleNum.png" mode=""></image>
  24. <text>总人数:6</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="bottom">
  29. <view class="btn" @click="NAV_TO('./passengerFlow/detail')">
  30. <image src="@/static/image/see.png" mode=""></image>
  31. <text>分片详情</text>
  32. </view>
  33. </view>
  34. </view>
  35. </u-list-item>
  36. <u-loadmore :status="status" />
  37. </u-list>
  38. <image class="addBtn" @click="NAV_TO('./passengerFlow/add')" src="@/static/image/add.png" mode=""></image>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. list: [{}, {}, {}, {}, {}, {}, {}, {}, {}, ],
  46. isLoading: false,
  47. status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了
  48. page: {
  49. size: 8,
  50. page: 8,
  51. }
  52. }
  53. },
  54. methods: {
  55. scrolltolower() {
  56. this.loadmore()
  57. },
  58. loadmore() {
  59. if (this.status != 'loadmore') return
  60. this.status = 'loading'
  61. setTimeout(() => {
  62. for (let i = 0; i < 1; i++) {
  63. this.list.push({}, {}, {}, {})
  64. }
  65. // 获取到的总条数>=接口总条数 || 接口总条数为0
  66. if (this.list.length >= 14) {
  67. this.status = 'nomore'
  68. } else {
  69. this.status = 'loadmore'
  70. }
  71. }, 2000)
  72. },
  73. refresh() {
  74. this.status = 'loadmore'
  75. this.list = []
  76. this.page.page = 1
  77. this.loadmore()
  78. },
  79. pullDownRefresh() {
  80. this.refresh()
  81. }
  82. },
  83. onLoad() {
  84. this.loadmore()
  85. },
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .addBtn{
  90. width: 140rpx;
  91. height: 140rpx;
  92. position: fixed;
  93. right: 15rpx;
  94. bottom: 160rpx;
  95. }
  96. .whiteCard {
  97. background-color: #fff;
  98. border-radius: 18rpx;
  99. margin: 12rpx 28rpx;
  100. padding: 30rpx;
  101. color: #333333;
  102. .row1 {
  103. font-size: 32rpx;
  104. }
  105. .row2 {
  106. font-size: 26rpx;
  107. margin-top: 14rpx;
  108. }
  109. .row3{
  110. background-color: #F2F8FF;
  111. border-radius: 16rpx;
  112. font-size: 26rpx;
  113. padding: 18rpx 24rpx;
  114. line-height: 48rpx;
  115. margin-top: 18rpx;
  116. text{
  117. color: #777777;
  118. }
  119. .type{
  120. display: flex;
  121. justify-content: space-between;
  122. .peopleNum {
  123. uni-image {
  124. width: 34rpx;
  125. height: 34rpx;
  126. position: relative;
  127. top: 8rpx;
  128. margin-right: 10rpx;
  129. }
  130. uni-text {
  131. color: #2388FF;
  132. }
  133. }
  134. }
  135. }
  136. .bottom {
  137. display: flex;
  138. border-top: 1rpx solid rgba(0, 0, 0, 0.1);
  139. margin-top: 24rpx;
  140. padding-top: 22rpx;
  141. position: relative;
  142. .btn {
  143. width: 100%;
  144. display: flex;
  145. align-items: center;
  146. justify-content: center;
  147. uni-image {
  148. width: 34rpx;
  149. height: 34rpx;
  150. margin-right: 6rpx;
  151. }
  152. uni-text {
  153. font-size: 30rpx;
  154. }
  155. }
  156. }
  157. }
  158. </style>