完善通过评查点的显示优化
This commit is contained in:
+12
-5
@@ -80,6 +80,7 @@ interface FileInfo {
|
||||
uploadTime: string;
|
||||
uploadUser: string;
|
||||
auditStatus: number;
|
||||
fileType: string; // 文件类型(1:合同,2:卷宗等)
|
||||
}
|
||||
|
||||
// 定义合同信息类型
|
||||
@@ -193,6 +194,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
|
||||
|
||||
// 确保reviewData有效且具有预期的属性
|
||||
if ('document' in reviewData && 'data' in reviewData && 'reviewInfo' in reviewData && 'stats' in reviewData) {
|
||||
console.log("reviewData-------",JSON.stringify(reviewData.document?.type,null,2));
|
||||
return Response.json({
|
||||
previousRoute: previousRoute,
|
||||
document: reviewData.document,
|
||||
@@ -248,12 +250,15 @@ export default function ReviewDetails() {
|
||||
path: document.path || "未知路径",
|
||||
contractNumber: document.documentNumber || "未知编号",
|
||||
fileSize: document.size ? formatFileSize(document.size) : "未知大小",
|
||||
// 文件格式类型
|
||||
fileFormat: document.fileType ? document.fileType.toUpperCase() : "未知格式",
|
||||
pageCount: document.pageCount || 0,
|
||||
uploadTime: document.uploadTime || "未知时间",
|
||||
uploadUser: document.uploadUser || "未知用户",
|
||||
auditStatus: document.auditStatus || 0,
|
||||
legalBasis: document.legalBasis || {}
|
||||
legalBasis: document.legalBasis || {},
|
||||
// 文件类型(1:合同,2:卷宗。。。)
|
||||
fileType: document.type || ""
|
||||
};
|
||||
|
||||
// 创建包含真实文档数据的评查数据对象
|
||||
@@ -529,12 +534,13 @@ export default function ReviewDetails() {
|
||||
|
||||
{/* 在面包屑右侧显示精简版的FileInfo */}
|
||||
<div className=" ml-10 text-left flex-1 flex flex-row flex-wrap">
|
||||
<span className="text-xl font-medium">
|
||||
<span className="mr-2 text-xl font-medium">
|
||||
{reviewData.fileInfo.fileName}
|
||||
</span>
|
||||
<div className="ml-2 text-xs text-gray-500 flex items-center">
|
||||
<div className="text-xs text-gray-500 flex items-center">
|
||||
{/* 合同编号:{reviewData.fileInfo.contractNumber} */}
|
||||
卷宗编号:{reviewData.fileInfo.contractNumber}
|
||||
{ reviewData.fileInfo.fileType != "1" ? "卷宗" : "合同" }
|
||||
编号:{reviewData.fileInfo.contractNumber}
|
||||
{reviewData.fileInfo.fileSize && (
|
||||
<span className="text-xs text-gray-500 ml-2">
|
||||
| {reviewData.fileInfo.fileSize} | {reviewData.fileInfo.fileFormat} | {reviewData.fileInfo.pageCount}页
|
||||
@@ -643,7 +649,8 @@ function getMockReviewData(): ReviewData {
|
||||
pageCount: 5,
|
||||
uploadTime: "2023-10-25 14:30:45",
|
||||
uploadUser: "张三",
|
||||
auditStatus: 0
|
||||
auditStatus: 0,
|
||||
fileType: "1"
|
||||
},
|
||||
contractInfo: {
|
||||
contractType: "销售合同",
|
||||
|
||||
Reference in New Issue
Block a user