测通完成评查,投票,意见列表,任务列表,任务关联文档列表的内容。剩余创建任务,提出意见的完善
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user