|
@@ -50,7 +50,7 @@
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<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="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 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-button class="export-btn" id="unRecyclableRubbishDetails-export" :loading="loading" @click="handleExport">导出</a-button> -->
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
|
|
|
|
@@ -207,6 +207,53 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 导出
|
|
|
|
+ // 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 () {
|
|
reset () {
|
|
this.queryParam.stationNo = undefined
|
|
this.queryParam.stationNo = undefined
|