更新版本库
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user