account.ts 688 B

1234567891011121314151617181920212223242526272829
  1. import { useEnumStore } from '@/stores'
  2. const { getEnumTypeList, getEnumTypeName, getEnumTypeValue } = useEnumStore()
  3. /**
  4. * 获取对应的证件类型列表
  5. * @returns
  6. */
  7. export function getCertificateTypeList() {
  8. return getEnumTypeList('certificatetype')
  9. }
  10. /**
  11. * 获取对应的证件类型名称
  12. * @returns
  13. */
  14. export function getCertificateTypeCodeName(value: number) {
  15. const enums = getCertificateTypeList()
  16. return getEnumTypeName(enums, value)
  17. }
  18. /**
  19. * 获取对应的证件类型名称的值
  20. * @returns
  21. */
  22. export function getCertificateTypeCodeValue(label: string) {
  23. const enums = getCertificateTypeList()
  24. return getEnumTypeValue(enums, label)
  25. }