列表分页接口开发完成
This commit is contained in:
@ -6,19 +6,11 @@ import { useHistory } from 'umi';
|
||||
import ViewModal from '../ViewModal';
|
||||
import { getPage } from '../service';
|
||||
|
||||
interface ViewDetailsProps {
|
||||
entity?: {
|
||||
projectName?:string|null,
|
||||
projectNumber?:string|null,
|
||||
} | null,
|
||||
visibleDefault?:boolean| false,
|
||||
}
|
||||
/**
|
||||
* 事后监督列表
|
||||
* @returns
|
||||
*/
|
||||
const PostSupervision: React.FC<{}> = () => {
|
||||
|
||||
const [spin, spinSet] = useState<boolean>(false);
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const [record, setRecord] = useState<any[]>([]);
|
||||
@ -47,7 +39,6 @@ const PostSupervision: React.FC<{}> = () => {
|
||||
}
|
||||
|
||||
const columns: ProColumns<any>[] = [
|
||||
|
||||
{
|
||||
valueType: 'index',
|
||||
align: 'center',
|
||||
@ -63,52 +54,61 @@ const PostSupervision: React.FC<{}> = () => {
|
||||
{
|
||||
title: '项目编号',
|
||||
align: 'center',
|
||||
dataIndex: 'projectNumber',
|
||||
dataIndex: 'projectNum',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '标段',
|
||||
align: 'center',
|
||||
dataIndex: 'sectionName',
|
||||
dataIndex: 'packageNames',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '评审室名称',
|
||||
align: 'center',
|
||||
dataIndex: 'reviewRoomName',
|
||||
dataIndex: 'areaName',
|
||||
hideInSearch: false,
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
title: '预计评标开始时间',
|
||||
align: 'center',
|
||||
dataIndex: 'startTime',
|
||||
dataIndex: 'reserveStartDate',
|
||||
hideInSearch: true,
|
||||
width: '15%',
|
||||
},
|
||||
{
|
||||
title: '预计评标结束时间',
|
||||
align: 'center',
|
||||
dataIndex: 'endTime',
|
||||
dataIndex: 'reserveEndDate',
|
||||
hideInSearch: true,
|
||||
width: '9.5%',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'state',
|
||||
dataIndex: 'status',
|
||||
hideInSearch: true,
|
||||
width: '4.5%',
|
||||
valueEnum: {
|
||||
0: {
|
||||
text: '未开始'
|
||||
'-1': {
|
||||
text: '待确认'
|
||||
},
|
||||
1: {
|
||||
text: '评标中'
|
||||
'0': {
|
||||
text: '未开启'
|
||||
},
|
||||
2: {
|
||||
'1': {
|
||||
text: '进行中'
|
||||
},
|
||||
'2': {
|
||||
text: '已结束'
|
||||
},
|
||||
'3': {
|
||||
text: '已取消'
|
||||
},
|
||||
'4': {
|
||||
text: '结束未使用'
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -154,34 +154,25 @@ const PostSupervision: React.FC<{}> = () => {
|
||||
search={{ labelWidth: 'auto', span: 6 }}
|
||||
loading={false}
|
||||
request={async (params) => {
|
||||
// spinSet(true);
|
||||
// return await getPage({
|
||||
// ...params,
|
||||
// basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize },
|
||||
// }).then((res) => {
|
||||
// const result = {
|
||||
// data: res.data.records,
|
||||
// total: res.data.total,
|
||||
// success: res.success,
|
||||
// pageSize: res.data.size,
|
||||
// current: res.data.current
|
||||
// }
|
||||
// return result;
|
||||
// }).finally(() => {
|
||||
// isNotEmpty(window.location.search) && history.push(window.location.pathname);
|
||||
// spinSet(false);
|
||||
// })
|
||||
return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目',
|
||||
projectNumber: 'SS25102022000211',
|
||||
sectionName: '标段一',
|
||||
reviewRoomName: '集团第一评审室',
|
||||
state : 2,
|
||||
startTime : '2022-07-13 12:30',
|
||||
endTime : '2022-07-13 12:30'}],
|
||||
total:1,
|
||||
pageSize:10,
|
||||
current:1}
|
||||
|
||||
spinSet(true);
|
||||
return await getPage({
|
||||
...params,
|
||||
basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize },
|
||||
queryType: 2,
|
||||
areaRoomName: params.areaName
|
||||
}).then((res) => {
|
||||
const result = {
|
||||
data: res.data.records,
|
||||
total: res.data.total,
|
||||
success: res.success,
|
||||
pageSize: res.data.size,
|
||||
current: res.data.current
|
||||
}
|
||||
return result;
|
||||
}).finally(() => {
|
||||
isNotEmpty(window.location.search) && history.push(window.location.pathname);
|
||||
spinSet(false);
|
||||
})
|
||||
}
|
||||
}
|
||||
pagination={{
|
||||
|
Reference in New Issue
Block a user