Commit 36f8e28a authored by 成旭东's avatar 成旭东

fix

parent 66008740
Pipeline #27968 passed with stage
in 2 minutes 23 seconds
......@@ -159,28 +159,29 @@ const EstateList: React.FC<any> = (props) => {
render: (text: any) => (text || '-')
}, {
title: '最新预售证时间',
dataIndex: 'license_date',
key: 'license_date',
dataIndex: 'last_license_date',
key: 'last_license_date',
width: 150,
render: (_: any, record: any) => {
const dataMap = {
house: 'houseInfo',
business: 'businessInfo',
office: 'officeInfo',
}
render: (text: any) => (text || '-')
// render: (_: any, record: any) => {
// const dataMap = {
// house: 'houseInfo',
// business: 'businessInfo',
// office: 'officeInfo',
// }
if (record[dataMap[record.type]] && record[dataMap[record.type]].length) {
const sortData = record[dataMap[record.type]].sort((a: any, b: any) => {
const aDate: any = moment(a.license_date).format('YYYY/MM/DD HH:mm:ss');
const bDate: any = moment(b.license_date).format('YYYY/MM/DD HH:mm:ss');
return new Date(bDate).getTime() - new Date(aDate).getTime()
})
// if (record[dataMap[record.type]] && record[dataMap[record.type]].length) {
// const sortData = record[dataMap[record.type]].sort((a: any, b: any) => {
// const aDate: any = moment(a.license_date).format('YYYY/MM/DD HH:mm:ss');
// const bDate: any = moment(b.license_date).format('YYYY/MM/DD HH:mm:ss');
// return new Date(bDate).getTime() - new Date(aDate).getTime()
// })
return sortData[0].license_date;
}
// return sortData[0].license_date;
// }
return '-';
}
// return '-';
// }
}, {
title: '更新时间',
dataIndex: 'updated_at',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment