4.1 同步发版内容到天梯
This commit is contained in:
@ -3,8 +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 '@/utils/DownloadUtils';
|
||||
|
||||
interface PreviewJgtzsModalProps {
|
||||
fileId: string,
|
||||
@ -20,7 +19,7 @@ const PreviewJgtzsModal: React.FC<PreviewJgtzsModalProps> = (props) => {
|
||||
const [fileExist, setFileExist] = useState<string>("0");//0:未验证,1:验证后有,2:验证后没有
|
||||
|
||||
useEffect(() => {
|
||||
checkFileExist(fileId).then(res => {
|
||||
getFileListByBid(fileId).then(res => {
|
||||
if (res !== undefined && res.length > 0) {
|
||||
setFileExist("1");
|
||||
} else {
|
||||
@ -40,10 +39,7 @@ const PreviewJgtzsModal: React.FC<PreviewJgtzsModalProps> = (props) => {
|
||||
const handleNext = () => {
|
||||
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 (
|
||||
@ -66,7 +62,7 @@ const PreviewJgtzsModal: React.FC<PreviewJgtzsModalProps> = (props) => {
|
||||
<FileDown
|
||||
key="downLoadFile"
|
||||
type="pdf"
|
||||
apiUrl={downLoadFile(fileId)}
|
||||
objectId={fileId}
|
||||
style={{ "float": "left" }}
|
||||
fileName={downLoadFileName}
|
||||
btnName="下载"
|
||||
@ -88,7 +84,7 @@ const PreviewJgtzsModal: React.FC<PreviewJgtzsModalProps> = (props) => {
|
||||
) : fileExist == "1" ? (
|
||||
<>
|
||||
<PDF
|
||||
file={downLoadFile(fileId)}
|
||||
file={getDownloadFileUrl(fileId)}
|
||||
scale={1.6}
|
||||
onDocumentComplete={onDocumentComplete}
|
||||
page={page}
|
||||
|
@ -20,13 +20,6 @@ export async function getSubPayServiceFeeList(params:any) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//检验文档中心是否存在该文档
|
||||
export async function checkFileExist(fileId?:any) {
|
||||
return request('/api/core-service-ebtp-updownload/v1/attachment/find/bid/'+fileId,{
|
||||
method:'GET' ,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 缴纳中标服务费
|
||||
* @param id
|
||||
|
Reference in New Issue
Block a user