4.1 同步发版内容到天梯
This commit is contained in:
@ -20,6 +20,7 @@ import { getEditStatus, selectAnnoById, selectDocumentsById } from './service';
|
||||
import '@/utils/lq.style.less';
|
||||
import moment from "moment";
|
||||
import ApprovalAttachment from '../ApprovalAttachment/ApprovalAttachment';
|
||||
import { downloadFileObjectId } from '@/utils/DownloadUtils';
|
||||
const { Panel } = Collapse;
|
||||
|
||||
/**
|
||||
@ -95,29 +96,6 @@ const ProcurementRequirementsArePublicized: React.FC = () => {
|
||||
window.parent.postMessage("{'height':" + document.documentElement.scrollHeight + "}", '*');
|
||||
}, []);
|
||||
|
||||
//weboffice变更文件名称下载方法
|
||||
const getFileList = (bid: any, fileName: any) => {
|
||||
window.fetch(`/api/core-service-ebtp-updownload/v1/attachment/download/bid/${bid}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
// JwtToken: getSessionUserData() == null ? null : getSessionUserData().userId,
|
||||
Authorization: getUserToken(),
|
||||
currentRoleCode: getSessionRoleData()?.roleCode,
|
||||
},
|
||||
credentials: 'include',
|
||||
}).then((response) => {
|
||||
// 这里才是下载附件逻辑处理的地方
|
||||
response.blob().then(blob => {
|
||||
const blobUrl = window.URL.createObjectURL(blob);
|
||||
const aElement = document.createElement("a");
|
||||
aElement.href = blobUrl; // 设置a标签路径
|
||||
aElement.download = fileName;
|
||||
aElement.click();
|
||||
window.URL.revokeObjectURL(blobUrl);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<Card bordered={false} bodyStyle={{ padding: '0 200px', borderRadius: 6 }}>
|
||||
<h2 style={{ textAlign: 'center', marginTop: 10 }}>公告审批单</h2>
|
||||
@ -222,7 +200,7 @@ const ProcurementRequirementsArePublicized: React.FC = () => {
|
||||
label="正文"
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
<a style={{ color: "#b30000" }} key="zhengwen" onClick={() => getFileList(item?.contentFileId, `${item?.documentName}(正文).doc`)}>{item?.documentName}(正文).doc</a>
|
||||
<a style={{ color: "#b30000" }} key="zhengwen" onClick={() => downloadFileObjectId(item?.contentFileId)}>{item?.documentName}(正文).doc</a>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
})}
|
||||
|
Reference in New Issue
Block a user