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

index.vue 3.5 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view style="height: 100%;">
  3. <view class="topBox">
  4. <SelectRadio v-model="search.CameraId" align="center" placeholder="请选择摄像头" @change="refresh"
  5. :options="allOptions.monitorList" />
  6. </view>
  7. <u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty>
  8. <u-list @scrolltolower="scrolltolower" style="height: calc(100% - 150rpx);">
  9. <u-list-item v-for="(item, index) in list" :key="index">
  10. <u-checkbox v-if="isManage" :name="item.name" shape="circle" label=""></u-checkbox>
  11. <view :class="{whiteCard:true,active:checkboxValue.includes(item.name)}">
  12. <view class="left">
  13. <view class="row1">
  14. {{item.cameraName}}
  15. </view>
  16. <view class="row2">
  17. <view class="">
  18. 持续时间:{{item.continueTime}}
  19. </view>
  20. <view class="">
  21. 相似度:{{item.similarity}}
  22. </view>
  23. </view>
  24. </view>
  25. <view class="right" v-show="!isManage">
  26. <view class="btn" @click="NAV_TO('./detail',{personSetId:item.personSetId,taskId:item.taskId})">
  27. <view>
  28. <image src="@/static/image/seeBlue.png" mode="aspectFill"></image>
  29. </view>
  30. <text>查看</text>
  31. </view>
  32. </view>
  33. </view>
  34. </u-list-item>
  35. <u-loadmore :status="status" />
  36. </u-list>
  37. </view>
  38. </template>
  39. <script>
  40. import SelectRadio from "@/components/selectRadio.vue"
  41. import {
  42. taskPage
  43. } from '@/api/work/rollCall.js'
  44. export default {
  45. components: {
  46. SelectRadio
  47. },
  48. data() {
  49. return {
  50. list: [],
  51. isLoading: false,
  52. status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了
  53. search: {
  54. CameraId: '',
  55. },
  56. page: {
  57. pageNum: 1,
  58. pageSize: 10,
  59. },
  60. checkboxValue: [],
  61. isManage: false,
  62. }
  63. },
  64. methods: {
  65. scrolltolower() {
  66. this.loadmore()
  67. },
  68. loadmore() {
  69. if (this.status != 'loadmore') return
  70. this.status = 'loading'
  71. taskPage({
  72. ...this.page,
  73. ...this.search
  74. }).then(res => {
  75. if(res.code != 200)return
  76. res.data.list.forEach(e=>{
  77. this.list.push(e)
  78. })
  79. // 获取到的总条数>=接口总条数
  80. if (this.list.length >= res.data.total) {
  81. this.status = 'nomore'
  82. } else {
  83. this.status = 'loadmore'
  84. }
  85. })
  86. },
  87. refresh() {
  88. this.status = 'loadmore'
  89. this.list = []
  90. this.page.pageNum = 1
  91. this.loadmore()
  92. },
  93. },
  94. onLoad() {
  95. console.log(this.allOptions)
  96. this.loadmore()
  97. },
  98. onPullDownRefresh(){
  99. uni.stopPullDownRefresh()
  100. this.refresh()
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. .topBox {
  106. padding: 26rpx 30rpx;
  107. }
  108. .u-list-item {
  109. display: flex;
  110. align-items: center;
  111. flex-direction: unset;
  112. margin: 12rpx 30rpx;
  113. &:first-child {
  114. margin-top: 0rpx;
  115. }
  116. .whiteCard {
  117. flex: 1;
  118. &.active {
  119. border: 1rpx solid #2388FF;
  120. background-color: #F2F8FF;
  121. }
  122. }
  123. .u-checkbox {
  124. margin-right: 12rpx;
  125. }
  126. }
  127. .whiteCard {
  128. background-color: #fff;
  129. border-radius: 18rpx;
  130. padding: 30rpx;
  131. color: #333333;
  132. display: flex;
  133. .left {
  134. width: 76%;
  135. }
  136. .row1 {
  137. font-size: 32rpx;
  138. font-weight: 700;
  139. }
  140. .row2 {
  141. font-size: 26rpx;
  142. margin-top: 24rpx;
  143. display: flex;
  144. justify-content: space-between;
  145. }
  146. .right {
  147. display: flex;
  148. justify-content: right;
  149. flex: 1;
  150. padding-top: 19rpx;
  151. .btn {
  152. text-align: center;
  153. uni-image {
  154. width: 40rpx;
  155. height: 40rpx;
  156. }
  157. uni-text {
  158. font-size: 26rpx;
  159. color: #2388FF;
  160. position: relative;
  161. bottom: 12rpx;
  162. }
  163. }
  164. }
  165. }
  166. </style>