zhou zhou
10 小时以前 50e95b985a72fcec4a93a2470e9efdfb2620148a
rsf-design/src/views/system/dict-type/dictTypePage.helpers.js
@@ -1,3 +1,5 @@
import { $t } from '@/locales'
export function createDictTypeSearchState() {
  return {
    condition: '',
@@ -25,10 +27,10 @@
  }
}
export function getDictTypeStatusMeta(status) {
export function getDictTypeStatusMeta(status, t = $t) {
  return Number(status) === 1
    ? { text: '正常', type: 'success', bool: true }
    : { text: '冻结', type: 'danger', bool: false }
    ? { text: t('common.status.normal'), type: 'success', bool: true }
    : { text: t('common.status.frozen'), type: 'danger', bool: false }
}
export function buildDictTypeSearchParams(params = {}) {
@@ -73,8 +75,8 @@
  }
}
export function normalizeDictTypeListRow(record = {}) {
  const statusMeta = getDictTypeStatusMeta(record.status)
export function normalizeDictTypeListRow(record = {}, t = $t) {
  const statusMeta = getDictTypeStatusMeta(record.status, t)
  return {
    ...record,
    code: record.code || '',