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

143 regels
2.8 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="">
  21. <text>分片类型:</text>小时
  22. </view>
  23. </view>
  24. <view class="bottom">
  25. <view class="btn" @click="NAV_TO('./returnBed/detail')">
  26. <image src="@/static/image/see.png" mode=""></image>
  27. <text>分片详情</text>
  28. </view>
  29. </view>
  30. </view>
  31. </u-list-item>
  32. <u-loadmore :status="status" />
  33. </u-list>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. list: [{}, {}, {}, {}, {}, {}, {}, {}, {}, ],
  41. isLoading: false,
  42. status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了
  43. search: {
  44. loudong: 1,
  45. qinshi: ''
  46. },
  47. page: {
  48. size: 8,
  49. page: 8,
  50. }
  51. }
  52. },
  53. methods: {
  54. scrolltolower() {
  55. this.loadmore()
  56. },
  57. loadmore() {
  58. if (this.status != 'loadmore') return
  59. this.status = 'loading'
  60. setTimeout(() => {
  61. for (let i = 0; i < 1; i++) {
  62. this.list.push({}, {}, {}, {})
  63. }
  64. // 获取到的总条数>=接口总条数 || 接口总条数为0
  65. if (this.list.length >= 14) {
  66. this.status = 'nomore'
  67. } else {
  68. this.status = 'loadmore'
  69. }
  70. }, 2000)
  71. },
  72. refresh() {
  73. this.status = 'loadmore'
  74. this.list = []
  75. this.page.page = 1
  76. this.loadmore()
  77. },
  78. pullDownRefresh() {
  79. this.refresh()
  80. }
  81. },
  82. onLoad() {
  83. this.loadmore()
  84. },
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .whiteCard {
  89. background-color: #fff;
  90. border-radius: 18rpx;
  91. margin: 12rpx 28rpx;
  92. padding: 30rpx;
  93. color: #333333;
  94. .row1 {
  95. font-size: 30rpx;
  96. }
  97. .row2 {
  98. font-size: 26rpx;
  99. margin-top: 12rpx;
  100. }
  101. .row3{
  102. background-color: #F2F8FF;
  103. border-radius: 16rpx;
  104. font-size: 26rpx;
  105. padding: 18rpx 24rpx;
  106. line-height: 48rpx;
  107. margin-top: 14rpx;
  108. text{
  109. color: #777777;
  110. }
  111. }
  112. .bottom {
  113. display: flex;
  114. border-top: 1rpx solid rgba(0, 0, 0, 0.1);
  115. margin-top: 24rpx;
  116. padding-top: 22rpx;
  117. position: relative;
  118. .btn {
  119. width: 100%;
  120. display: flex;
  121. align-items: center;
  122. justify-content: center;
  123. uni-image {
  124. width: 34rpx;
  125. height: 34rpx;
  126. margin-right: 6rpx;
  127. }
  128. uni-text {
  129. font-size: 30rpx;
  130. }
  131. }
  132. }
  133. }
  134. </style>