测通完成评查,投票,意见列表,任务列表,任务关联文档列表的内容。剩余创建任务,提出意见的完善

This commit is contained in:
2025-07-23 10:22:51 +08:00
parent 47664fc0e8
commit 8800e982ab
13 changed files with 750 additions and 331 deletions
+11 -4
View File
@@ -104,7 +104,8 @@ export async function uploadCrossCheckingDocument(
remark: string = '',
isTestDocument: boolean = false,
documentId: number | null = null,
isReupload: boolean = false
isReupload: boolean = false,
token: string | null = null
): Promise<{data: CrossCheckingFileUploadResponse; error?: never} | {data?: never; error: string; status?: number}> {
try {
console.log('【交叉评查上传】开始上传文档:', { fileName, fileSize: binaryData.byteLength, typeId });
@@ -140,11 +141,17 @@ export async function uploadCrossCheckingDocument(
// 发送请求
try {
console.log('【交叉评查上传】开始fetch请求...');
const headers: HeadersInit = {
'X-File-Name': encodeURIComponent(fileName),
};
if (token) {
headers['Authorization'] = `Bearer ${token}`;
}
const response = await fetch(uploadUrl, {
method: 'POST',
headers: {
'X-File-Name': encodeURIComponent(fileName)
},
headers,
body: formData
});