|
@@ -1,3 +1,6 @@
|
|
|
+import * as echarts from '../../ec-canvas/echarts';
|
|
|
+import * as lf from '../../ec-canvas/echarts-liquidfill';
|
|
|
+
|
|
|
|
|
|
let log = require('../../utils/log.js');
|
|
|
|
|
@@ -19,7 +22,7 @@ Page({
|
|
|
slowFree:0,
|
|
|
fastSum:0,
|
|
|
slowSum:0,
|
|
|
- pagesize:30,
|
|
|
+ pagesize:10,
|
|
|
pagenum:1,
|
|
|
ele_pagenum:1,
|
|
|
total:-1,
|
|
@@ -43,6 +46,7 @@ Page({
|
|
|
// 停车时间
|
|
|
parkTime: 0,
|
|
|
activeTab: '0',
|
|
|
+ scrollTop:0
|
|
|
},
|
|
|
execParking(that,stationId){
|
|
|
wx.request({
|
|
@@ -163,10 +167,29 @@ Page({
|
|
|
chargid,
|
|
|
sumprice
|
|
|
});
|
|
|
-
|
|
|
+ this.fastAndSlow()
|
|
|
this.ori_getPage();
|
|
|
this.ele_getPage();
|
|
|
},
|
|
|
+ fastAndSlow(e){
|
|
|
+ let that = this;
|
|
|
+ wx.request({
|
|
|
+ url: getApp().globalData.postHeadAgreement +'/restapi/wechat/fastAndSlow',
|
|
|
+ data: {
|
|
|
+ id: that.data.chargid,
|
|
|
+ ivType: 3,//统计桩和电池
|
|
|
+ },
|
|
|
+ method: 'POST',
|
|
|
+ success(res) {
|
|
|
+ that.setData({
|
|
|
+ fastFree : res.data.fastFree,
|
|
|
+ slowFree : res.data.slowFree,
|
|
|
+ fastSum : res.data.fastSum,
|
|
|
+ slowSum : res.data.slowSum
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
previewImage(e){
|
|
|
var that = this,
|
|
|
//获取当前图片的下表
|
|
@@ -182,12 +205,11 @@ Page({
|
|
|
},
|
|
|
getPage(){
|
|
|
let that = this;
|
|
|
- if(that.activeTab=='1'){
|
|
|
+ if(that.__data__.activeTab=='0'){
|
|
|
that.ori_getPage();
|
|
|
}else{
|
|
|
that.ele_getPage();
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
|
|
|
ori_getPage(){
|
|
@@ -221,7 +243,6 @@ Page({
|
|
|
wx.showLoading({
|
|
|
title: '数据加载中....',
|
|
|
})
|
|
|
-
|
|
|
let that = this;
|
|
|
// 充电桩
|
|
|
wx.request({
|
|
@@ -230,7 +251,7 @@ Page({
|
|
|
id: that.data.chargid,
|
|
|
pagenum: this.data.pagenum++,
|
|
|
ivType: 0,
|
|
|
- pagesize: 30,
|
|
|
+ pagesize: 10,
|
|
|
},
|
|
|
method: 'POST',
|
|
|
success(res) {
|
|
@@ -265,13 +286,14 @@ Page({
|
|
|
wx.hideLoading()
|
|
|
that.setData({
|
|
|
chargList: that.data.chargList.concat(chargList),
|
|
|
- total: res.data.chargList.total,
|
|
|
+ total: res.data.total,
|
|
|
dataLoading: false,
|
|
|
fastFree : res.data.fastFree,
|
|
|
slowFree : res.data.slowFree,
|
|
|
fastSum : res.data.fastSum,
|
|
|
slowSum : res.data.slowSum
|
|
|
});
|
|
|
+ console.log("that.data:",that.data);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -307,8 +329,10 @@ Page({
|
|
|
wx.showLoading({
|
|
|
title: '数据加载中....',
|
|
|
})
|
|
|
-
|
|
|
- let that = this;
|
|
|
+ let that = this;
|
|
|
+ // that.setData({
|
|
|
+ // pagenum:1
|
|
|
+ // });
|
|
|
// 充电桩
|
|
|
wx.request({
|
|
|
url: getApp().globalData.postHeadAgreement +'/restapi/wechat/chargInfo',
|
|
@@ -316,7 +340,7 @@ Page({
|
|
|
id: that.data.chargid,
|
|
|
pagenum: this.data.ele_pagenum++,
|
|
|
ivType: 1,
|
|
|
- pagesize: 30,
|
|
|
+ pagesize: 10,
|
|
|
},
|
|
|
method: 'POST',
|
|
|
success(res) {
|
|
@@ -358,10 +382,27 @@ Page({
|
|
|
ele_fastSum : res.data.fastSum,
|
|
|
ele_slowSum : res.data.slowSum
|
|
|
});
|
|
|
+ console.log("that.setData:",that.data);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
},
|
|
|
+ refreshPage: function(e) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '数据加载中....',
|
|
|
+ })
|
|
|
+ let that = this;
|
|
|
+ that.setData({
|
|
|
+ pagenum:1
|
|
|
+ });
|
|
|
+ this.getPage()
|
|
|
+ that.fastAndSlow()
|
|
|
+ that.setData({
|
|
|
+ scrollTop: 0
|
|
|
+ });
|
|
|
+ wx.hideLoading()
|
|
|
+ },
|
|
|
+
|
|
|
goEleCarMap(e){
|
|
|
console.info("呼叫充电车");
|
|
|
let that = this;
|
|
@@ -646,6 +687,7 @@ Page({
|
|
|
},
|
|
|
bindScrollTolowerEvent: function(){
|
|
|
this.getPage();
|
|
|
+ console.log("触发滚动");
|
|
|
},
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|