From f87c6b8252c9b174921c3791045a43613192510d Mon Sep 17 00:00:00 2001 From: lbw_9527443 <780139497@qq.com> Date: Sat, 30 Aug 2025 12:20:32 +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=8F=96=E6=B6=88=E5=88=87=E6=8D=A2=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=90=A5=E6=9C=9F=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=BB=9F=E8=AE=A1=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在API中添加cancelSwitchHistoryCampPeriod方法用于取消切换历史营期 - 将统计模式从'monthly'改为'month'以保持命名一致性 - 优化Calendar组件中历史营期按钮的显示逻辑 - 修复统计模式切换时checkType值的逻辑错误 --- my-vue-app/src/api/secondTop.js | 5 +++++ .../src/views/secondTop/components/Calendar.vue | 10 ++++++++-- .../views/secondTop/components/CenterOverview.vue | 12 ++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/my-vue-app/src/api/secondTop.js b/my-vue-app/src/api/secondTop.js index bf59aa3..3d3c282 100644 --- a/my-vue-app/src/api/secondTop.js +++ b/my-vue-app/src/api/secondTop.js @@ -80,6 +80,11 @@ export const getHistoryCampPeriod = (params) => { export const switchHistoryCampPeriod = (params) => { return https.post('/api/v1/level_four/overview/switch_history_camp_period', params) } +// 返回当前营期 /api/v1/level_four/overview/cancel_switch_history_camp_period +export const cancelSwitchHistoryCampPeriod = (params) => { + return https.post('/api/v1/level_four/overview/cancel_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 9c7fd05..ddf2960 100644 --- a/my-vue-app/src/views/secondTop/components/Calendar.vue +++ b/my-vue-app/src/views/secondTop/components/Calendar.vue @@ -21,7 +21,7 @@ 结束营期 - @@ -118,7 +118,7 @@ import { reactive, ref } from 'vue' import Tooltip from '@/components/Tooltip.vue' // 统计模式状态 -const statsMode = ref('monthly') // 默认按月统计 +const statsMode = ref('month') // 默认按月统计 // 定义emit事件 const emit = defineEmits(['update-check-type']) @@ -127,7 +127,7 @@ const emit = defineEmits(['update-check-type']) const switchStatsMode = (mode) => { statsMode.value = mode // 向父组件发送事件,修改CheckType的值 - const checkTypeValue = mode === 'monthly' ? 'period':'month' + const checkTypeValue = mode === 'period' ? 'period' : 'month' emit('update-check-type', checkTypeValue) console.log('切换统计模式:', mode, '发送CheckType值:', checkTypeValue) }