From dd69e902ec8c849475c174c15bbd33b399bcbe9b Mon Sep 17 00:00:00 2001 From: v6ole Date: Wed, 24 Jun 2026 19:07:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=AE=E7=81=AF=E8=A1=A8=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=AE=A2=E6=88=B7=20=E2=86=92=20=E5=91=A8=E6=8A=A5?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8C=89=E5=AE=A2=E6=88=B7=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - WeeklyReport onMounted 新增 customer_id 路由参数处理 - 筛选栏新增「按客户筛选」下拉框(filterable搜索) - 加载客户列表供下拉选项 --- frontend/src/views/desktop/WeeklyReport.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/desktop/WeeklyReport.vue b/frontend/src/views/desktop/WeeklyReport.vue index 8c9150e..1dab369 100644 --- a/frontend/src/views/desktop/WeeklyReport.vue +++ b/frontend/src/views/desktop/WeeklyReport.vue @@ -4,6 +4,7 @@ import { useRoute } from 'vue-router' import { useAuthStore } from '@/stores/auth' import { dashboardApi } from '@/api/dashboard' import { uploadApi } from '@/api/upload' +import { customersApi } from '@/api/customers' import { aiApi } from '@/api/ai' import { ElMessage } from 'element-plus' import ImagePreview from '@/components/ImagePreview.vue' @@ -19,6 +20,7 @@ const activeTab = ref('visits') const filterManagerId = ref('') const filterCustomerId = ref('') const managers = ref([]) +const customers = ref([]) const weekOffset = ref(0) const isHistoricalWeek = computed(() => weekOffset.value < 0) @@ -35,10 +37,15 @@ const currentPhotoUrl = ref('') onMounted(async () => { if (route.query.manager_id) filterManagerId.value = route.query.manager_id as string + if (route.query.customer_id) filterCustomerId.value = route.query.customer_id as string await loadReport() try { - const res = await api.get('/users/', { params: { role: 'manager' } }) - managers.value = res.data + const [mRes, cRes] = await Promise.all([ + api.get('/users/', { params: { role: 'manager' } }), + customersApi.list({ page_size: 500 }), + ]) + managers.value = mRes.data + customers.value = cRes.data.items || cRes.data } catch (_) {} }) @@ -202,11 +209,16 @@ const notesByDate = computed(() => { - + + + + + + 查询