4.1 同步发版内容到天梯
This commit is contained in:
@ -12,9 +12,10 @@ import React, { useEffect, useState } from 'react';
|
||||
import BasicInformation from '../BasicInformation/BasicInformation';
|
||||
import { selectDefaultNameByBidMethodDict, selectNameByBidMethodDict } from '../utils';
|
||||
import { selectAnnoById, selectDocumentsById } from '../Announcement/service';
|
||||
import '@/utils/lq.style.less';
|
||||
import '@/utils/lq.style.less';
|
||||
import { getSessionRoleData, getUserToken } from '@/utils/session';
|
||||
import moment from "moment";
|
||||
import { downloadFileObjectId } from '@/utils/DownloadUtils';
|
||||
const { Panel } = Collapse;
|
||||
|
||||
/**
|
||||
@ -47,7 +48,7 @@ const ProcurementRequirementsArePublicized: React.FC = () => {
|
||||
if (res.code === 200) {
|
||||
let data = res?.data;
|
||||
selectDocumentsById(annoId).then(response => {
|
||||
if(res?.code == 200) {
|
||||
if (res?.code == 200) {
|
||||
setListDisplayInfo({
|
||||
annoTitle: data?.annoTitle,
|
||||
docStartTime: moment(data?.docStartTime).format('YYYY-MM-DD HH:mm'),
|
||||
@ -65,42 +66,19 @@ const ProcurementRequirementsArePublicized: React.FC = () => {
|
||||
setProcessInstanceId(data?.approvalInstanceId);
|
||||
}
|
||||
});
|
||||
window.parent.postMessage("{'height':"+document.documentElement.scrollHeight+"}",'*' );
|
||||
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>
|
||||
<Collapse defaultActiveKey={['1','2','3']} style={{ marginTop: 30 }}>
|
||||
<Collapse defaultActiveKey={['1', '2', '3']} style={{ marginTop: 30 }}>
|
||||
<Panel header="基本信息" key="1">
|
||||
<BasicInformation processInstanceId={processInstanceId} />
|
||||
</Panel>
|
||||
<Panel header="邀请函信息" key="2">
|
||||
<Descriptions bordered column={1}>
|
||||
<Descriptions.Item label="邀请函名称" labelStyle={{ textAlign: 'center',width: '40%' }}>
|
||||
<Descriptions.Item label="邀请函名称" labelStyle={{ textAlign: 'center', width: '40%' }}>
|
||||
{listDisplayInfo.annoTitle}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
@ -145,37 +123,37 @@ const ProcurementRequirementsArePublicized: React.FC = () => {
|
||||
<p className="table-border" dangerouslySetInnerHTML={{ __html: contentWithStyle }}></p>
|
||||
</Panel>
|
||||
<Panel header="文件信息" key="3">
|
||||
{listDisplayInfo.documentsList.map((item: any,index: any) => {
|
||||
return <Descriptions bordered column={1} key={index} style={{marginBottom: 8}}>
|
||||
<Descriptions.Item
|
||||
label={processName.name1 + '文件名称'}
|
||||
labelStyle={{ textAlign: 'center' ,width: '40%' }}
|
||||
>
|
||||
{item?.documentName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
label={'关联' + processName.name4}
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
{item?.sections?.map((e: any) => e.bsName).join(",")}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
label="附件"
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
<ExtendUpload
|
||||
bid={item?.documentSetId}
|
||||
btnName="附件"
|
||||
uploadProps={{ disabled: true }}
|
||||
/>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
label="正文"
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
<a style={{color:"#b30000"}} key="zhengwen" onClick={() => getFileList(item?.contentFileId,`${item?.documentName}(正文).doc`)}>{item?.documentName}(正文).doc</a>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
{listDisplayInfo.documentsList.map((item: any, index: any) => {
|
||||
return <Descriptions bordered column={1} key={index} style={{ marginBottom: 8 }}>
|
||||
<Descriptions.Item
|
||||
label={processName.name1 + '文件名称'}
|
||||
labelStyle={{ textAlign: 'center', width: '40%' }}
|
||||
>
|
||||
{item?.documentName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
label={'关联' + processName.name4}
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
{item?.sections?.map((e: any) => e.bsName).join(",")}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
label="附件"
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
<ExtendUpload
|
||||
bid={item?.documentSetId}
|
||||
btnName="附件"
|
||||
uploadProps={{ disabled: true }}
|
||||
/>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item
|
||||
label="正文"
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
<a style={{ color: "#b30000" }} key="zhengwen" onClick={() => downloadFileObjectId(item?.contentFileId)}>{item?.documentName}(正文).doc</a>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
})}
|
||||
</Panel>
|
||||
</Collapse>
|
||||
|
Reference in New Issue
Block a user