| | |
| | | _listPhoneBillFlows: function (_page, _rows) { |
| | | // 设置分页参数 |
| | | $that.phoneMeterManageInfo.conditions.page = _page; |
| | | $that.phoneMeterManageInfo.conditions.row = _rows; |
| | | $that.phoneMeterManageInfo.conditions.row = 10; |
| | | // 设置小区ID |
| | | $that.phoneMeterManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | |
| | |
| | | $that.phoneMeterManageInfo.total = _json.total; |
| | | $that.phoneMeterManageInfo.records = _json.records; |
| | | |
| | | // 转换数据结构,将单元数据转换为电话费抄表数据格式 |
| | | let convertedData = []; |
| | | if (_json.data && Array.isArray(_json.data)) { |
| | | _json.data.forEach(item => { |
| | | convertedData.push({ |
| | | deviceNum: item.unitNum || '-', |
| | | objName: item.floorNum + '-' + item.unitNum || '-', |
| | | preDegrees: '-', |
| | | curDegrees: '-', |
| | | preReadingTime: '-', |
| | | curReadingTime: '-', |
| | | createTime: '-', |
| | | id: item.unitId || '' |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | $that.phoneMeterManageInfo.phoneBillFlows = convertedData; |
| | | // 直接使用API返回的电话费流水数据 |
| | | $that.phoneMeterManageInfo.phoneBillFlows = _json.data || []; |
| | | |
| | | // 计算总页数 |
| | | var totalPages = Math.ceil(_json.total / _rows) || 1; |