From 3d7106fd7bef8a178b3cf039fe294438975fba01 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 9 Jan 2026 16:11:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=A4=A7=E5=B0=8F=E9=99=90=E5=88=B6=E4=BB=8E50MB/100M?= =?UTF-8?q?B=E6=8F=90=E5=8D=87=E8=87=B3500MB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 6 +++--- .../src/main/resources/application-prod.yml | 6 +++--- frontend/src/views/Analytics.vue | 20 ++++++++++++++++--- frontend/src/views/CreateTask.vue | 6 +++--- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/backend/src/main/resources/application-dev.yml b/backend/src/main/resources/application-dev.yml index 3aaec7e..c7ec3ec 100644 --- a/backend/src/main/resources/application-dev.yml +++ b/backend/src/main/resources/application-dev.yml @@ -36,8 +36,8 @@ spring: servlet: multipart: enabled: true - max-file-size: 50MB - max-request-size: 100MB + max-file-size: 500MB + max-request-size: 500MB # JWT 配置 jwt: @@ -70,7 +70,7 @@ file: upload: # 本地开发路径(项目目录下) path: ./uploads - max-size: 52428800 # 50MB + max-size: 524288000 # 500MB allowed-extensions: .xls,.xlsx,.doc,.docx,.pdf,.zip # MyBatis Plus 配置 diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index b27f0e9..281e721 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -36,8 +36,8 @@ spring: servlet: multipart: enabled: true - max-file-size: 100MB - max-request-size: 100MB + max-file-size: 500MB + max-request-size: 500MB # JWT 配置 jwt: @@ -77,7 +77,7 @@ file: upload: # 生产环境路径 path: /opt/designhub/uploads - max-size: 104857600 # 100MB + max-size: 524288000 # 500MB allowed-extensions: .xls,.xlsx,.doc,.docx,.pdf,.zip # MyBatis Plus 配置 diff --git a/frontend/src/views/Analytics.vue b/frontend/src/views/Analytics.vue index bfe82c1..848ee42 100644 --- a/frontend/src/views/Analytics.vue +++ b/frontend/src/views/Analytics.vue @@ -933,12 +933,26 @@ const exportData = () => { message.success('报表导出成功') } -// 加载接单部门列表 +// 加载接单部门列表(只显示到二级部门) const loadDepartments = async () => { try { const res = await fetchDepartmentOverview() - // 只显示接单部门 - departmentList.value = (res.data || []).filter((d: any) => d.deptType === 'receiving') + const allDepts = res.data || [] + + // 获取所有接单部门 + const receivingDepts = allDepts.filter((d: any) => d.deptType === 'receiving') + + // 找出一级部门ID(parentId 为 0 或 null) + const level1DeptIds = new Set( + receivingDepts + .filter((d: any) => !d.parentId || d.parentId === 0) + .map((d: any) => d.id) + ) + + // 只保留一级和二级部门(parentId 为 0/null 或 parentId 在一级部门中) + departmentList.value = receivingDepts.filter((d: any) => + !d.parentId || d.parentId === 0 || level1DeptIds.has(d.parentId) + ) } catch (error) { console.error('加载部门列表失败:', error) } diff --git a/frontend/src/views/CreateTask.vue b/frontend/src/views/CreateTask.vue index c31fc06..586a7a4 100644 --- a/frontend/src/views/CreateTask.vue +++ b/frontend/src/views/CreateTask.vue @@ -1488,10 +1488,10 @@ const beforeUpload = (file: File) => { return false } - const isLt50M = file.size / 1024 / 1024 < 50 - if (!isLt50M) { + const isLt500M = file.size / 1024 / 1024 < 500 + if (!isLt500M) { console.error('[文件验证] 文件大小超限:', file.size) - message.error('文件大小不能超过 50MB') + message.error('文件大小不能超过 500MB') return false }