123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <template>
- <view class="billall">
- <view class="u-listdata">
- <view style="padding:16rpx 0 16rpx 32rpx">
- 共有 <span style="color: red">{{totalnumber}}</span>条记录
- </view>
- <u-list @scrolltolower="scrolltolower" :pagingEnabled='true' style="height:400px;flex:1;">
- <u-list-item v-for="(item, index) in indexList" :key="index">
- <view class="companylist">
- <h3>{{item.roomName}}</h3>
- <view class="Currentamount">
- 房间编号:{{item.roomId}}
- </view>
- <view class="Currentamount">
- 租户名称: {{item.tenantsName}}
- </view>
- <view class="Currentamount">
- 门锁密码:{{item.issuedData}}
- </view>
- <view class="Currentamount">
- 区域名称: {{item.areaName}}
- </view>
- <view class="Currentamount">
- 更新时间: {{item.updateDate}}
- </view>
- </view>
- </u-list-item>
- </u-list>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- totalnumber: 0,
- setyesno: true,
- indexList: [],
- dataList: [],
- dataForm: {
- "currentPage": 1,
- "deviceId": "",
- "pageSize": 10,
- "roomId": "",
- "tempPwd": "",
- "tenantsId": "",
- "userName": ""
- },
- showtype: false,
- showdct: false,
- mytitle: '',
- alldata: [],
- showfloor: false,
- loading: false,
- columns: [],
- pd: true,
- columnData: [],
- myday: '',
- mytype: '全部',
- showPicker: false,
- }
- },
- //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
- onLoad(options) {
- this.dataForm.roomId = options.companyOrgId;
- this.getalldata();
- },
- //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
- onReady() {
- // 微信小程序需要用此写法
- },
- //监听页面隐藏
- onHide() {},
- //监听窗口尺寸变化
- onResize() {},
- //监听页面卸载
- onUnload() {},
- //监听用户下拉动作,一般用于下拉刷新
- onPullDownRefresh() {},
- methods: {
- scrolltolower() {
- if (this.pd) {
- this.getalldata();
- } else {
- return
- }
- },
- getalldata() {
- this.$api.post('/lock/userPage', this.dataForm)
- .then(res => {
- this.totalnumber = res.data.data.total;
- if (res.data.data.list.length != 0) {
- this.indexList.push(...res.data.data.list);
- this.dataForm.currentPage = this.dataForm.currentPage + 1;
- this.pd = true;
- } else {
- uni.showToast({
- title: '暂无更多数据了',
- icon: 'none',
- duration: 1500
- })
- this.pd = false;
- }
- })
- },
- }
- }
- </script>
- <style lang="scss">
- .billall {
- height: 100%
- }
- .u-listdata {
- height: 100%;
- display: flex;
- flex-direction: column;
- }
- .companylist {
- margin: 0 32rpx 24rpx;
- background: #fff;
- padding: 24rpx 32rpx;
- border-radius: 8rpx;
- position: relative;
- h3 {
- margin-bottom: 16rpx;
- }
- .Currentamount {
- margin-bottom: 8rpx;
- color: #999;
- span {
- color: #FA5555;
- padding-left: 9rpx;
- }
- }
- }
- </style>
|