import type { IDictType } from '@/views/basic/common-interface'

export function findDictNameByCode(code: string, dict: IDictType[]) {
  const target = dict.filter(item => item.value === code)
  if (target.length > 0) {
    return target[0].name
  }
  else {
    return code
  }
}
