|
@@ -2,25 +2,26 @@
|
|
<view class="content">
|
|
<view class="content">
|
|
<view class="header">
|
|
<view class="header">
|
|
<view>
|
|
<view>
|
|
- <text>{{searchForm.beginDate}}至{{searchForm.endDate}}</text>
|
|
|
|
|
|
+ <text v-if="searchForm.beginDate">{{searchForm.beginDate}}至{{searchForm.endDate}}</text>
|
|
|
|
+ <text v-else>全部</text>
|
|
<u-image v-if="hasLogin" @click="openScreen=true" class="filter-img" width="36rpx" height="36rpx" src="/static/filter.png"></u-image>
|
|
<u-image v-if="hasLogin" @click="openScreen=true" class="filter-img" width="36rpx" height="36rpx" src="/static/filter.png"></u-image>
|
|
</view>
|
|
</view>
|
|
<!-- 总计 -->
|
|
<!-- 总计 -->
|
|
<view class="header-cont">
|
|
<view class="header-cont">
|
|
<view class="cont-item">
|
|
<view class="cont-item">
|
|
<text>其它垃圾</text>
|
|
<text>其它垃圾</text>
|
|
- <text v-if="status !='loading'" class="other">{{otherTotal}}kg</text>
|
|
|
|
- <u-loading :show="status =='loading'"></u-loading>
|
|
|
|
|
|
+ <text v-if="!titleStatus" class="other">{{otherTotal}}kg</text>
|
|
|
|
+ <u-loading :show="titleStatus"></u-loading>
|
|
</view>
|
|
</view>
|
|
<view class="cont-item">
|
|
<view class="cont-item">
|
|
- <text>建筑垃圾</text>
|
|
|
|
- <text v-if="status !='loading'" class="jianzhu">{{jianzhuTotal}}kg</text>
|
|
|
|
- <u-loading :show="status =='loading'"></u-loading>
|
|
|
|
|
|
+ <text>厨余垃圾</text>
|
|
|
|
+ <text v-if="!titleStatus" class="chuyu">{{chuyuTotal}}kg</text>
|
|
|
|
+ <u-loading :show="titleStatus"></u-loading>
|
|
</view>
|
|
</view>
|
|
<view class="cont-item">
|
|
<view class="cont-item">
|
|
- <text>厨余垃圾</text>
|
|
|
|
- <text v-if="status !='loading'" class="chuyu">{{chuyuTotal}}kg</text>
|
|
|
|
- <u-loading :show="status =='loading'"></u-loading>
|
|
|
|
|
|
+ <text>建筑垃圾</text>
|
|
|
|
+ <text v-if="!titleStatus" class="jianzhu">{{jianzhuTotal}}kg</text>
|
|
|
|
+ <u-loading :show="titleStatus"></u-loading>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -42,16 +43,16 @@
|
|
<u-image src="/static/index/other.png"></u-image>
|
|
<u-image src="/static/index/other.png"></u-image>
|
|
<text>{{item.gatherOther? (item.gatherOther/1000).toFixed(3)/1 :0}}kg</text>
|
|
<text>{{item.gatherOther? (item.gatherOther/1000).toFixed(3)/1 :0}}kg</text>
|
|
</view>
|
|
</view>
|
|
- <!-- 建筑垃圾 -->
|
|
|
|
- <view class="cont-item">
|
|
|
|
- <u-image src="/static/index/jianzhu.png"></u-image>
|
|
|
|
- <text>{{item.gatherBuilding ? (item.gatherBuilding/1000).toFixed(3)/1 :0}}kg</text>
|
|
|
|
- </view>
|
|
|
|
<!-- 厨余垃圾 -->
|
|
<!-- 厨余垃圾 -->
|
|
<view class="cont-item">
|
|
<view class="cont-item">
|
|
<u-image src="/static/index/chuyu.png"></u-image>
|
|
<u-image src="/static/index/chuyu.png"></u-image>
|
|
<text>{{item.gatherKitchen ? (item.gatherKitchen/1000).toFixed(3)/1 :0}}kg</text>
|
|
<text>{{item.gatherKitchen ? (item.gatherKitchen/1000).toFixed(3)/1 :0}}kg</text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 建筑垃圾 -->
|
|
|
|
+ <view class="cont-item">
|
|
|
|
+ <u-image src="/static/index/jianzhu.png"></u-image>
|
|
|
|
+ <text>{{item.gatherBuilding ? (item.gatherBuilding/1000).toFixed(3)/1 :0}}kg</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="nodata" v-if="listdata.length==0 && status!='loading'">
|
|
<view class="nodata" v-if="listdata.length==0 && status!='loading'">
|
|
@@ -90,6 +91,7 @@
|
|
total: 0, // 数据总条数
|
|
total: 0, // 数据总条数
|
|
noDataText: '暂无数据', // 列表请求状态提示语
|
|
noDataText: '暂无数据', // 列表请求状态提示语
|
|
status: 'loadmore', // 加载中状态
|
|
status: 'loadmore', // 加载中状态
|
|
|
|
+ titleStatus: false, // 顶部加载中状态
|
|
openScreen: false, // 是否打开筛选
|
|
openScreen: false, // 是否打开筛选
|
|
searchForm: { // 查询条件
|
|
searchForm: { // 查询条件
|
|
beginDate: getDate.getRecentday().starttime, // 创建时间默认筛选近7天
|
|
beginDate: getDate.getRecentday().starttime, // 创建时间默认筛选近7天
|
|
@@ -149,8 +151,8 @@
|
|
gatherList({
|
|
gatherList({
|
|
pageNo: this.pageNo,
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
- beginDate: this.searchForm.beginDate+' 00:00:00',
|
|
|
|
- endDate: this.searchForm.endDate+' 23:59:59',
|
|
|
|
|
|
+ beginDate: this.searchForm.beginDate?moment(this.searchForm.beginDate).format('YYYY-MM-DD 00:00:00'):'',
|
|
|
|
+ endDate: this.searchForm.endDate ? moment(this.searchForm.endDate).format('YYYY-MM-DD 23:59:59'):'',
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
if(this.pageNo>1){
|
|
if(this.pageNo>1){
|
|
@@ -182,6 +184,7 @@
|
|
},
|
|
},
|
|
// 总计
|
|
// 总计
|
|
getTotal(){
|
|
getTotal(){
|
|
|
|
+ this.titleStatus = true
|
|
gatherTotal({
|
|
gatherTotal({
|
|
beginDate: this.searchForm.beginDate,
|
|
beginDate: this.searchForm.beginDate,
|
|
endDate: this.searchForm.endDate}).then(res=>{
|
|
endDate: this.searchForm.endDate}).then(res=>{
|
|
@@ -191,6 +194,7 @@
|
|
this.chuyuTotal=res.data.GATHER_KITCHEN? (res.data.GATHER_KITCHEN/1000).toFixed(3)/1:0
|
|
this.chuyuTotal=res.data.GATHER_KITCHEN? (res.data.GATHER_KITCHEN/1000).toFixed(3)/1:0
|
|
}
|
|
}
|
|
console.log(res)
|
|
console.log(res)
|
|
|
|
+ this.titleStatus = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 打开垃圾数据录入页面
|
|
// 打开垃圾数据录入页面
|