更新版本库
This commit is contained in:
BIN
src/pages/Evaluation/BiddingDocumentsDecrypt/components/1.pdf
Normal file
BIN
src/pages/Evaluation/BiddingDocumentsDecrypt/components/1.pdf
Normal file
Binary file not shown.
@ -1,14 +1,27 @@
|
||||
import React, {useEffect, useState} from "react";
|
||||
import {Button, Col, List, message, Row, Tree} from "antd";
|
||||
import {Button, Card, Col, List, message, Modal, Pagination, Row, Spin, Tree} from "antd";
|
||||
import PDF from 'react-pdf-js'
|
||||
import {getFieleTree, getFileNode} from '../service'
|
||||
import {TreeNode} from "antd/es/tree-select";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import {DownloadOutlined} from "@ant-design/icons/lib";
|
||||
|
||||
|
||||
const viewOfTenderDocuments: React.FC<{}> = () => {
|
||||
const [treeData, setTreeData] = useState<any>();
|
||||
const [zipListTable, setZipListTable] = useState<any>();
|
||||
const [displayBox, setDisplayBox] = useState<any>();
|
||||
/*数据结构相关*/
|
||||
const [structureColumns, setStructureColumns] = useState<any>();
|
||||
const [structureData, setStructureData] = useState<any>();
|
||||
const [structureColumnsMore, setStructureColumnsMore] = useState<any>();
|
||||
const [structureDataMore, setStructureDataMore] = useState<any>();
|
||||
/*数据结相关*/
|
||||
const [spinning, setSpinning] = useState<any>();
|
||||
|
||||
/*pdf*/
|
||||
const [pdfPath,setPDFPath] =useState<any>("/1.pdf");
|
||||
const [pdfPage, setPDFPage] = useState<any>();
|
||||
const [pdfPageSum, setPDFPageSum] = useState<any>();
|
||||
|
||||
|
||||
/*获取参数*/
|
||||
@ -17,12 +30,10 @@ const viewOfTenderDocuments: React.FC<{}> = () => {
|
||||
let r = window.location.search.substr(1).match(reg);
|
||||
return r !== null ? unescape(r[2]) : null;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
let tdocid = getQueryString("tdocid");
|
||||
getFieleTree(tdocid).then((res) => {
|
||||
if(res!=null&&res.message=="success"){
|
||||
console.log(res);
|
||||
if (res != null && res.message == "success") {
|
||||
let data: any = [];
|
||||
if (res.data != undefined) {
|
||||
res.data.map((item: any, index: any) => {
|
||||
@ -54,40 +65,122 @@ const viewOfTenderDocuments: React.FC<{}> = () => {
|
||||
data.push(first);
|
||||
});
|
||||
}
|
||||
console.log(data);
|
||||
setTreeData(data);
|
||||
}else{
|
||||
message.warn(res.message)
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
const onSelect = (selectedKeys, info) => {
|
||||
console.log('info.node.structureType', info.node.structureType);
|
||||
console.log('onCheck', selectedKeys, info);
|
||||
|
||||
let tendererId = getQueryString("tendererId");//供应商id
|
||||
|
||||
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId}).then(res => {
|
||||
if(res!=null&&res.message=="success"){
|
||||
console.log(res);
|
||||
setZipListTable(res.data.tfileContentList);
|
||||
}
|
||||
})
|
||||
let tdocid = getQueryString("tdocid");
|
||||
if (info.node.structureType == 0) {//pdf
|
||||
// res.
|
||||
setSpinning(true);
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid}).then(res => {
|
||||
if (res != null && res.message == "success") {
|
||||
setPDFPath("/api/core-service-ebtp-updownload/v1/hulk/download?p="+res.data.tfileContentList[0].content);
|
||||
} else {
|
||||
message.warn(res.message)
|
||||
}
|
||||
setSpinning(false);
|
||||
})
|
||||
setDisplayBox("pdf")
|
||||
} else if (info.node.structureType == 1) { //zip
|
||||
setSpinning(true);
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid}).then(res => {
|
||||
if (res != null && res.message == "success") {
|
||||
setZipListTable(res.data.tfileContentList);
|
||||
} else {
|
||||
message.warn(res.message)
|
||||
}
|
||||
setSpinning(false);
|
||||
})
|
||||
setDisplayBox("zip")
|
||||
|
||||
|
||||
} else if (info.node.structureType == 2) { //数据结构
|
||||
setSpinning(true);
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid}).then(res => {
|
||||
setDisplayBox("structure");
|
||||
if (res != null && res.message == "success") {
|
||||
|
||||
/*整理 报价 */
|
||||
/*columns*/
|
||||
let priceTitle = res.data.priceTitle;
|
||||
let columns = []
|
||||
for (const itm of priceTitle) {
|
||||
let column = {
|
||||
title: itm.name,
|
||||
dataIndex: itm.id,
|
||||
valueType: 'text'
|
||||
};
|
||||
columns.push(column);
|
||||
}
|
||||
/*data*/
|
||||
let priceData = res.data.priceData;
|
||||
let dataSource = [];
|
||||
for (let keys in priceData) {
|
||||
let more = priceData[keys];
|
||||
let data = {
|
||||
[keys]: more.evaluatingContent
|
||||
};
|
||||
dataSource.push(data)
|
||||
}
|
||||
/*整理详细表格*/
|
||||
/*columns*/
|
||||
let itemPriceTitle = res.data.itemPriceTitle;
|
||||
let columnsMore = []
|
||||
for (const itm of itemPriceTitle) {
|
||||
let column = {
|
||||
title: itm.name,
|
||||
dataIndex: itm.id,
|
||||
valueType: 'text'
|
||||
};
|
||||
columnsMore.push(column);
|
||||
}
|
||||
/*data*/
|
||||
let itemPriceData = res.data.itemPriceData;
|
||||
let dataSourceMore = [];
|
||||
for (let keys in itemPriceData) {
|
||||
let more = itemPriceData[keys];
|
||||
let columData = {}
|
||||
for (let keys1 in more) {
|
||||
let moreMsg = more[keys1];
|
||||
|
||||
// let data={
|
||||
// [keys1]: moreMsg.evaluatingContent,
|
||||
// };
|
||||
/* columData.push(data)*/
|
||||
columData[keys1] = moreMsg.evaluatingContent;
|
||||
}
|
||||
dataSourceMore.push(columData)
|
||||
}
|
||||
|
||||
/**/
|
||||
setStructureDataMore(dataSourceMore);
|
||||
setStructureColumnsMore(columnsMore);
|
||||
setStructureColumns(columns);
|
||||
setStructureData(dataSource);
|
||||
} else {
|
||||
message.warn(res.message)
|
||||
}
|
||||
setSpinning(false);
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* message.error('程序出错,亲您稍后在世');*/
|
||||
/* message.error('程序出错,亲您稍后在世');*/
|
||||
};
|
||||
const downloadZip=(render:any)=>{
|
||||
message.warn('暂时下载不了,下载路径:'+render.content);
|
||||
const downloadZip = (render: any) => {
|
||||
let msg = render.content.split("/");
|
||||
let fileName = msg[msg.length-1];
|
||||
window.location.href = "/api/core-service-ebtp-updownload/v1/hulk/download?p="+render.content+"&n="+fileName;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@ -101,42 +194,88 @@ const viewOfTenderDocuments: React.FC<{}> = () => {
|
||||
treeData={treeData}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
|
||||
<Col span={18}>
|
||||
<ProTable
|
||||
style={{display:""}}
|
||||
search={false}
|
||||
options={false}
|
||||
columns={[
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
valueType: 'index',
|
||||
},
|
||||
{
|
||||
title: '供应商名称',
|
||||
dataIndex: 'tendererName',
|
||||
valueType: 'text'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
// valueType: 'option',
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
<Button type="primary" onClick={()=>downloadZip(record)} shape="round" icon={<DownloadOutlined/>}>下载</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
<Spin spinning={spinning}>
|
||||
<Card>
|
||||
{displayBox == "pdf" ? (
|
||||
<>
|
||||
<PDF
|
||||
file={pdfPath}
|
||||
onDocumentComplete={(numPages) => setPDFPageSum(numPages)}
|
||||
page={pdfPage}
|
||||
/>
|
||||
|
||||
}
|
||||
]}
|
||||
dataSource={zipListTable}
|
||||
// request={params => }
|
||||
// rowKey={"id"}
|
||||
/>
|
||||
<Pagination
|
||||
total={pdfPageSum}
|
||||
showSizeChanger={false}
|
||||
showQuickJumper
|
||||
showTotal={(total) => "共计:" + total+ " 页"}
|
||||
onChange={(page)=>setPDFPage(page)}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
{displayBox == "zip" ?
|
||||
<ProTable
|
||||
bordered
|
||||
search={false}
|
||||
options={false}
|
||||
columns={[
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
valueType: 'index',
|
||||
},
|
||||
{
|
||||
title: '供应商名称',
|
||||
dataIndex: 'tendererName',
|
||||
valueType: 'text'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
// valueType: 'option',
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
<Button type="primary" onClick={() => downloadZip(record)} shape="round"
|
||||
icon={<DownloadOutlined/>}>下载</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
]}
|
||||
dataSource={zipListTable}
|
||||
// request={params => }
|
||||
rowKey={"id"}
|
||||
/>
|
||||
: null}
|
||||
{displayBox == "structure" ?
|
||||
<>
|
||||
<ProTable
|
||||
search={false}
|
||||
options={false}
|
||||
columns={structureColumns}
|
||||
dataSource={structureData}
|
||||
rowKey={() => Math.random()}
|
||||
/>
|
||||
{(structureDataMore != null && structureDataMore != "") ?
|
||||
<ProTable
|
||||
search={false}
|
||||
options={false}
|
||||
columns={structureColumnsMore}
|
||||
dataSource={structureDataMore}
|
||||
rowKey={() => Math.random()}
|
||||
/>
|
||||
: null}
|
||||
</>
|
||||
|
||||
: null}
|
||||
</Card>
|
||||
</Spin>
|
||||
</Col>
|
||||
|
||||
</Row>
|
||||
|
||||
|
||||
|
@ -0,0 +1,305 @@
|
||||
import React, {useEffect, useState} from "react";
|
||||
import {Button, Card, Col, List, message, Modal, Pagination, Row, Spin, Tree} from "antd";
|
||||
import PDF from 'react-pdf-js'
|
||||
import {getDataList, getFieleTree, getFieleTree4List, getFileNode} from '../service'
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import {DownloadOutlined} from "@ant-design/icons/lib";
|
||||
|
||||
|
||||
const viewOfTenderDocumentsSecond: React.FC<{}> = () => {
|
||||
const [treeData, setTreeData] = useState<any>();
|
||||
const [zipListTable, setZipListTable] = useState<any>();
|
||||
const [displayBox, setDisplayBox] = useState<any>();
|
||||
/*数据结构相关*/
|
||||
const [structureColumns, setStructureColumns] = useState<any>();
|
||||
const [structureData, setStructureData] = useState<any>();
|
||||
const [structureColumnsMore, setStructureColumnsMore] = useState<any>();
|
||||
const [structureDataMore, setStructureDataMore] = useState<any>();
|
||||
/*数据结相关*/
|
||||
const [spinning, setSpinning] = useState<any>();
|
||||
|
||||
/*pdf*/
|
||||
const [pdfPath,setPDFPath] =useState<any>("/1.pdf");
|
||||
const [pdfPage, setPDFPage] = useState<any>();
|
||||
const [pdfPageSum, setPDFPageSum] = useState<any>();
|
||||
|
||||
|
||||
/*获取参数*/
|
||||
const getQueryString = (name: any) => {
|
||||
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
let r = window.location.search.substr(1).match(reg);
|
||||
return r !== null ? unescape(r[2]) : null;
|
||||
}
|
||||
useEffect(() => {
|
||||
let tdocid = getQueryString("id");
|
||||
getDataList(tdocid).then(res=>{
|
||||
let ar=[];
|
||||
for(const entity of res.data){
|
||||
ar.push(entity.documentId)
|
||||
}
|
||||
let msg = unique(ar);
|
||||
if (res != null && res.message == "success") {
|
||||
getFieleTree4List(msg).then(res=>{
|
||||
if (res != null && res.message == "success") {
|
||||
let data: any = [];
|
||||
if (res.data != undefined) {
|
||||
res.data.map((item: any, index: any) => {
|
||||
const title1 = item.name;
|
||||
const key1 = item.id;
|
||||
const structureType1 = item.structureType;
|
||||
|
||||
let children1: any = [];
|
||||
if (item.children != undefined) {
|
||||
const children = item.children.map((item: any, index: any) => {
|
||||
const title2 = item.name;
|
||||
const structureType2 = item.structureType;
|
||||
const key2 = item.id;
|
||||
let children2: any = [];
|
||||
if (item.children != undefined) {
|
||||
const children = item.children.map((item: any, index: any) => {
|
||||
const title3 = item.name;
|
||||
const structureType3 = item.structureType;
|
||||
const key3 = item.id;
|
||||
return {title: title3, key: key3, structureType: structureType3}
|
||||
});
|
||||
children2 = children;
|
||||
}
|
||||
return {title: title2, key: key2, children: children2, structureType: structureType2}
|
||||
});
|
||||
children1 = children;
|
||||
}
|
||||
const first = {title: title1, key: key1, children: children1, structureType: structureType1}
|
||||
data.push(first);
|
||||
});
|
||||
}
|
||||
setTreeData(data);
|
||||
}else{
|
||||
message.error(res.message)
|
||||
}
|
||||
})
|
||||
} else{
|
||||
message.error(res.message)
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
const unique =( arr )=>{
|
||||
arr = arr.sort();
|
||||
var arr1 = [arr[0]];
|
||||
for(var i=1,len=arr.length;i<len;i++){
|
||||
if(arr[i] !== arr[i-1]){
|
||||
arr1.push(arr[i]);
|
||||
}
|
||||
}
|
||||
return arr1;
|
||||
}
|
||||
|
||||
const onSelect = (selectedKeys, info) => {
|
||||
|
||||
let tendererId = getQueryString("supplierId");//供应商id
|
||||
let tdocid = getQueryString("id");
|
||||
if (info.node.structureType == 0) {//pdf
|
||||
setSpinning(true);
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid}).then(res => {
|
||||
if (res != null && res.message == "success") {
|
||||
setPDFPath("/api/core-service-ebtp-updownload/v1/hulk/download?p="+res.data.tfileContentList[0].content);
|
||||
} else {
|
||||
message.warn(res.message)
|
||||
}
|
||||
setSpinning(false);
|
||||
})
|
||||
} else if (info.node.structureType == 1) { //zip
|
||||
setSpinning(true);
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid}).then(res => {
|
||||
if (res != null && res.message == "success") {
|
||||
setZipListTable(res.data.tfileContentList);
|
||||
} else {
|
||||
message.warn(res.message)
|
||||
}
|
||||
setSpinning(false);
|
||||
})
|
||||
setDisplayBox("zip")
|
||||
|
||||
|
||||
} else if (info.node.structureType == 2) { //数据结构
|
||||
setSpinning(true);
|
||||
getFileNode({tdocCatalogId: info.node.key, tendererId: tendererId, tdocId: tdocid}).then(res => {
|
||||
setDisplayBox("structure");
|
||||
if (res != null && res.message == "success") {
|
||||
|
||||
/*整理 报价 */
|
||||
/*columns*/
|
||||
let priceTitle = res.data.priceTitle;
|
||||
let columns = []
|
||||
for (const itm of priceTitle) {
|
||||
let column = {
|
||||
title: itm.name,
|
||||
dataIndex: itm.id,
|
||||
valueType: 'text'
|
||||
};
|
||||
columns.push(column);
|
||||
}
|
||||
/*data*/
|
||||
let priceData = res.data.priceData;
|
||||
let dataSource = [];
|
||||
for (let keys in priceData) {
|
||||
let more = priceData[keys];
|
||||
let data = {
|
||||
[keys]: more.evaluatingContent
|
||||
};
|
||||
dataSource.push(data)
|
||||
}
|
||||
/*整理详细表格*/
|
||||
/*columns*/
|
||||
let itemPriceTitle = res.data.itemPriceTitle;
|
||||
let columnsMore = []
|
||||
for (const itm of itemPriceTitle) {
|
||||
let column = {
|
||||
title: itm.name,
|
||||
dataIndex: itm.id,
|
||||
valueType: 'text'
|
||||
};
|
||||
columnsMore.push(column);
|
||||
}
|
||||
/*data*/
|
||||
let itemPriceData = res.data.itemPriceData;
|
||||
let dataSourceMore = [];
|
||||
for (let keys in itemPriceData) {
|
||||
let more = itemPriceData[keys];
|
||||
let columData = {}
|
||||
for (let keys1 in more) {
|
||||
let moreMsg = more[keys1];
|
||||
|
||||
// let data={
|
||||
// [keys1]: moreMsg.evaluatingContent,
|
||||
// };
|
||||
/* columData.push(data)*/
|
||||
columData[keys1] = moreMsg.evaluatingContent;
|
||||
}
|
||||
dataSourceMore.push(columData)
|
||||
}
|
||||
|
||||
/**/
|
||||
setStructureDataMore(dataSourceMore);
|
||||
setStructureColumnsMore(columnsMore);
|
||||
setStructureColumns(columns);
|
||||
setStructureData(dataSource);
|
||||
} else {
|
||||
message.warn(res.message)
|
||||
}
|
||||
setSpinning(false);
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* message.error('程序出错,亲您稍后在世');*/
|
||||
};
|
||||
const downloadZip = (render: any) => {
|
||||
let msg = render.content.split("/");
|
||||
let fileName = msg[msg.length-1];
|
||||
window.location.href = "/api/core-service-ebtp-updownload/v1/hulk/download?p="+render.content+"&n="+fileName;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<Row>
|
||||
<Col span={6}>
|
||||
<Tree
|
||||
/* defaultExpandedKeys={['0-0-0', '0-0-1']}
|
||||
defaultSelectedKeys={['0-0-0', '0-0-1']}
|
||||
defaultCheckedKeys={['0-0-0', '0-0-1']}*/
|
||||
onSelect={onSelect}
|
||||
treeData={treeData}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
|
||||
<Col span={18}>
|
||||
<Spin spinning={spinning}>
|
||||
<Card>
|
||||
{displayBox == "pdf" ? (
|
||||
<>
|
||||
<PDF
|
||||
file={pdfPath}
|
||||
onDocumentComplete={(numPages) => setPDFPageSum(numPages)}
|
||||
page={pdfPage}
|
||||
/>
|
||||
|
||||
<Pagination
|
||||
total={pdfPageSum}
|
||||
showSizeChanger={false}
|
||||
showQuickJumper
|
||||
showTotal={(total) => "共计:" + total+ " 页"}
|
||||
onChange={(page)=>setPDFPage(page)}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
{displayBox == "zip" ?
|
||||
<ProTable
|
||||
bordered
|
||||
search={false}
|
||||
options={false}
|
||||
columns={[
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
valueType: 'index',
|
||||
},
|
||||
{
|
||||
title: '供应商名称',
|
||||
dataIndex: 'tendererName',
|
||||
valueType: 'text'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
// valueType: 'option',
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
<Button type="primary" onClick={() => downloadZip(record)} shape="round"
|
||||
icon={<DownloadOutlined/>}>下载</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
]}
|
||||
dataSource={zipListTable}
|
||||
// request={params => }
|
||||
rowKey={"id"}
|
||||
/>
|
||||
: null}
|
||||
{displayBox == "structure" ?
|
||||
<>
|
||||
<ProTable
|
||||
search={false}
|
||||
options={false}
|
||||
columns={structureColumns}
|
||||
dataSource={structureData}
|
||||
rowKey={() => Math.random()}
|
||||
/>
|
||||
{(structureDataMore != null && structureDataMore != "") ?
|
||||
<ProTable
|
||||
search={false}
|
||||
options={false}
|
||||
columns={structureColumnsMore}
|
||||
dataSource={structureDataMore}
|
||||
rowKey={() => Math.random()}
|
||||
/>
|
||||
: null}
|
||||
</>
|
||||
|
||||
: null}
|
||||
</Card>
|
||||
</Spin>
|
||||
</Col>
|
||||
|
||||
</Row>
|
||||
|
||||
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default viewOfTenderDocumentsSecond
|
@ -1,13 +1,14 @@
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {Button, Card, Divider, List, message, Modal, Progress} from "antd";
|
||||
import style from "@/pages/BiddingAnnouncement/components/style.less";
|
||||
import style from "@/pages/Bid/BiddingAnnouncement/components/style.less";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import {DownloadOutlined, UnorderedListOutlined} from "@ant-design/icons/lib";
|
||||
import {getBiddingDocumentsDecryptList, DownFile, decryptFile} from "./service"
|
||||
import './index.less';
|
||||
import {getBiddingDocumentsDecryptList, DownFile, decryptFile, decryptFileType} from "./service"
|
||||
import {getRoomId, getSessionUserData} from "@/utils/session";
|
||||
import request from "umi-request";
|
||||
|
||||
interface BiddingDocumentsDecryptProps {
|
||||
assessRoomId: "1331563848498413568";
|
||||
|
||||
}
|
||||
|
||||
const BiddingDocumentsDecrypt: React.FC<BiddingDocumentsDecryptProps> = (props) => {
|
||||
@ -24,43 +25,47 @@ const BiddingDocumentsDecrypt: React.FC<BiddingDocumentsDecryptProps> = (props)
|
||||
|
||||
|
||||
|
||||
|
||||
const [ListData, setListData] = useState<any>();
|
||||
useEffect(() => {
|
||||
getBiddingDocumentsDecryptList("1331563848498413568").then(res => {
|
||||
if (res.message != null && res.message == "success") {
|
||||
setListData(res.data)
|
||||
}
|
||||
let roomId= getRoomId();
|
||||
// roomId="1331563848498413568";
|
||||
if(roomId!=""&&roomId!=undefined){
|
||||
getBiddingDocumentsDecryptList(roomId).then(res => {
|
||||
if (res.message != null && res.message == "success") {
|
||||
setListData(res.data)
|
||||
}else{
|
||||
message.warn("未获取到列表信息,请您稍后再试!");
|
||||
}
|
||||
})
|
||||
}else{
|
||||
message.warn("为获取到评审室id,请您稍后再试!");
|
||||
}
|
||||
|
||||
})
|
||||
}, [props.assessRoomId])
|
||||
}, [])
|
||||
|
||||
/*查看*/
|
||||
const OpenWindow = (record: any, docid: any) => {
|
||||
// window.open(`/room/index?aa=${record.assessRoomId}&bb=${record.turnSort}`)
|
||||
window.open("/viewOfTenderDocuments?tdocid=" + docid + "&tendererId=" + record.id);
|
||||
}
|
||||
|
||||
/*下载*/
|
||||
const download = (record: any, docid: any) => {
|
||||
message.warn('暂时下载不了');
|
||||
/* DownFile({tdocId: docid, tendererName: record.companyName}).then(res => {
|
||||
|
||||
})*/
|
||||
const download = (filePath: any,filename:any,record: any) => {
|
||||
window.location.href = "/api/core-service-ebtp-updownload/v1/hulk/download?p="+filePath +"/"+record.companyName +"&n="+filename+"---"+record.companyName;
|
||||
}
|
||||
const downloadPak = (docid: any) => {
|
||||
message.warn('暂时下载不了');
|
||||
/* DownFile({tdocId: docid}).then(res => {
|
||||
|
||||
})*/
|
||||
const downloadPak = (filePath: any,filename:any) => {
|
||||
window.location.href = "/api/core-service-ebtp-updownload/v1/hulk/download?p="+filePath +"&n="+filename;
|
||||
}
|
||||
/*解密*/
|
||||
const decrypt =(record:any)=>{
|
||||
handleRateVis(true);
|
||||
/*发起解密*/
|
||||
decryptFile({turnId:record}).then(res=>{
|
||||
|
||||
})
|
||||
/*查看解密进度*/
|
||||
decryptFileType({turnId:record}).then(res=>{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
/*===========================*/
|
||||
@ -79,8 +84,8 @@ const BiddingDocumentsDecrypt: React.FC<BiddingDocumentsDecryptProps> = (props)
|
||||
<ProTable
|
||||
loading={pageloading}
|
||||
toolBarRender={() => [
|
||||
<Button onClick={() => decrypt(item.id)}> 解密</Button>,,
|
||||
<Button onClick={() => downloadPak(item.id)}> 打包下载</Button>,
|
||||
getSessionUserData().roleIds=="daili"?<Button onClick={() => decrypt(item.id)}>解密</Button>:null,
|
||||
<Button onClick={() => downloadPak(item.filepath,item.filename)}> 打包下载</Button>,
|
||||
// <Button> 下载说明</Button>,
|
||||
]}
|
||||
search={false}
|
||||
@ -102,7 +107,7 @@ const BiddingDocumentsDecrypt: React.FC<BiddingDocumentsDecryptProps> = (props)
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
<Button type="primary" onClick={() => download(record, item.id)} shape="round"
|
||||
<Button type="primary" onClick={() => download(item.filepath,item.filename,record)} shape="round"
|
||||
icon={<DownloadOutlined/>}>下载</Button>
|
||||
<Button type="primary" onClick={() => OpenWindow(record, item.id)} shape="round"
|
||||
icon={<DownloadOutlined/>}>查看</Button>
|
||||
|
@ -1,12 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import ex from "umi/dist";
|
||||
|
||||
|
||||
// import {demo} from './data.d';
|
||||
|
||||
/*展示列表相关 后端---刘昊*/
|
||||
export async function getBiddingDocumentsDecryptList(params: any) {
|
||||
return request('/api/biz-service-ebtp-tender/v1/supplier_register/select_supplier_by_roomid_and_turnsort?assessRoomId=' + params, {method: 'get'})
|
||||
}
|
||||
|
||||
/*树状节点相关 后端---闫珊珊*/
|
||||
export async function getFieleTree(param: any) {
|
||||
return request('/api/biz-service-ebtp-resps/v1/tdoccatalog/treelistByUser',
|
||||
{
|
||||
@ -15,6 +16,7 @@ export async function getFieleTree(param: any) {
|
||||
}
|
||||
)
|
||||
}
|
||||
/*树状节点相关 后端---闫珊珊*/
|
||||
export async function getFileNode(params: any){
|
||||
return request('/api/biz-service-ebtp-resps/v1/tfile/getCatalogContentById',
|
||||
{
|
||||
@ -23,6 +25,7 @@ export async function getFileNode(params: any){
|
||||
}
|
||||
);
|
||||
}
|
||||
/*文件下载相关 后端---闫珊珊*/
|
||||
export async function DownFile(params: any){
|
||||
return request('/api/biz-service-ebtp-resps/v1/tfile/downloadTfileBy',
|
||||
{
|
||||
@ -31,6 +34,7 @@ export async function DownFile(params: any){
|
||||
}
|
||||
);
|
||||
}
|
||||
/*解密相关 后端---闫珊珊*/
|
||||
export async function decryptFile(params: any) {
|
||||
return request('/api/biz-service-ebtp-resps/v1/tfile/executeDecrypt',
|
||||
{
|
||||
@ -39,6 +43,31 @@ export async function decryptFile(params: any) {
|
||||
}
|
||||
);
|
||||
}
|
||||
/*解密相关 后端---闫珊珊*/
|
||||
export async function decryptFileType(params: any){
|
||||
/**/
|
||||
/*/v1/tfile/getDecryptProgress*/
|
||||
return request('/api/biz-service-ebtp-resps/v1/tfile/getDecryptProgress',
|
||||
{
|
||||
method: 'post',
|
||||
data: {...params}
|
||||
})
|
||||
}
|
||||
/*获取 数组对象 后端---楚航*/
|
||||
export async function getDataList(params: any){
|
||||
/*/v1/tfile/getDecryptProgress*/
|
||||
return request('/api/biz-service-ebtp-rsms/v1/review/config/detail/doc/list?detailId='+params,
|
||||
{
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
/*根据数组对象获取树状节点 后端---闫珊珊*/
|
||||
export async function getFieleTree4List(params: any){
|
||||
/*/v1/tfile/getDecryptProgress*/
|
||||
return request('/api/biz-service-ebtp-resps/v1/tdoccatalog/treelistForRsms',
|
||||
{
|
||||
method: 'post',
|
||||
data:{
|
||||
"catalogIdList":params
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user