4.1 同步发版内容到天梯

This commit is contained in:
jl-zhoujl2
2022-04-01 20:06:34 +08:00
parent a3b939d154
commit 7b3efe00dd
128 changed files with 929 additions and 5029 deletions

View File

@ -3,7 +3,7 @@ import { Modal, Button } from 'antd';
import PDF from 'react-pdf-js';
import ProCard from '@ant-design/pro-card';
import FileDown from '@/utils/Download';
import { checkFileExist } from './service';
import { getDownloadFileUrl, getFileListByBid } from '../DownloadUtils';
/**
* Pdf Modal弹窗公共组件
* 2021.8.25 zhoujianlong 根据定标结果通知书的弹出窗口改造初始版本,增加备注
@ -23,7 +23,7 @@ const PdfModal: React.FC<PdfModalProps> = (props) => {
useEffect(() => {
//判断文件是否存在
checkFileExist(fileId).then((res) => {
getFileListByBid(fileId).then((res) => {
if (res !== undefined && res.length > 0) {
setFileExist('1');
} else {
@ -48,12 +48,6 @@ const PdfModal: React.FC<PdfModalProps> = (props) => {
setPage(page + 1);
};
//下载链接
const downLoadFile = (fileId: string) => {
const returnUrl = '/api/core-service-ebtp-updownload/v1/attachment/download/bid/' + fileId;
return returnUrl;
};
const modalHeight = (window.innerHeight * 96) / 100;
return (
@ -84,7 +78,7 @@ const PdfModal: React.FC<PdfModalProps> = (props) => {
<FileDown
key="downLoadFile"
type="pdf"
apiUrl={downLoadFile(fileId)}
objectId={fileId}
style={{ float: 'left' }}
fileName={downLoadFileName}
btnName="下载"
@ -102,7 +96,7 @@ const PdfModal: React.FC<PdfModalProps> = (props) => {
) : fileExist == '1' ? (
<>
<PDF
file={downLoadFile(fileId)}
file={getDownloadFileUrl(fileId)}
scale={1.6}
onDocumentComplete={onDocumentComplete}
page={page}

View File

@ -1,8 +0,0 @@
import request from "@/utils/request";
//检验文档中心是否存在该文档
export async function checkFileExist(fileId?:any) {
return request('/api/core-service-ebtp-updownload/v1/attachment/find/bid/'+fileId,{
method:'GET' ,
})
}