Merge branch 'release_electronic_bid_evaluation_room' of http://10.124.128.2:8888/eshop/fe_service_ebtp_frontend into release_electronic_bid_evaluation_room
This commit is contained in:
@ -1,27 +1,28 @@
|
|||||||
import { Spin, Modal, Descriptions, Table, message } from 'antd';
|
import { Spin, Modal, Descriptions, message, Button } from 'antd';
|
||||||
import type { ColumnsType } from 'antd/es/table';
|
// import type { ColumnsType } from 'antd/es/table';
|
||||||
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
||||||
import { getReservationInfo, getReportInfo } from './service';
|
import { getReservationInfo, getReportInfo } from './service';
|
||||||
|
import ProTable from '@ant-design/pro-table';
|
||||||
|
|
||||||
interface ViewDetailsProps {
|
interface ViewDetailsProps {
|
||||||
modalVisible: boolean; //开启关闭控制
|
modalVisible: boolean; //开启关闭控制
|
||||||
onCancel: () => void; //关闭方法传入
|
onCancel: () => void; //关闭方法传入
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ReportInfo {
|
// interface ReportInfo {
|
||||||
expertAmount ?: string;
|
// expertAmount ?: string;
|
||||||
purchaseExpertAmount ?: string;
|
// purchaseExpertAmount ?: string;
|
||||||
manageAmount ?: string;
|
// manageAmount ?: string;
|
||||||
userList ?: DataType[];
|
// userList ?: DataType[];
|
||||||
}
|
// }
|
||||||
|
|
||||||
interface DataType {
|
// interface DataType {
|
||||||
key ?: string;
|
// key ?: string;
|
||||||
userName ?: string;
|
// userName ?: string;
|
||||||
status: number;
|
// status: number;
|
||||||
reportStatus ?: string;
|
// reportStatus ?: string;
|
||||||
signDate ?: string;
|
// signDate ?: string;
|
||||||
}
|
// }
|
||||||
|
|
||||||
interface ReservationInfo {
|
interface ReservationInfo {
|
||||||
projectName ?: string;
|
projectName ?: string;
|
||||||
@ -35,27 +36,49 @@ interface ReservationInfo {
|
|||||||
realEndDate ?: string;
|
realEndDate ?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns: ColumnsType<DataType> = [
|
const columns: any = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'key',
|
valueType: 'index',
|
||||||
key: 'key',
|
width: 80,
|
||||||
},
|
hideInSearch: true,
|
||||||
{
|
},
|
||||||
title: '人员',
|
{
|
||||||
dataIndex: 'userName',
|
title: '人员',
|
||||||
key: 'userName',
|
dataIndex: 'userName',
|
||||||
},
|
hideInSearch: true,
|
||||||
{
|
},
|
||||||
title: '报到状态',
|
{
|
||||||
dataIndex: 'reportStatus',
|
title: '报道状态',
|
||||||
key: 'reportStatus',
|
dataIndex: 'status',
|
||||||
},
|
hideInSearch: true,
|
||||||
{
|
valueEnum: {
|
||||||
title: '报到时间',
|
0: { text: '未报道' },
|
||||||
dataIndex: 'signDate',
|
1: { text: '已报道' },
|
||||||
key: 'signDate',
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '报道时间',
|
||||||
|
dataIndex: 'signDate',
|
||||||
|
valueType: 'dateTime',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '签到状态',
|
||||||
|
dataIndex: 'loginStatus',
|
||||||
|
hideInSearch: true,
|
||||||
|
valueEnum: {
|
||||||
|
1: { text: '未签到' },
|
||||||
|
2: { text: '已签到' },
|
||||||
|
3: { text: '已申请回避' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '签到时间',
|
||||||
|
dataIndex: 'loginDate',
|
||||||
|
valueType: 'dateTime',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +90,7 @@ const columns: ColumnsType<DataType> = [
|
|||||||
const [initReservationInfo, setInitReservationInfo] = useState<boolean>(false);
|
const [initReservationInfo, setInitReservationInfo] = useState<boolean>(false);
|
||||||
const [initReportInfo, setInitReportInfo] = useState<boolean>(false);
|
const [initReportInfo, setInitReportInfo] = useState<boolean>(false);
|
||||||
const [reservationInfo, setReservationInfo] = useState<ReservationInfo>();
|
const [reservationInfo, setReservationInfo] = useState<ReservationInfo>();
|
||||||
const [reportInfo, setReportInfo] = useState<ReportInfo>();
|
const [reportInfo, setReportInfo] = useState<any>({});
|
||||||
const InitData = (id:string) => {
|
const InitData = (id:string) => {
|
||||||
setInitReservationInfo(true);
|
setInitReservationInfo(true);
|
||||||
setInitReportInfo(true);
|
setInitReportInfo(true);
|
||||||
@ -88,19 +111,13 @@ const columns: ColumnsType<DataType> = [
|
|||||||
});
|
});
|
||||||
//获取报道信息
|
//获取报道信息
|
||||||
getReportInfo(id)
|
getReportInfo(id)
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let _data: DataType[] = res.data.userList;
|
|
||||||
_data?.forEach((item, index) =>{
|
|
||||||
item.key = (index + 1).toString();
|
|
||||||
item.reportStatus = getReportStatus(item.status);
|
|
||||||
})
|
|
||||||
setReportInfo(res.data);
|
setReportInfo(res.data);
|
||||||
}else{
|
} else {
|
||||||
message.error(res.message);
|
message.error(res.message);
|
||||||
}
|
}
|
||||||
})
|
}).catch(res => {
|
||||||
.catch(res => {
|
|
||||||
message.error(res.message);
|
message.error(res.message);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@ -134,18 +151,25 @@ const columns: ColumnsType<DataType> = [
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const getReportStatus = (state:number) => {
|
// const getReportStatus = (state:number) => {
|
||||||
let result = '';
|
// let result = '';
|
||||||
switch(state){
|
// switch(state){
|
||||||
case 0:
|
// case 0:
|
||||||
result = '未报道';
|
// result = '未报道';
|
||||||
break;
|
// break;
|
||||||
case 1:
|
// case 1:
|
||||||
result = '已报道';
|
// result = '已报道';
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
return result;
|
// return result;
|
||||||
}
|
// }
|
||||||
|
const renderFooter = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Button onClick={onCancel}>关闭</Button>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (<Modal
|
return (<Modal
|
||||||
destroyOnClose = {true}
|
destroyOnClose = {true}
|
||||||
visible = {modalVisible}
|
visible = {modalVisible}
|
||||||
@ -154,8 +178,8 @@ const columns: ColumnsType<DataType> = [
|
|||||||
<span>详情</span>
|
<span>详情</span>
|
||||||
<span style={{textAlign: "center",width: "100%",position: "absolute",left: 0}}>{reservationInfo?.projectName}</span>
|
<span style={{textAlign: "center",width: "100%",position: "absolute",left: 0}}>{reservationInfo?.projectName}</span>
|
||||||
</div>}
|
</div>}
|
||||||
footer={null}
|
footer={renderFooter()}
|
||||||
width={1000}
|
width={"60%"}
|
||||||
>
|
>
|
||||||
|
|
||||||
<Spin spinning={initReservationInfo || initReportInfo}>
|
<Spin spinning={initReservationInfo || initReportInfo}>
|
||||||
@ -173,7 +197,13 @@ const columns: ColumnsType<DataType> = [
|
|||||||
<Descriptions.Item label="招标代理机构">{reportInfo?.manageAmount}人</Descriptions.Item>
|
<Descriptions.Item label="招标代理机构">{reportInfo?.manageAmount}人</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
<h3>报道信息</h3>
|
<h3>报道信息</h3>
|
||||||
<Table columns={columns} dataSource={reportInfo?.userList} />
|
<ProTable
|
||||||
|
options={false}
|
||||||
|
size='small'
|
||||||
|
search={false}
|
||||||
|
pagination={false}
|
||||||
|
columns={columns}
|
||||||
|
dataSource={reportInfo?.userList} />
|
||||||
</Spin>
|
</Spin>
|
||||||
</Modal>)
|
</Modal>)
|
||||||
})
|
})
|
||||||
|
@ -25,7 +25,7 @@ export async function getPage(params?: any) {
|
|||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export async function getReportInfo(params?: string) {
|
export async function getReportInfo(params?: string) {
|
||||||
return request('/api/biz-service-ebtp-evaluation/v1/eleceval/user/number/report/' + params, {
|
return request('/api/biz-service-ebtp-evaluation/v1/eleceval/expert/number/report/' + params, {
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
});
|
});
|
||||||
}
|
}
|
Reference in New Issue
Block a user