From 3059f0e7e4cde3c8172bf6c396f29792411d456e Mon Sep 17 00:00:00 2001 From: v6ole Date: Mon, 13 Jul 2026 00:32:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=B8=AD=E5=BF=83=E6=96=B0=E5=A2=9E=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=8B=9C=E8=AE=BF+=E5=8E=86=E5=8F=B2=E7=BA=AA=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 工作中心新增两个卡片入口:历史拜访 / 历史纪要 - VisitsList.vue: 拜访历史记录列表,点击进入编辑 - NotesList.vue: 纪要历史记录列表,点击进入编辑 - 复用已有编辑表单(VisitForm/DailyNoteForm edit mode) - 网格改为3列布局容纳6个卡片 Co-Authored-By: Claude --- frontend/src/router/index.ts | 2 + frontend/src/views/mobile/NotesList.vue | 79 ++++++++++++++++++++++++ frontend/src/views/mobile/VisitsList.vue | 76 +++++++++++++++++++++++ frontend/src/views/mobile/WorkCenter.vue | 12 +++- 4 files changed, 166 insertions(+), 3 deletions(-) create mode 100644 frontend/src/views/mobile/NotesList.vue create mode 100644 frontend/src/views/mobile/VisitsList.vue diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index e8f2bf6..96e9856 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -46,6 +46,8 @@ const router = createRouter({ { path: 'key-visit/:id/edit', name: 'KeyVisitEdit', component: () => import('@/views/mobile/KeyVisitForm.vue') }, { path: 'note/new', name: 'DailyNoteForm', component: () => import('@/views/mobile/DailyNoteForm.vue') }, { path: 'note/:id/edit', name: 'DailyNoteEdit', component: () => import('@/views/mobile/DailyNoteForm.vue') }, + { path: 'visits', name: 'VisitsList', component: () => import('@/views/mobile/VisitsList.vue') }, + { path: 'notes', name: 'NotesList', component: () => import('@/views/mobile/NotesList.vue') }, { path: 'plans', name: 'PlansList', component: () => import('@/views/mobile/PlansList.vue') }, { path: 'mini-biz', name: 'MiniBizList', component: () => import('@/views/mobile/MiniBizList.vue') }, { path: 'key-visits', name: 'KeyVisitsList', component: () => import('@/views/mobile/KeyVisitsList.vue') }, diff --git a/frontend/src/views/mobile/NotesList.vue b/frontend/src/views/mobile/NotesList.vue new file mode 100644 index 0000000..635f131 --- /dev/null +++ b/frontend/src/views/mobile/NotesList.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/frontend/src/views/mobile/VisitsList.vue b/frontend/src/views/mobile/VisitsList.vue new file mode 100644 index 0000000..ed92701 --- /dev/null +++ b/frontend/src/views/mobile/VisitsList.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/frontend/src/views/mobile/WorkCenter.vue b/frontend/src/views/mobile/WorkCenter.vue index 441780b..17c8296 100644 --- a/frontend/src/views/mobile/WorkCenter.vue +++ b/frontend/src/views/mobile/WorkCenter.vue @@ -4,16 +4,20 @@ import { useRouter } from 'vue-router' import api from '@/api/index' const router = useRouter() -const counts = ref({ plans: 0, miniBiz: 0, keyVisits: 0, leaves: 0 }) +const counts = ref({ visits: 0, notes: 0, plans: 0, miniBiz: 0, keyVisits: 0, leaves: 0 }) onMounted(async () => { try { - const [plans, mini, key, leaves] = await Promise.all([ + const [visits, notes, plans, mini, key, leaves] = await Promise.all([ + api.get('/visits/', { params: { page_size: 1 } }), + api.get('/daily-notes/', { params: { page_size: 1 } }), api.get('/work-plans/'), api.get('/mini-business/'), api.get('/key-visits/'), api.get('/leaves/', { params: { page_size: 1 } }), ]) + counts.value.visits = Array.isArray(visits.data) ? visits.data.length : (visits.data.total || (visits.data.items || []).length) + counts.value.notes = Array.isArray(notes.data) ? notes.data.length : (notes.data.total || (notes.data.items || []).length) counts.value.plans = Array.isArray(plans.data) ? plans.data.length : (plans.data.items || []).length counts.value.miniBiz = Array.isArray(mini.data) ? mini.data.length : (mini.data.items || []).length counts.value.keyVisits = Array.isArray(key.data) ? key.data.length : (key.data.items || []).length @@ -22,6 +26,8 @@ onMounted(async () => { }) const modules = [ + { path: '/m/visits', label: '历史拜访', icon: '📋', count: () => counts.value.visits, color: '#4A6741' }, + { path: '/m/notes', label: '历史纪要', icon: '📝', count: () => counts.value.notes, color: '#1C3738' }, { path: '/m/plans', label: '工作计划', icon: '📅', count: () => counts.value.plans, color: '#4A6741' }, { path: '/m/mini-biz', label: '商机跟单', icon: '💰', count: () => counts.value.miniBiz, color: '#C4934A' }, { path: '/m/key-visits', label: '要客拜访', icon: '⭐', count: () => counts.value.keyVisits, color: '#5B7FA5' }, @@ -64,7 +70,7 @@ const modules = [ .form-rule { width: 100%; height: 2px; background: var(--warm-border); margin-top: 6px; position: relative; } .form-rule::after { content: ''; position: absolute; left: 0; top: 0; width: 32px; height: 2px; background: var(--gold); } -.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } +.module-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; } .module-card { background: var(--surface); border: 1px solid var(--warm-border); padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px;