修试平衡表
This commit is contained in:
parent
445eb01338
commit
b478fa87e9
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -227,7 +250,7 @@ export default {
|
|||
.card-box {
|
||||
display: flex;
|
||||
height: 110px;
|
||||
|
||||
|
||||
.card-box-content {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
|
|
|
|||
Loading…
Reference in New Issue