4.1 同步发版内容到天梯
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Card, Collapse, Descriptions } from 'antd';
|
||||
import { getFileListByBid, getViewData } from './service';
|
||||
import { getUserToken } from '@/utils/session';
|
||||
import { getViewData } from './service';
|
||||
import { getURLInformation } from '@/utils/CommonUtils';
|
||||
import BasicInformation from '../BasicInformation/BasicInformation';
|
||||
import moment from "moment";
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
|
||||
const ExternalReference: React.FC<{}> = (props) => {
|
||||
//显示的数据
|
||||
@ -17,45 +17,16 @@ const ExternalReference: React.FC<{}> = (props) => {
|
||||
evaluationStartTime: '',
|
||||
isAgreement: '',
|
||||
});
|
||||
//上传文件列表
|
||||
const [fileListData, setFileListData] = useState<any[]>([]);
|
||||
//说明文件fileId
|
||||
const [fileId, setFileId] = useState<string>('');
|
||||
//审批单id
|
||||
const [processInstanceId, setProcessInstanceId] = useState<string>('');
|
||||
//标段采购包包件
|
||||
const [sectionName, setSectionName] = useState<any>('采购包');
|
||||
//评审评标谈判
|
||||
const [sectionType, setSectionType] = useState<any>('评审');
|
||||
const token = getUserToken();
|
||||
const { Panel } = Collapse;
|
||||
|
||||
//根据bid获取到oid列表
|
||||
const getOidList = async (param: any) => {
|
||||
if (param == undefined || param == '' || param == null) {
|
||||
} else {
|
||||
let list: any[] = [];
|
||||
list.push(param);
|
||||
await getFileListByBid({ bidList: list }).then((res) => {
|
||||
let data = res[param];
|
||||
let list: any[] = [];
|
||||
if (data.length == 0) {
|
||||
setFileListData([]);
|
||||
} else {
|
||||
data.forEach((ele: any) => {
|
||||
list.push({
|
||||
uid: ele.id,
|
||||
name: ele.filename,
|
||||
status: 'done',
|
||||
oid: ele.id,
|
||||
businessId: ele.bid,
|
||||
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}?Authorization=${token}`,
|
||||
});
|
||||
});
|
||||
setFileListData(list);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const param = {
|
||||
// id: '1367283840111869952',
|
||||
@ -74,7 +45,7 @@ const ExternalReference: React.FC<{}> = (props) => {
|
||||
} else if (MethodDict == 'procurement_mode_4') {
|
||||
setSectionName('包件');
|
||||
}
|
||||
getOidList(data?.uploadFileId);
|
||||
setFileId(data?.uploadFileId)
|
||||
setProcessInstanceId(data?.instanceId);
|
||||
setDesData({
|
||||
projectName: data?.projectName,
|
||||
@ -87,7 +58,7 @@ const ExternalReference: React.FC<{}> = (props) => {
|
||||
});
|
||||
}
|
||||
});
|
||||
window.parent.postMessage("{'height':"+document.documentElement.scrollHeight+"}",'*' );
|
||||
window.parent.postMessage("{'height':" + document.documentElement.scrollHeight + "}", '*');
|
||||
}, []);
|
||||
return (
|
||||
<Card bordered={false} bodyStyle={{ padding: '0 200px', borderRadius: 6 }}>
|
||||
@ -144,15 +115,7 @@ const ExternalReference: React.FC<{}> = (props) => {
|
||||
label="说明文件"
|
||||
labelStyle={{ textAlign: 'center' }}
|
||||
>
|
||||
{fileListData.length == 0
|
||||
? '-'
|
||||
: fileListData.map((e) => (
|
||||
<a
|
||||
href={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${e.oid}?Authorization=${token}`}
|
||||
>
|
||||
{e.name}
|
||||
</a>
|
||||
))}
|
||||
<ExtendUpload bid={fileId} uploadProps={{ disabled: true }} />
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Panel>
|
||||
|
@ -1,15 +1,4 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 根据bid获取文件列表
|
||||
* @param params
|
||||
*/
|
||||
export async function getFileListByBid(params: any) {
|
||||
return request('/api/core-service-ebtp-updownload/v1/attachment/find', {
|
||||
method: 'POST',
|
||||
data: {...params}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看审批流程内嵌-查看重新评审查询
|
||||
|
Reference in New Issue
Block a user