diff --git a/src/views/business-examine/direct-rotation-apply/index.vue b/src/views/business-examine/direct-rotation-apply/index.vue index 7f60089f..4b2489e4 100644 --- a/src/views/business-examine/direct-rotation-apply/index.vue +++ b/src/views/business-examine/direct-rotation-apply/index.vue @@ -143,6 +143,10 @@ export default { } }, 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') // // 设置默认状态为第一个选项(待审核) // if (this.statusOptions.length > 1) { @@ -151,13 +155,22 @@ export default { this.getList() }, 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() { this.getList() }, // 重置 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.pageSize = 10 this.$refs.queryForm.resetFields()