feat: 1. 完善交叉评查上传创建任务,改成动态加载文档类型。

2. 重新对齐交叉评查的接口。
This commit is contained in:
2025-12-02 10:10:03 +08:00
parent c9e0d5abba
commit 88466b7a8b
21 changed files with 561 additions and 174 deletions
+37 -6
View File
@@ -206,9 +206,9 @@ const statusConfig = {
};
// 任务类型标签配置
const taskTypeConfig = {
[CrossCheckingTaskType.CITY]: { label: '市交叉评查', color: 'green' as const },
[CrossCheckingTaskType.COUNTY]: { label: '下级交叉评查', color: 'orange' as const }
const taskTypeConfig: Record<string, { label: string; color: 'green' | 'orange' }> = {
[CrossCheckingTaskType.CITY]: { label: '市局间交叉评查', color: 'green' as const },
[CrossCheckingTaskType.DISTRICT]: { label: '区局间交叉评查', color: 'orange' as const }
};
// 案卷类型标签配置
@@ -248,6 +248,11 @@ export default function CrossCheckingIndex() {
total: 0
});
// 客户端调式日志
// useEffect(()=>{
// console.log('[CrossCheckingIndex] loaderData.tasks', loaderData.tasks)
// },[loaderData])
// 获取进度条样式类
const getProgressClass = (progress: number) => {
if (progress === 0) return 'low';
@@ -603,7 +608,7 @@ export default function CrossCheckingIndex() {
align: "center" as const,
width: "10%",
render: (_: unknown, record: CrossCheckingTask) => {
const config = taskTypeConfig[record.taskType];
const config = taskTypeConfig[record.taskType] || { label: record.taskType, color: 'gray' as const };
return (
<Tag color={config.color}>
{config.label}
@@ -613,10 +618,36 @@ export default function CrossCheckingIndex() {
},
{
title: "评查地区",
dataIndex: "evaluationRegion" as keyof CrossCheckingTask,
key: "evaluationRegion",
align: "left" as const,
width: "16%"
width: "16%",
render: (_: unknown, record: CrossCheckingTask) => {
const regions = record.evaluationRegion;
// 如果不是数组,直接显示字符串
if (!Array.isArray(regions)) {
return <span className="text-sm">{regions || '-'}</span>;
}
// 如果是空数组
if (regions.length === 0) {
return <span className="text-sm text-gray-400">-</span>;
}
// 渲染为标签列表
return (
<div className="flex flex-wrap gap-1 items-start">
{regions.map((region, index) => (
<Tag
key={`${region}-${index}`}
color="cyan"
>
{region}
</Tag>
))}
</div>
);
}
},
{
title: "评查进度",