修试平衡表
This commit is contained in:
parent
445eb01338
commit
b478fa87e9
|
|
@ -30,6 +30,7 @@
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="onHandleSearch">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="onHandleSearch">查询</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="onHandleReset">重置</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-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -96,7 +97,7 @@ export default {
|
||||||
keyWord: ''
|
keyWord: ''
|
||||||
},
|
},
|
||||||
// 日期查询条件
|
// 日期查询条件
|
||||||
queryDate: this.getDefaultDateRange(), // 默认时间范围
|
queryDate: [], // 默认时间范围
|
||||||
cardList_2: [
|
cardList_2: [
|
||||||
{
|
{
|
||||||
title: '总接收量',
|
title: '总接收量',
|
||||||
|
|
@ -162,23 +163,21 @@ export default {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.queryDate = this.getDefaultDateRange()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getList() {
|
async getList() {
|
||||||
const params = {
|
|
||||||
pageNum: this.queryParams.pageNum,
|
|
||||||
pageSize: this.queryParams.pageSize,
|
|
||||||
keyWord: this.queryParams.keyWord
|
|
||||||
}
|
|
||||||
if (this.queryDate) {
|
if (this.queryDate) {
|
||||||
params.startTime = this.queryDate[0]
|
this.queryParams.startTime = this.queryDate[0]
|
||||||
params.endTime = this.queryDate[1]
|
this.queryParams.endTime = this.queryDate[1]
|
||||||
} else {
|
} else {
|
||||||
params.startTime = ''
|
this.queryParams.startTime = ''
|
||||||
params.endTime = ''
|
this.queryParams.endTime = ''
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ getList ~ params:', params)
|
console.log('🚀 ~ getList ~ this.queryParams:', this.queryParams)
|
||||||
try {
|
try {
|
||||||
// const res = await (params)
|
// const res = await (this.queryParams)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('🚀 ~ getList ~ error:', error)
|
console.log('🚀 ~ getList ~ error:', error)
|
||||||
}
|
}
|
||||||
|
|
@ -217,6 +216,30 @@ export default {
|
||||||
|
|
||||||
// 返回从前一个月到今天的日期范围
|
// 返回从前一个月到今天的日期范围
|
||||||
return [formatDate(lastMonth), formatDate(today)]
|
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 {
|
.card-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 110px;
|
height: 110px;
|
||||||
|
|
||||||
.card-box-content {
|
.card-box-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue