| | |
| | | |
| | | import { message, Tag } from 'ant-design-vue'; |
| | | |
| | | import { DICT_TYPE } from '@vben/constants'; |
| | | import { getDictOptions } from '@vben/hooks'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { |
| | |
| | | |
| | | import { |
| | | ApplicationStatus, |
| | | MemberType, |
| | | getApplicationGradeLabel, |
| | | useGridColumns, |
| | | useGridFormSchema, |
| | | } from './data'; |
| | |
| | | } |
| | | |
| | | /** 等级字典映射:根据会员类型显示对应的等级名称 */ |
| | | const personalGradeOptions = getDictOptions(DICT_TYPE.UMS_PERSONAL_GRADE, 'string'); |
| | | const unitGradeOptions = getDictOptions(DICT_TYPE.UMS_UNIT_GRADE, 'string'); |
| | | function getGradeLabel(row: UmsApplicationApi.Application) { |
| | | const options = |
| | | row.memberType === MemberType.UNIT |
| | | ? unitGradeOptions |
| | | : personalGradeOptions; |
| | | return options?.find((o) => o.value === row.memberGrade)?.label || row.memberGrade; |
| | | return getApplicationGradeLabel(row.memberType, row.memberGrade); |
| | | } |
| | | |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | |
| | | </template> |
| | | </Grid> |
| | | </Page> |
| | | </template> |
| | | </template> |