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

@ -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>
})}