修试平衡表

This commit is contained in:
bb_pan 2025-03-25 17:54:25 +08:00
parent 445eb01338
commit b478fa87e9
1 changed files with 36 additions and 13 deletions

View File

@ -30,6 +30,7 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="onHandleSearch">查询</el-button>
<el-button icon="el-icon-refresh" @click="onHandleReset">重置</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出数据</el-button>
</el-form-item>
</el-row>
</el-form>
@ -96,7 +97,7 @@ export default {
keyWord: ''
},
//
queryDate: this.getDefaultDateRange(), //
queryDate: [], //
cardList_2: [
{
title: '总接收量',
@ -162,23 +163,21 @@ export default {
]
}
},
created() {
this.queryDate = this.getDefaultDateRange()
},
methods: {
async getList() {
const params = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
keyWord: this.queryParams.keyWord
}
if (this.queryDate) {
params.startTime = this.queryDate[0]
params.endTime = this.queryDate[1]
this.queryParams.startTime = this.queryDate[0]
this.queryParams.endTime = this.queryDate[1]
} else {
params.startTime = ''
params.endTime = ''
this.queryParams.startTime = ''
this.queryParams.endTime = ''
}
console.log('🚀 ~ getList ~ params:', params)
console.log('🚀 ~ getList ~ this.queryParams:', this.queryParams)
try {
// const res = await (params)
// const res = await (this.queryParams)
} catch (error) {
console.log('🚀 ~ getList ~ error:', error)
}
@ -217,6 +216,30 @@ export default {
//
return [formatDate(lastMonth), formatDate(today)]
},
//
handleExport() {
//
this.$message({
type: 'warning',
message: '导出功能尚开发中,敬请期待!'
})
if (this.queryDate) {
this.queryParams.startTime = this.queryDate[0]
this.queryParams.endTime = this.queryDate[1]
} else {
this.queryParams.startTime = ''
this.queryParams.endTime = ''
}
try {
let fileName = `数据_${new Date().getTime()}.xLsx`
let url = ''
const params = { ...this.queryParams }
console.log('🚀 ~ 导出 ~ params:', params)
// this.download(url, params, fileName)
} catch (error) {
console.log('导出数据失败', error)
}
}
}
}