昨天 35722562e9e13f0504acc15b740d042ecb810199
src/views/mes/qc/indicator/index.vue
@@ -13,7 +13,7 @@
  exportIndicator,
  getIndicatorPage,
} from '#/api/mes/qc/indicator';
import { DICT_TYPE } from '@vben/constants';
import { DICT_TYPE, MesQcIndicatorItemType } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { $t } from '#/locales';
@@ -40,6 +40,14 @@
function getTypeLabel(type: number): string {
  const item = typeDictOptions.find((d) => d.value === type);
  return item?.label || String(type);
}
function getItemTypeColor(itemType: number): string {
  return itemType === MesQcIndicatorItemType.GROUP ? 'purple' : 'blue';
}
function getItemTypeLabel(itemType: number): string {
  return itemType === MesQcIndicatorItemType.GROUP ? '分组项' : '录入项';
}
/** 刷新表格 */
@@ -133,6 +141,14 @@
          ]"
        />
      </template>
      <template #itemType="{ row }">
        <Tag v-if="row.itemType" :color="getItemTypeColor(row.itemType)">
          {{ getItemTypeLabel(row.itemType) }}
        </Tag>
      </template>
      <template #parentName="{ row }">
        {{ row.parentName || '-' }}
      </template>
      <template #type="{ row }">
        <Tag v-if="row.type !== undefined && row.type !== null" :color="getTypeColor(row.type)">
          {{ getTypeLabel(row.type) }}