| | |
| | | callName: 'phoneMeterManage' |
| | | }); |
| | | // 加载电话表数据 |
| | | $that._listPhoneBillFlows(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | if (typeof $that._listPhoneBillFlows === 'function') { |
| | | $that._listPhoneBillFlows(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | } |
| | | }, |
| | | /** |
| | | * 初始化事件监听 |
| | |
| | | // 更新数据列表 |
| | | $that.phoneMeterManageInfo.total = _json.total; |
| | | $that.phoneMeterManageInfo.records = _json.records; |
| | | $that.phoneMeterManageInfo.phoneBillFlows = _json.data; |
| | | |
| | | // 转换数据结构,将单元数据转换为电话费抄表数据格式 |
| | | 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; |
| | | |
| | | // 更新分页组件 |
| | | vc.emit('pagination', 'init', { |
| | | total: $that.phoneMeterManageInfo.records, |