feat: 将文件上传大小限制从50MB/100MB提升至500MB
This commit is contained in:
parent
863f1ba18e
commit
3d7106fd7b
@ -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 配置
|
||||
|
||||
@ -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 配置
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user