Commit 1acabf78 by 姜雷

Merge branch 'test'

parents e0d3213d b0ab75ac
import { statisticsFetch } from '../../../api/fetch';
import { formatPrice } from '../../../utils/util';
// pages/components/EquipmentOperationDetails/EquipmentOperationDetails.js
Component({
......@@ -113,7 +114,10 @@ Component({
const { list } = res.data;
this.setData({
pageNum: 1,
dataList: list,
dataList: list.map(item => ({
...item,
consumeAmount: formatPrice(item.consumeAmount),
})),
});
})
.catch(err => {
......@@ -131,7 +135,10 @@ Component({
})
.then(res => {
wx.hideLoading();
const { list } = res.data;
const list = res.data.list.map(item => ({
...item,
consumeAmount: formatPrice(item.consumeAmount),
}));
if (list && list.length) {
this.setData!({
dataList: [...this.data.dataList, ...list],
......
......@@ -82,13 +82,14 @@ Component({
if (this.data.deviceLocation) {
entity.deviceLocation = this.data.deviceLocation;
}
console.log('areaId: ', this.data.areaId);
return deviceFetch({
url: '/device/warning/paging',
method: 'POST',
data: {
warnLevel: 1,
operator: true,
areaId: this.data.areaId,
campusId: this.data.areaId,
pageNum: this.data.pageNum,
pageSize: this.data.pageSize,
...entity,
......
......@@ -5,7 +5,7 @@
<c-select ex-class="EquipmentWarning-filters-levelInput" mode="selector" value="{{warningLevel}}" range="{{warningLevelRange}}" rangeKey="value" bindchange="changeWarningType" />
</view>
<view class="EquipmentWarning-location">
<input class="EquipmentWarning-location-input" type="text" placeholder="设备位置" bindconfirm="changeLocation" />
<input class="EquipmentWarning-location-input" type="text" placeholder="设备位置" bindblur="changeLocation" bindconfirm="changeLocation" />
</view>
</view>
<view class="EquipmentWarning-elist">
......
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