Commit 6298b56f by 姜雷

Merge branch 'develop' into test

parents 63bc7339 7d835dbd
import { statisticsFetch } from '../../../api/fetch'; import { statisticsFetch } from '../../../api/fetch';
import { formatPrice } from '../../../utils/util';
// pages/components/EquipmentOperationDetails/EquipmentOperationDetails.js // pages/components/EquipmentOperationDetails/EquipmentOperationDetails.js
Component({ Component({
...@@ -113,7 +114,10 @@ Component({ ...@@ -113,7 +114,10 @@ Component({
const { list } = res.data; const { list } = res.data;
this.setData({ this.setData({
pageNum: 1, pageNum: 1,
dataList: list, dataList: list.map(item => ({
...item,
consumeAmount: formatPrice(item.consumeAmount),
})),
}); });
}) })
.catch(err => { .catch(err => {
...@@ -131,7 +135,10 @@ Component({ ...@@ -131,7 +135,10 @@ Component({
}) })
.then(res => { .then(res => {
wx.hideLoading(); wx.hideLoading();
const { list } = res.data; const list = res.data.list.map(item => ({
...item,
consumeAmount: formatPrice(item.consumeAmount),
}));
if (list && list.length) { if (list && list.length) {
this.setData!({ this.setData!({
dataList: [...this.data.dataList, ...list], dataList: [...this.data.dataList, ...list],
......
...@@ -82,13 +82,14 @@ Component({ ...@@ -82,13 +82,14 @@ Component({
if (this.data.deviceLocation) { if (this.data.deviceLocation) {
entity.deviceLocation = this.data.deviceLocation; entity.deviceLocation = this.data.deviceLocation;
} }
console.log('areaId: ', this.data.areaId);
return deviceFetch({ return deviceFetch({
url: '/device/warning/paging', url: '/device/warning/paging',
method: 'POST', method: 'POST',
data: { data: {
warnLevel: 1, warnLevel: 1,
operator: true, operator: true,
areaId: this.data.areaId, campusId: this.data.areaId,
pageNum: this.data.pageNum, pageNum: this.data.pageNum,
pageSize: this.data.pageSize, pageSize: this.data.pageSize,
...entity, ...entity,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment