Tenantdetails.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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' style="height:400px;flex:1;">
  8. <u-list-item v-for="(item, index) in indexList" :key="index">
  9. <view class="companylist">
  10. <h3>{{item.roomName}}</h3>
  11. <view class="Currentamount">
  12. 房间编号:{{item.roomId}}
  13. </view>
  14. <view class="Currentamount">
  15. 租户名称: {{item.tenantsName}}
  16. </view>
  17. <view class="Currentamount">
  18. 门锁密码:{{item.issuedData}}
  19. </view>
  20. <view class="Currentamount">
  21. 区域名称: {{item.areaName}}
  22. </view>
  23. <view class="Currentamount">
  24. 更新时间: {{item.updateDate}}
  25. </view>
  26. </view>
  27. </u-list-item>
  28. </u-list>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. totalnumber: 0,
  37. setyesno: true,
  38. indexList: [],
  39. dataList: [],
  40. dataForm: {
  41. "currentPage": 1,
  42. "deviceId": "",
  43. "pageSize": 10,
  44. "roomId": "",
  45. "tempPwd": "",
  46. "tenantsId": "",
  47. "userName": ""
  48. },
  49. showtype: false,
  50. showdct: false,
  51. mytitle: '',
  52. alldata: [],
  53. showfloor: false,
  54. loading: false,
  55. columns: [],
  56. pd: true,
  57. columnData: [],
  58. myday: '',
  59. mytype: '全部',
  60. showPicker: false,
  61. }
  62. },
  63. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  64. onLoad(options) {
  65. this.dataForm.roomId = options.companyOrgId;
  66. this.getalldata();
  67. },
  68. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  69. onReady() {
  70. // 微信小程序需要用此写法
  71. },
  72. //监听页面隐藏
  73. onHide() {},
  74. //监听窗口尺寸变化
  75. onResize() {},
  76. //监听页面卸载
  77. onUnload() {},
  78. //监听用户下拉动作,一般用于下拉刷新
  79. onPullDownRefresh() {},
  80. methods: {
  81. scrolltolower() {
  82. if (this.pd) {
  83. this.getalldata();
  84. } else {
  85. return
  86. }
  87. },
  88. getalldata() {
  89. this.$api.post('/lock/userPage', this.dataForm)
  90. .then(res => {
  91. this.totalnumber = res.data.data.total;
  92. if (res.data.data.list.length != 0) {
  93. this.indexList.push(...res.data.data.list);
  94. this.dataForm.currentPage = this.dataForm.currentPage + 1;
  95. this.pd = true;
  96. } else {
  97. uni.showToast({
  98. title: '暂无更多数据了',
  99. icon: 'none',
  100. duration: 1500
  101. })
  102. this.pd = false;
  103. }
  104. })
  105. },
  106. }
  107. }
  108. </script>
  109. <style lang="scss">
  110. .billall {
  111. height: 100%
  112. }
  113. .u-listdata {
  114. height: 100%;
  115. display: flex;
  116. flex-direction: column;
  117. }
  118. .companylist {
  119. margin: 0 32rpx 24rpx;
  120. background: #fff;
  121. padding: 24rpx 32rpx;
  122. border-radius: 8rpx;
  123. position: relative;
  124. h3 {
  125. margin-bottom: 16rpx;
  126. }
  127. .Currentamount {
  128. margin-bottom: 8rpx;
  129. color: #999;
  130. span {
  131. color: #FA5555;
  132. padding-left: 9rpx;
  133. }
  134. }
  135. }
  136. </style>