12-23-上传master

This commit is contained in:
xingsy
2020-12-23 11:14:35 +08:00
parent 9769f83bc8
commit b42e0c1ddd
553 changed files with 56506 additions and 0 deletions

View File

@ -0,0 +1,149 @@
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 ProTable from "@ant-design/pro-table";
import {DownloadOutlined, UnorderedListOutlined} from "@ant-design/icons/lib";
import {getBiddingDocumentsDecryptList, DownFile, decryptFile} from "./service"
import './index.less';
interface BiddingDocumentsDecryptProps {
assessRoomId: "1331563848498413568";
}
const BiddingDocumentsDecrypt: React.FC<BiddingDocumentsDecryptProps> = (props) => {
// /*投标文件查看*/
const [pageloading, setPageloading] = useState<boolean>(false);
const [spin, spinSet] = useState<any>(false);
const [rateVis, handleRateVis] = useState<boolean>(false); //进度显隐
const [rateCount, rateCountSet] = useState<number>(0); //查询进度启动器
const [jmComplete, jmCompleteSet] = useState<number>(0);//已解密成功
const [jmFail, jmFailSet] = useState<number>(0);//解密失败
const [jmWait, jmWaitSet] = useState<number>(0);//未解密
const [jmFileCount, jmFileCountSet] = useState<number>(0);//文件总数
const [ListData, setListData] = useState<any>();
useEffect(() => {
getBiddingDocumentsDecryptList("1331563848498413568").then(res => {
if (res.message != null && res.message == "success") {
setListData(res.data)
}
})
}, [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 downloadPak = (docid: any) => {
message.warn('暂时下载不了');
/* DownFile({tdocId: docid}).then(res => {
})*/
}
/*解密*/
const decrypt =(record:any)=>{
handleRateVis(true);
decryptFile({turnId:record}).then(res=>{
})
}
/*===========================*/
/*===========================*/
return (
<Card>
<Divider style={{margin: "8px 0px"}}/>
<div className={style.label}>
<UnorderedListOutlined style={{marginRight: "8px"}}/>
</div>
<List
itemLayout="vertical"
dataSource={ListData}
renderItem={item => (
<List.Item>
<ProTable
loading={pageloading}
toolBarRender={() => [
<Button onClick={() => decrypt(item.id)}> </Button>,,
<Button onClick={() => downloadPak(item.id)}> </Button>,
// <Button> 下载说明</Button>,
]}
search={false}
options={false}
columns={[
{
title: '序号',
dataIndex: 'index',
valueType: 'index'
},
{
title: '供应商名称',
dataIndex: 'companyName',
valueType: 'text'
},
{
title: '操作',
// valueType: 'option',
render: (text: any, record: any) => {
return (
<>
<Button type="primary" onClick={() => download(record, item.id)} shape="round"
icon={<DownloadOutlined/>}></Button>
<Button type="primary" onClick={() => OpenWindow(record, item.id)} shape="round"
icon={<DownloadOutlined/>}></Button>
</>
);
}
}
]}
dataSource={item.registerInfoVOList}
// request={params => }
// rowKey={"id"}
/>
</List.Item>
)}
/>
<Modal
title="解密进度"
width={'800px'}
destroyOnClose
centered
bodyStyle={{ padding: '32px 40px 48px', overflowY: 'auto' }}
visible={rateVis}
footer={false}
onCancel={()=>handleRateVis(false)}
>
<Progress percent={(jmComplete + jmFail) * 100 / jmFileCount} status="active" />
<div style={{ textAlign: "center" }}>
<span style={{ fontSize: 30, color: 'rgb(0,144,255)' }}>{jmFileCount}</span>
</div>
<div style={{ textAlign: "center" }}>
<span style={{ fontSize: 30, color: 'rgb(61,169,92)' }}>{jmComplete}</span> ,
{/* 排队解密中:<span style={{ fontSize: 30, color: 'red' }}>{100 - rate}</span> 个, */}
<span style={{ fontSize: 30, color: 'rgb(0,144,255)' }}>{jmWait}</span> ,
<span style={{ fontSize: 30, color: 'red' }}>{jmFail}</span>
</div>
</Modal>
</Card>
)
}
export default BiddingDocumentsDecrypt