Videosurveillance.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="billall">
  3. <view class="u-listdata">
  4. <view style="padding:16rpx 0 16rpx 32rpx">
  5. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  6. </view>
  7. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'
  8. style="height:400px;flex:1;">
  9. <u-list-item v-for="(item, index) in indexList" :key="index">
  10. <view class="companylist" @click="seedetail(item)">
  11. <view class="settled">
  12. 查看
  13. </view>
  14. <h3>
  15. {{item.channelName}}
  16. </h3>
  17. <view class="Currentamount">
  18. 通道号: {{item.channelNo}}
  19. </view>
  20. <view class="Currentamount">
  21. 设备序列号: {{item.deviceSerial}}
  22. </view>
  23. <!-- <view class="Currentamount">
  24. 直播地址: {{item.url}}
  25. </view> -->
  26. </view>
  27. </u-list-item>
  28. </u-list>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. //import { isEmpty, getDictDataList } from "@/utils/index";
  34. export default {
  35. components: {
  36. },
  37. data() {
  38. return {
  39. totalnumber: 0,
  40. setyesno: true,
  41. indexList: [],
  42. dataList: [],
  43. dataForm: {
  44. "accessToken": "",
  45. "channelNo": "",
  46. "deviceSerial": "",
  47. "expireTime": "3600",
  48. "pageSize": 10,
  49. "pageStart": 0,
  50. "protocol": 1
  51. },
  52. pd: true,
  53. showtype: false,
  54. showdct: false,
  55. mytitle: '',
  56. alldata: [],
  57. showfloor: false,
  58. loading: false,
  59. columns: [],
  60. columnData: [],
  61. myday: '',
  62. mytype: '全部',
  63. showPicker: false,
  64. //myday: currentDate,
  65. columnstype: [
  66. [{
  67. label: '全部',
  68. id: ''
  69. }, {
  70. label: '已关闭',
  71. id: '-1'
  72. },
  73. {
  74. label: '待支付',
  75. id: '0'
  76. },
  77. {
  78. label: '已支付',
  79. id: '1'
  80. },
  81. ]
  82. ],
  83. }
  84. },
  85. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  86. onLoad() {
  87. this.getalldata();
  88. // this.loadmore();
  89. },
  90. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  91. onReady() {
  92. // 微信小程序需要用此写法
  93. },
  94. //监听页面隐藏
  95. onHide() {},
  96. //监听窗口尺寸变化
  97. onResize() {},
  98. //监听页面卸载
  99. onUnload() {},
  100. //监听用户下拉动作,一般用于下拉刷新
  101. onPullDownRefresh() {},
  102. methods: {
  103. seedetail(e) {
  104. uni.navigateTo({
  105. url: `/pages/Workorder/Videosurveillance/Videoplayback/Videoplayback?companyOrgId=${e.url}`
  106. });
  107. },
  108. scrolltolower() {
  109. if (this.pd) {
  110. this.getalldata();
  111. } else {
  112. return
  113. }
  114. },
  115. getalldata() {
  116. this.$api.post('/video/page', this.dataForm)
  117. .then(res => {
  118. // console.log('111111111111111111', res.data.data)
  119. this.totalnumber = res.data.data.total;
  120. if (res.data.data.list.length != 0) {
  121. this.indexList.push(...res.data.data.list);
  122. this.dataForm.pageStart = this.dataForm.pageStart + 1;
  123. this.pd = true;
  124. } else {
  125. uni.showToast({
  126. title: '暂无更多数据了',
  127. icon: 'none',
  128. duration: 1500
  129. })
  130. this.pd = false;
  131. }
  132. })
  133. },
  134. // canceltype() {
  135. // this.showtype = false;
  136. // },
  137. // confirmtype(e) {
  138. // console.log('111111111111111111', e.value[0])
  139. // this.showtype = false;
  140. // this.mytype = e.value[0].label;
  141. // this.dataForm.status = e.value[0].id;
  142. // this.indexList = [];
  143. // this.dataForm.page = 1;
  144. // this.getalldata();
  145. // },
  146. // typechange() {
  147. // this.showtype = true;
  148. // },
  149. }
  150. }
  151. </script>
  152. <style lang="scss">
  153. .billall{height:100%}
  154. .u-listdata{
  155. height: 100%;
  156. display: flex;
  157. flex-direction: column;
  158. }
  159. .companylist {
  160. margin: 0 32rpx 24rpx;
  161. background: #fff;
  162. padding: 24rpx 32rpx;
  163. border-radius: 8rpx;
  164. position: relative;
  165. h3 {
  166. margin-bottom: 16rpx;
  167. }
  168. .settled{
  169. width: 96rpx;
  170. height: 56rpx;
  171. border: 1px solid #2E69EB;
  172. color: #2E69EB;
  173. font-size: 24rpx;
  174. border-radius: 8rpx;
  175. text-align: center;
  176. line-height: 56rpx;
  177. position: absolute;
  178. right: 32rpx;
  179. bottom: 24rpx;
  180. }
  181. .Currentamount {
  182. margin-bottom: 8rpx;
  183. color: #999;
  184. span {
  185. color: #FA5555;
  186. padding-left: 9rpx;
  187. }
  188. }
  189. }
  190. </style>