From 4ad91cabe3637a4eedad5747546f154658edf1f1 Mon Sep 17 00:00:00 2001 From: lbw_9527443 <780139497@qq.com> Date: Fri, 29 Aug 2025 16:04:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=90=A5=E6=9C=9F=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8E=86=E5=8F=B2=E8=90=A5=E6=9C=9F=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E4=B8=8E=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在API层新增获取历史营期和切换历史营期的接口方法 - 在日历组件中添加历史营期查看界面和状态指示器 - 实现历史营期列表展示、选中切换和返回当前营期功能 - 调整统计模式切换按钮顺序并修正参数传递逻辑 - 添加相关样式优化选中状态和操作按钮的交互效果 --- my-vue-app/src/api/secondTop.js | 9 +- .../views/secondTop/components/Calendar.vue | 230 +++++++++++++++--- .../secondTop/components/CenterOverview.vue | 15 +- 3 files changed, 218 insertions(+), 36 deletions(-) diff --git a/my-vue-app/src/api/secondTop.js b/my-vue-app/src/api/secondTop.js index 126e845..bf59aa3 100644 --- a/my-vue-app/src/api/secondTop.js +++ b/my-vue-app/src/api/secondTop.js @@ -72,7 +72,14 @@ export const getExcellentRecordFile = (params) => { export const changeCampPeriod = (params) => { return https.post('/api/v1/level_four/overview/change_camp_period', params) } - +// 获取历史营期 /api/v1/level_four/overview/get_history_camp_period +export const getHistoryCampPeriod = (params) => { + return https.post('/api/v1/level_four/overview/get_history_camp_period', params) +} +// 切换历史营期 /api/v1/level_four/overview/switch_history_camp_period +export const switchHistoryCampPeriod = (params) => { + return https.post('/api/v1/level_four/overview/switch_history_camp_period', params) +} diff --git a/my-vue-app/src/views/secondTop/components/Calendar.vue b/my-vue-app/src/views/secondTop/components/Calendar.vue index db74070..03cce9d 100644 --- a/my-vue-app/src/views/secondTop/components/Calendar.vue +++ b/my-vue-app/src/views/secondTop/components/Calendar.vue @@ -27,6 +27,12 @@ 历史 + - +
@@ -126,7 +127,7 @@ const emit = defineEmits(['update-check-type']) const switchStatsMode = (mode) => { statsMode.value = mode // 向父组件发送事件,修改CheckType的值 - const checkTypeValue = mode === 'monthly' ? 'month' : 'period' + const checkTypeValue = mode === 'monthly' ? 'period':'month' emit('update-check-type', checkTypeValue) console.log('切换统计模式:', mode, '发送CheckType值:', checkTypeValue) }