直转审核页面查询优化

This commit is contained in:
hongchao 2025-11-03 17:15:25 +08:00
parent d1fee9fab4
commit 7ee7f6527e
1 changed files with 14 additions and 1 deletions

View File

@ -143,6 +143,10 @@ export default {
} }
}, },
created() { created() {
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.timeRange = [this.format(start), this.format(end)]
this.userId = sessionStorage.getItem('userId') this.userId = sessionStorage.getItem('userId')
// // // //
// if (this.statusOptions.length > 1) { // if (this.statusOptions.length > 1) {
@ -151,13 +155,22 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
format(date) {
const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
},
// //
handleQuery() { handleQuery() {
this.getList() this.getList()
}, },
// //
handleReset() { handleReset() {
this.timeRange = [] const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.timeRange = [this.format(start), this.format(end)]
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.queryParams.pageSize = 10 this.queryParams.pageSize = 10
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()