From eece5b838b0fe29ea003c355b1228de4795d3873 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期日, 04 一月 2026 11:14:06 +0800
Subject: [PATCH] 提交流程表单
---
src/views/workbench.vue | 56 ++++++++++++++++++++++++++++++++++----------------------
1 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/src/views/workbench.vue b/src/views/workbench.vue
index cd36e6f..a7675dd 100644
--- a/src/views/workbench.vue
+++ b/src/views/workbench.vue
@@ -222,7 +222,15 @@
<div class="schedule-list-section">
<div class="section-header">
<h3>鏃ョ▼鍒楄〃</h3>
- <div>
+ <div class="header-actions">
+ <el-date-picker
+ v-model="calendarDate"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="mini"
+ style="width: 140px; margin-right: 10px"
+ :clearable="false"
+ />
<el-button type="text" icon="el-icon-plus" @click="handleAddSchedule">鏂板</el-button>
<el-button type="text" icon="el-icon-refresh" @click="getScheduleList" :disabled="scheduleRefreshing">鍒锋柊</el-button>
</div>
@@ -375,12 +383,20 @@
</el-calendar>
</div>
<div class="schedule-list-section">
- <div class="section-header">
- <h3>涓婃姤鍒楄〃</h3>
- <div>
- <el-button type="text" icon="el-icon-refresh" @click="getReportList" :disabled="reportRefreshing">鍒锋柊</el-button>
+ <div class="section-header">
+ <h3>涓婃姤鍒楄〃</h3>
+ <div class="header-actions">
+ <el-date-picker
+ v-model="reportCalendarDate"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="mini"
+ style="width: 140px; margin-right: 10px"
+ :clearable="false"
+ />
+ <el-button type="text" icon="el-icon-refresh" @click="getReportList" :disabled="reportRefreshing">鍒锋柊</el-button>
+ </div>
</div>
- </div>
<div class="schedule-list">
<el-table
v-loading="reportLoading"
@@ -543,29 +559,25 @@
},
watch:{
calendarDate(newDate, oldDate) {
- // 鎺掗櫎銆岀偣鍑绘棩鏈熷崟鍏冩牸銆嶅鑷寸殑鍙樺寲锛堜粎鏃ユ湡鍙橈紝鏈堜唤/骞翠唤涓嶅彉锛�
- const isOnlyDayChange =
- newDate.getFullYear() === oldDate.getFullYear() &&
- newDate.getMonth() === oldDate.getMonth() &&
- newDate.getDate() !== oldDate.getDate();
+ // 妫�鏌ユ槸鍚﹁法鏈�/璺ㄥ勾
+ const isMonthChanged =
+ newDate.getFullYear() !== oldDate.getFullYear() ||
+ newDate.getMonth() !== oldDate.getMonth();
- if (!isOnlyDayChange) {
- // 瑙﹀彂鎸夐挳鐐瑰嚮閫昏緫锛堜笂鏈�/涓嬫湀/浠婃棩锛�
+ if (isMonthChanged) {
+ // 瑙﹀彂鍚庣鎷夊彇鏁存湀鏁版嵁
this.getScheduleList();
- this.lastCalendarDate = new Date(newDate); // 鏇存柊璁板綍鐨勬棩鏈�
}
},
reportCalendarDate(newDate, oldDate) {
- // 鎺掗櫎銆岀偣鍑绘棩鏈熷崟鍏冩牸銆嶅鑷寸殑鍙樺寲锛堜粎鏃ユ湡鍙橈紝鏈堜唤/骞翠唤涓嶅彉锛�
- const isOnlyDayChange =
- newDate.getFullYear() === oldDate.getFullYear() &&
- newDate.getMonth() === oldDate.getMonth() &&
- newDate.getDate() !== oldDate.getDate();
+ // 妫�鏌ユ槸鍚﹁法鏈�/璺ㄥ勾
+ const isMonthChanged =
+ newDate.getFullYear() !== oldDate.getFullYear() ||
+ newDate.getMonth() !== oldDate.getMonth();
- if (!isOnlyDayChange) {
- // 瑙﹀彂鎸夐挳鐐瑰嚮閫昏緫锛堜笂鏈�/涓嬫湀/浠婃棩锛�
+ if (isMonthChanged) {
+ // 瑙﹀彂鍚庣鎷夊彇鏁存湀鏁版嵁
this.getReportList();
- this.lastReportCalendarDate = new Date(newDate); // 鏇存柊璁板綍鐨勬棩鏈�
}
},
},
--
Gitblit v1.8.0