From 7699e8857876e828edc650e78106fe6dc9d05d8c Mon Sep 17 00:00:00 2001 From: v6ole Date: Mon, 13 Jul 2026 01:12:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=88=91=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=A5=E6=9C=9F=E7=AD=9B=E9=80=89=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=9C=88=E5=BA=A6=E9=80=89=E6=8B=A9=E5=99=A8+?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=8C=89=E9=92=AE=E7=A7=BB=E8=87=B3=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 替换固定周期(本周/本月/本年)为 el-date-picker type=month - 支持任意月份筛选,选完自动刷新 - 新建按钮移至筛选栏最右侧,与搜索框同行 - 各Tab内移除独立的创建按钮 Co-Authored-By: Claude --- .../src/views/desktop/ManagerWorkspace.vue | 41 ++++++------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/frontend/src/views/desktop/ManagerWorkspace.vue b/frontend/src/views/desktop/ManagerWorkspace.vue index 11eaf1a..4ec9b3f 100644 --- a/frontend/src/views/desktop/ManagerWorkspace.vue +++ b/frontend/src/views/desktop/ManagerWorkspace.vue @@ -13,8 +13,9 @@ const activeTab = ref('visits') const loading = ref(false) const allManagers = ref([]) -// Period filter -const period = ref('month') +// Date range filter +const dateFrom = ref('') +const dateTo = ref('') const searchText = ref('') const pageSize = ref(25) @@ -29,17 +30,7 @@ const page = ref>({ visits: 1, notes: 1, plans: 1, mini: const total = ref>({ visits: 0, notes: 0, plans: 0, mini: 0, key: 0 }) function getDateRange() { - const now = new Date() - const today = now.toISOString().slice(0, 10) - if (period.value === 'week') { - const d = new Date(now); d.setDate(d.getDate() - d.getDay() + 1) - return { from: d.toISOString().slice(0, 10), to: today } - } else if (period.value === 'month') { - return { from: `${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-01`, to: today } - } else if (period.value === 'year') { - return { from: `${now.getFullYear()}-01-01`, to: today } - } - return { from: '', to: '' } + return { from: dateFrom.value, to: dateTo.value } } const customers = ref([]) const allUsers = ref([]) @@ -165,7 +156,7 @@ async function loadAll() { } function onTabChange(tab: string) { activeTab.value = tab; loadAll() } -function onPeriodChange() { Object.keys(page.value).forEach(k => page.value[k] = 1); loadAll() } +function onFilterChange() { Object.keys(page.value).forEach(k => page.value[k] = 1); loadAll() } function onPageChange(tabKey: string, p: number) { page.value[tabKey] = p; loadAll() } function onSizeChange() { Object.keys(page.value).forEach(k => page.value[k] = 1); loadAll() } @@ -360,15 +351,12 @@ const notesByDate = computed(() => {
- - 本周 - 本月 - 本年 - 全部 - - - - + + + + 清除 + + + 新建
@@ -376,8 +364,7 @@ const notesByDate = computed(() => { -
+ 新建拜访
-
+

@@ -409,7 +396,6 @@ const notesByDate = computed(() => { -
+ 新建纪要

@@ -435,7 +421,6 @@ const notesByDate = computed(() => { -
+ 新建计划
@@ -467,7 +452,6 @@ const notesByDate = computed(() => { -
+ 新建商机
@@ -501,7 +485,6 @@ const notesByDate = computed(() => { -
+ 新建要客拜访