| | |
| | | width: 100, |
| | | resizable: true, |
| | | render: (row) => { |
| | | if (String(row.status) === '2') { |
| | | if (String(row.vehicleType) === '1') { |
| | | const inventoryStatusMap: Record<string, { type: 'default' | 'success' | 'info' | 'warning' | 'error', text: string }> = { |
| | | 1: { type: 'warning', text: '待完善信息' }, |
| | | 2: { type: 'info', text: '待运营' }, |
| | | 3: { type: 'error', text: '保险/年检过期' }, |
| | | } |
| | | const status = inventoryStatusMap[String(row.status)] || { type: 'default', text: row.statusDesc || '-' } |
| | | return ( |
| | | <NTag type="info" bordered={false} size="small"> |
| | | 待运营 |
| | | <NTag type={status.type} bordered={false} size="small"> |
| | | {status.text} |
| | | </NTag> |
| | | ) |
| | | } |
| | | |
| | | const statusMap: Record<number, { type: 'default' | 'success' | 'info' | 'warning' | 'error', text: string }> = { |
| | | 1: { type: 'info', text: '运营中' }, |
| | | 2: { type: 'error', text: '维修中' }, |