修改抄表记录峰谷不显示的问题
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { exportElectricityList, getAccountingList, getElectricityList, getMeterReadingList } from "../../../../../service/accounting";
|
||||
import { getTenementMeterList } from "../../../../../service/meter";
|
||||
import dayjs from "../../../../../utils/dayjs";
|
||||
import { getParkInfoByTime } from "../../../../../service/park";
|
||||
import request from '../../../../../utils/request';
|
||||
import { alertInfo, getPixelRatio, loadingFunc } from "../../../../../utils/index";
|
||||
const { OK } = request;
|
||||
@@ -19,6 +20,9 @@ Component({
|
||||
loadingFunc(async () => {
|
||||
await this.getReadingList();
|
||||
})
|
||||
},
|
||||
"parkInfo": function(newValue) {
|
||||
this.setData({ park: newValue })
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -27,6 +31,7 @@ Component({
|
||||
data: {
|
||||
readingDetailShow: false,
|
||||
readingDetail: {},
|
||||
park: {},
|
||||
meterReadingHeader: [
|
||||
{ key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address },
|
||||
{ title: '倍率', key: 'ratio' },
|
||||
@@ -76,10 +81,32 @@ Component({
|
||||
readingPage: 1,
|
||||
}, () => {
|
||||
loadingFunc(async () => {
|
||||
console.log("----------")
|
||||
await this.getParkInfo(time)
|
||||
console.log("===========")
|
||||
await this.getReadingList();
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
async getParkInfo(time) {
|
||||
const park = wx.getStorageSync('park');
|
||||
const { park:parkInfo, code, message } = await getParkInfoByTime(park?.id, `${time}`, `${0}`,)
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
const that = this;
|
||||
return new Promise((resolve) => {
|
||||
|
||||
that.setData({
|
||||
parkInfo: parkInfo
|
||||
}, () => {
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
showDetail(e) {
|
||||
const { index, data = {} } = e.detail;
|
||||
|
Reference in New Issue
Block a user