|
|
@ -13,7 +13,8 @@ const formatCurrentAndLastMonthDay = () => { |
|
|
|
const lastDay = lastMonthDate.getDate(); |
|
|
|
return { |
|
|
|
currentDay: [year, month, day].map(formatNumber).join('-'), |
|
|
|
lastMonthDay: [lastYear, lastMonth-1, lastDay].map(formatNumber).join('-'), |
|
|
|
//lastMonthDay: [lastYear, lastMonth-1, lastDay].map(formatNumber).join('-'),
|
|
|
|
lastMonthDay: [lastYear, 1, 1].map(formatNumber).join('-'), |
|
|
|
}; |
|
|
|
}; |
|
|
|
Component({ |
|
|
@ -101,6 +102,12 @@ Component({ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
toSort(value){ |
|
|
|
wx.showToast({ |
|
|
|
title: '正在计算排序', |
|
|
|
icon: 'loading', |
|
|
|
duration: 7000, |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
let sortlist= value.currentTarget.dataset.sortlist |
|
|
|
const evenNumbers= this.data.sortNameList.filter(item=>{ |
|
|
|
return item.value===sortlist.value |
|
|
@ -128,10 +135,10 @@ Component({ |
|
|
|
} |
|
|
|
}) |
|
|
|
let sortlist= value.currentTarget.dataset.sortlist |
|
|
|
this.data.sortList[sortlist.value-1].type=1 |
|
|
|
this.data.sortList[sortlist.value-1].type=2 |
|
|
|
this.setData({ |
|
|
|
sortList:this.data.sortList, |
|
|
|
orderBy:evenNumbers+"Up" |
|
|
|
orderBy:evenNumbers+"Down" |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
@ -202,6 +209,7 @@ Component({ |
|
|
|
// res.data.list.forEach(item => {
|
|
|
|
// item.reportTime = this.formatTime(item.reportTime)
|
|
|
|
// })
|
|
|
|
wx.hideToast() |
|
|
|
this.setData({ |
|
|
|
list: res.data |
|
|
|
}) |
|
|
|