功能优化

This commit is contained in:
hayu 2024-12-05 19:50:35 +08:00
parent 2588ce49ca
commit b7a30186bf
1 changed files with 16 additions and 3 deletions

View File

@ -668,10 +668,23 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.userName=undefined;
this.queryParams.leaveTypes=undefined;
const now = new Date();
const yesterday = new Date(now);
yesterday.setDate(yesterday.getDate() - 1);
const formattedDate = yesterday.toISOString().split('T')[0];
// dateRange
this.$set(this, 'dateRange', [formattedDate, formattedDate]);
//
this.queryParams.userName = undefined;
this.queryParams.leaveTypes = undefined;
// dateRange
this.resetForm("queryForm");
this.handleQuery();
// 使$nextTickDOM
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {