5.18 多轮招募上传投标文件点击分页后数据错误问题
This commit is contained in:
@ -10,7 +10,6 @@ import { getStatusByProId } from '@/services/downLoad';
|
|||||||
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
const Index: React.FC<{}> = () => {
|
const Index: React.FC<{}> = () => {
|
||||||
const [dateList, setDateList] = useState([]);
|
|
||||||
let projectId = getProId()
|
let projectId = getProId()
|
||||||
const [expandedRowKeys, setExpandedRowKeys] = useState<ReactText[]>([0]);
|
const [expandedRowKeys, setExpandedRowKeys] = useState<ReactText[]>([0]);
|
||||||
//供应商资质库显示状态
|
//供应商资质库显示状态
|
||||||
@ -24,19 +23,19 @@ const Index: React.FC<{}> = () => {
|
|||||||
* @returns true-有供应商资质库信息 false-无供应商资质库信息
|
* @returns true-有供应商资质库信息 false-无供应商资质库信息
|
||||||
*/
|
*/
|
||||||
const getSupplierStatus = async (id: string) => {
|
const getSupplierStatus = async (id: string) => {
|
||||||
await getStatusByProId({id: id}).then(res => {
|
await getStatusByProId({ id: id }).then(res => {
|
||||||
setTip(false)
|
setTip(false)
|
||||||
if(res?.code == 200) {
|
if (res?.code == 200) {
|
||||||
setSupplierStatus(res?.data)
|
setSupplierStatus(res?.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let listDate = dateList?.map((item: any, index: any) => ({
|
let listRender = (list: any[]) => list?.map((item: any, index: any) => ({
|
||||||
title: item.packageName + '—第' + item.roomSort + '轮',
|
title: item.packageName + '—第' + item.roomSort + '轮',
|
||||||
description: (
|
description: (
|
||||||
<div>
|
<div>
|
||||||
<TableLook messProp={item} itemIndex={index} supplierStatus={supplierStatus}/>
|
<TableLook messProp={item} itemIndex={index} supplierStatus={supplierStatus} />
|
||||||
{/* {expandedRowKeys.includes(item.sectionVO.bsId) ? <TableLook messProp={item} itemIndex={index} /> : null} */}
|
{/* {expandedRowKeys.includes(item.sectionVO.bsId) ? <TableLook messProp={item} itemIndex={index} /> : null} */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@ -73,9 +72,9 @@ const Index: React.FC<{}> = () => {
|
|||||||
await getPackages(params).then((res) => {
|
await getPackages(params).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
setDateList(res.data.records)
|
// setDateList(res.data.records)
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
data: data.records,
|
data: listRender(data.records),
|
||||||
success: res.success,
|
success: res.success,
|
||||||
total: res.data.total,
|
total: res.data.total,
|
||||||
current: res.data.current,
|
current: res.data.current,
|
||||||
@ -94,7 +93,7 @@ const Index: React.FC<{}> = () => {
|
|||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
}}
|
}}
|
||||||
expandable={{ expandedRowKeys, onExpandedRowsChange: setExpandedRowKeys, onExpand: changeList }}
|
expandable={{ expandedRowKeys, onExpandedRowsChange: setExpandedRowKeys, onExpand: changeList }}
|
||||||
dataSource={listDate}
|
// dataSource={listDate}
|
||||||
metas={{
|
metas={{
|
||||||
title: {},
|
title: {},
|
||||||
content: {},
|
content: {},
|
||||||
|
Reference in New Issue
Block a user