Merge branch 'shiy' into awen

This commit is contained in:
2025-04-10 10:55:25 +08:00
18 changed files with 2271 additions and 1238 deletions
+13 -21
View File
@@ -37,12 +37,12 @@ export function Sidebar({ onToggle, collapsed }: SidebarProps) {
path: '/files/upload',
icon: 'ri-upload-cloud-line'
},
{
id: 'file-list',
title: '文件列表',
path: '/files',
icon: 'ri-file-list-3-line'
},
// {
// id: 'file-list',
// title: '文件列表',
// path: '/files',
// icon: 'ri-file-list-3-line'
// },
{
id:'documents',
title:'文档列表',
@@ -80,15 +80,7 @@ export function Sidebar({ onToggle, collapsed }: SidebarProps) {
title: '新增评查点',
path: '/rules/new',
icon: 'ri-add-circle-line'
}
]
},
{
id: 'review-management',
title: '评查结果',
path: '/reviews',
icon: 'ri-bar-chart-box-line',
children: [
},
{
id: 'review-detail',
title: '评查详情',
@@ -109,12 +101,12 @@ export function Sidebar({ onToggle, collapsed }: SidebarProps) {
path: '/config-lists',
icon: 'ri-list-check-3'
},
{
id: 'basic-settings',
title: '基础设置',
path: '/settings',
icon: 'ri-equalizer-line'
},
// {
// id: 'basic-settings',
// title: '基础设置',
// path: '/settings',
// icon: 'ri-equalizer-line'
// },
{
id: 'document-types',
title: '文档类型',
+18 -2
View File
@@ -50,7 +50,15 @@ export const UploadArea = forwardRef<UploadAreaRef, UploadAreaProps>(({
}));
const handleClick = useCallback(() => {
if (!disabled && !shouldPreventFileSelect && fileInputRef.current) {
if (disabled) return;
if (shouldPreventFileSelect) {
// 如果应该阻止文件选择,则触发表单提交
const form = fileInputRef.current?.closest('form');
if (form) {
form.requestSubmit();
}
} else if (fileInputRef.current) {
fileInputRef.current.click();
}
}, [disabled, shouldPreventFileSelect]);
@@ -76,7 +84,15 @@ export const UploadArea = forwardRef<UploadAreaRef, UploadAreaProps>(({
e.preventDefault();
setIsDragOver(false);
if (!disabled && !shouldPreventFileSelect && e.dataTransfer.files.length > 0) {
if (disabled) return;
if (shouldPreventFileSelect) {
// 如果应该阻止文件选择,则触发表单提交
const form = e.currentTarget.closest('form');
if (form) {
form.requestSubmit();
}
} else if (e.dataTransfer.files.length > 0) {
onFilesSelected(e.dataTransfer.files);
}
}, [disabled, shouldPreventFileSelect, onFilesSelected]);