8.30 预约评标室

This commit is contained in:
jl-zhoujl2
2022-08-30 16:16:46 +08:00
parent 29e85ec345
commit 9bcffcc502
6 changed files with 310 additions and 149 deletions

View File

@ -6,6 +6,7 @@
*/
import { getDownloadSecretKey, getFilelist, getFilelistBySecond } from "@/services/download_";
import { message } from "antd";
import { isEmpty, isNotEmpty } from "./CommonUtils";
/**
@ -117,6 +118,8 @@ export const downloadFileObjectId = (objectId: string) => {
getFilelist([objectId]).then(res => {
if (res?.success && res?.data?.length > 0) {
downloadFile({ uid: res?.data[res?.data?.length - 1].fileId });
} else {
message.info("文档中心错误或文件不存在");
}
})
} else {
@ -159,12 +162,12 @@ export async function getFileListByBid(objectId: string) {
if (checkObjectId(objectId)) {//判断3.0 objectId
return getFilelist([objectId]).then(res => {
if (res?.success && res?.data?.length > 0) {
res?.data?.forEach(({ fileId, originalName }: any) => {
res?.data?.forEach(({ fileId, originalName, filePath }: any) => {
result.push({
uid: fileId,
name: originalName,
status: 'done',
url: 'javascript:void(0);',
url: originalName.endsWith(".png") || originalName.endsWith(".jpg") || originalName.endsWith(".jpeg") ? pictureDisplayPath + '?filePath=' + filePath : 'javascript:void(0);',
})
});
return result;