diff --git a/src/views/exceptionHandle/errorData/index.vue b/src/views/exceptionHandle/errorData/index.vue index fa7f094..75cdff3 100644 --- a/src/views/exceptionHandle/errorData/index.vue +++ b/src/views/exceptionHandle/errorData/index.vue @@ -259,6 +259,9 @@ // 表单重置 reset() { this.queryForm = {}; + const lastMonth = new Date(); + lastMonth.setMonth(lastMonth.getMonth() - 1) + this.searchAttCurrentMonth = lastMonth; this.resetForm("queryForm"); this.getList(); }, diff --git a/src/views/exceptionHandle/errorForm/index.vue b/src/views/exceptionHandle/errorForm/index.vue index cb49929..9ba62a6 100644 --- a/src/views/exceptionHandle/errorForm/index.vue +++ b/src/views/exceptionHandle/errorForm/index.vue @@ -379,7 +379,11 @@ reset() { // this.searchAttCurrentMonth = ''; // this.queryParams.attCurrentMonth = null; + this.queryForm = {}; + const lastMonth = new Date(); + lastMonth.setMonth(lastMonth.getMonth() - 1) + this.searchAttCurrentMonth = lastMonth; this.resetForm("queryForm"); this.getList(); diff --git a/src/views/process/eightMembers/shortageSituation.vue b/src/views/process/eightMembers/shortageSituation.vue index b7b568e..89b5fec 100644 --- a/src/views/process/eightMembers/shortageSituation.vue +++ b/src/views/process/eightMembers/shortageSituation.vue @@ -25,15 +25,99 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -46,39 +130,31 @@ /> - + - - - - - - - - - - + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/src/views/report/attReport/record.vue b/src/views/report/attReport/record.vue index 23ca8b3..f7b69eb 100644 --- a/src/views/report/attReport/record.vue +++ b/src/views/report/attReport/record.vue @@ -291,7 +291,7 @@ export default { openReason: false, dialogList:[], // 日期范围 - dateRange: this.getDefaultDateRange(), + dateRange:[], reasonStr:undefined, deptOptions: [], // 查询参数 @@ -309,15 +309,33 @@ export default { console.log(this.$route.query.param) this.queryParams.userName=this.$route.query.param } + this.getWeekDates(); this.getDeptList(); this.getList(); }, methods: { - getDefaultDateRange() { - const today = new Date(); - const start = new Date(today.toISOString().split('T')[0]); // 移除时间部分,只保留日期 - const end = new Date(today.toISOString().split('T')[0]); // 同样只保留日期 - return [start, end]; + getWeekDates() { + const now = new Date(); + const dayOfWeek = now.getDay(); + const dayOffset = dayOfWeek === 0 ? -6 : 1 - dayOfWeek; + + const monday = new Date(now); + monday.setDate(monday.getDate() + dayOffset); + + const sunday = new Date(monday); + sunday.setDate(sunday.getDate() + 6); + this.dateRange[0]=monday.toISOString().split('T')[0]; + this.dateRange[1]=sunday.toISOString().split('T')[0]; + }, + formatDate(dateString){ + const date = new Date(dateString); // 创建日期对象 + const year = date.getFullYear(); // 获取年份 + const month = String(date.getMonth() + 1).padStart(2, '0'); // 获取月份(注意:月份从0开始) + const day = String(date.getDate()).padStart(2, '0'); // 获取日期 + const weekdays = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; // 星期几数组 + const weekday = weekdays[date.getDay()]; // 获取星期几 + + return `${year}-${month}-${day} ${weekday}`; // 组合成所需格式 }, getDeptList() { listDept().then(response => { @@ -360,6 +378,7 @@ export default { }, /** 重置按钮操作 */ resetQuery() { + this.getWeekDates(); this.resetForm("queryForm"); this.handleQuery(); }, diff --git a/src/views/report/monthlyError/index.vue b/src/views/report/monthlyError/index.vue index 969c638..8745ab3 100644 --- a/src/views/report/monthlyError/index.vue +++ b/src/views/report/monthlyError/index.vue @@ -391,8 +391,10 @@ //打开月异常详情页面 openRecord(row,titleBoss){ this.id = row.id; + this.title = titleBoss; this.queryRecord.userId = row.userId; + this.queryRecord.orgId = row.orgId; this.queryRecord.attCurrent = row.attCurrentMonth; if(titleBoss=='打卡记录'){ this.queryRecord.attStatis=1;