| | |
| | | return `${(ratio * 100).toFixed(1)}%`; |
| | | } |
| | | |
| | | /** 格式化比例显示(保留两位小数) */ |
| | | function formatRatio2(ratio: number | undefined) { |
| | | if (ratio === undefined || ratio === null) return '-'; |
| | | return `${(ratio * 100).toFixed(2)}%`; |
| | | } |
| | | |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | | formOptions: { |
| | | schema: useGridFormSchema(), |
| | |
| | | <template #housingFundPersonalRatio="{ row }"> |
| | | {{ formatRatio(row.housingFundPersonalRatio) }} |
| | | </template> |
| | | <template #seriousIllnessPersonalRatio="{ row }"> |
| | | {{ formatRatio2(row.seriousIllnessPersonalRatio) }} |
| | | </template> |
| | | <template #longTermCarePersonalRatio="{ row }"> |
| | | {{ formatRatio2(row.longTermCarePersonalRatio) }} |
| | | </template> |
| | | <template #status="{ row }"> |
| | | <Tag :color="row.status === 0 ? 'success' : 'default'"> |
| | | {{ row.status === 0 ? '启用' : '禁用' }} |