|
@@ -50,6 +50,7 @@
|
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" id="unRecyclableRubbishDetails-refresh" style="margin-top: 4px">查询</a-button>
|
|
|
<a-button type="" @click="reset" id="unRecyclableRubbishDetails-reset" style="margin: 4px 0 0 10px">重置</a-button>
|
|
|
+ <!-- <a-button class="export-btn" id="unRecyclableRubbishDetails-export" :loading="loading" @click="handleExport">导出</a-button> -->
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
|
|
@@ -58,7 +59,7 @@
|
|
|
<!-- 合计 -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
<div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ total }} </span>kg。
|
|
|
- 其中,其他垃圾总计<span> {{ otherTotal }} </span>kg,厨余垃圾总计<span>{{ chuyuTotal }} </span>kg,建筑垃圾总计<span> {{ jianzhuTotal }} </span>kg
|
|
|
+ 其中,可回收物总计<span>{{ huishouTotal }} </span>kg,有害垃圾总计<span>{{ harmTotal }} </span>kg,厨余垃圾总计<span>{{ chuyuTotal }} </span>kg,其他垃圾总计<span> {{ otherTotal }} </span>kg,建筑垃圾总计<span> {{ jianzhuTotal }} </span>kg
|
|
|
</div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
@@ -90,6 +91,8 @@ export default {
|
|
|
return {
|
|
|
orderTotal: 0, // 总计条数
|
|
|
total: 0, // 可回收垃圾总计
|
|
|
+ huishouTotal: 0, // 可回收物
|
|
|
+ harmTotal: 0, // 有害垃圾
|
|
|
otherTotal: 0, // 其他垃圾总计
|
|
|
jianzhuTotal: 0, // 建筑垃圾总计
|
|
|
chuyuTotal: 0, // 厨余垃圾总计
|
|
@@ -99,6 +102,7 @@ export default {
|
|
|
endDate: null, // 结束时间
|
|
|
queryWord: ''
|
|
|
},
|
|
|
+ loading: false,
|
|
|
optionData: [], // 网点列表数据
|
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
|
time: [
|
|
@@ -112,8 +116,10 @@ export default {
|
|
|
{ title: '网点名称', dataIndex: 'stationName', width: 120, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
{ title: '采集员姓名', dataIndex: 'gatherName', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
{ title: '采集员手机', dataIndex: 'gatherPhone', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '其他垃圾(kg)', dataIndex: 'gatherOther', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '可回收物(kg)', dataIndex: 'gatherRecycling', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '有害垃圾(kg)', dataIndex: 'gatherHarm', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
{ title: '厨余垃圾(kg)', dataIndex: 'gatherKitchen', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '其他垃圾(kg)', dataIndex: 'gatherOther', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
{ title: '建筑垃圾(kg)', dataIndex: 'gatherBuilding', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
{ title: '总计(kg)', dataIndex: 'gatherTotal', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
{ title: '备注', dataIndex: 'remarks', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
@@ -195,10 +201,59 @@ export default {
|
|
|
this.jianzhuTotal = res.data.GATHER_BUILDING ? (res.data.GATHER_BUILDING / 1000).toFixed(3) / 1 : '0'
|
|
|
this.chuyuTotal = res.data.GATHER_KITCHEN ? (res.data.GATHER_KITCHEN / 1000).toFixed(3) / 1 : '0'
|
|
|
this.total = res.data.GATHER_TOTAL ? (res.data.GATHER_TOTAL / 1000).toFixed(3) / 1 : '0'
|
|
|
+ this.harmTotal = res.data.GATHER_HARM ? (res.data.GATHER_HARM / 1000).toFixed(3) / 1 : '0'
|
|
|
+ this.huishouTotal = res.data.GATHER_RECYCLING ? (res.data.GATHER_RECYCLING / 1000).toFixed(3) / 1 : '0'
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ // handleExport () {
|
|
|
+ // const params = this.queryParam
|
|
|
+ // if (this.time && this.time.length) {
|
|
|
+ // params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
+ // params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
+ // } else {
|
|
|
+ // params.beginDate = null
|
|
|
+ // params.endDate = null
|
|
|
+ // }
|
|
|
+ // if (!params.beginDate && !params.endDate) {
|
|
|
+ // this.$message.error('请先选择需要导出的投放时间区间再进行导出!')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // // 判断两个时间段是否相差m个月 第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
|
|
|
+ // if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
|
|
|
+ // this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // this.$confirm({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '导出过程可能需要一些时间,且导出期间不能进行其它操作,确定要导出吗?',
|
|
|
+ // onOk: () => {
|
|
|
+ // this.loading = true
|
|
|
+ // exportTnTimeForm(params).then(res => {
|
|
|
+ // this.loading = false
|
|
|
+ // this.download(res)
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // onCancel () {
|
|
|
+ // console.log('Cancel')
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // download (data) {
|
|
|
+ // if (!data) { return }
|
|
|
+ // const url = window.URL.createObjectURL(new Blob([data]))
|
|
|
+ // const link = document.createElement('a')
|
|
|
+ // link.style.display = 'none'
|
|
|
+ // link.href = url
|
|
|
+ // const a = moment(this.queryParam.beginDate).format('LL') + '-' + moment(this.queryParam.endDate).format('LL')
|
|
|
+ // const name = this.queryParam.stationNo ? this.optionData.find(item => item.stationNo == this.queryParam.stationNo).name : ''
|
|
|
+ // const fname = a + '分时投递统计表' + (name ? '(' + name + ')' : '')
|
|
|
+ // link.setAttribute('download', fname + '.xlsx')
|
|
|
+ // document.body.appendChild(link)
|
|
|
+ // link.click()
|
|
|
+ // },
|
|
|
// 重置
|
|
|
reset () {
|
|
|
this.queryParam.stationNo = undefined
|
|
@@ -238,6 +293,16 @@ export default {
|
|
|
}
|
|
|
.image:not(:first-child){
|
|
|
display: none;
|
|
|
+ }
|
|
|
+ .export-btn{
|
|
|
+ background-color: #ff9900;
|
|
|
+ border-color: #ff9900;
|
|
|
+ color: #fff;
|
|
|
+ margin: 4px 0 0 10px
|
|
|
+ }
|
|
|
+ .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
|
|
|
+ color: #fff;
|
|
|
+ border-color: #ff9900;
|
|
|
}
|
|
|
}
|
|
|
</style>
|