From 35722562e9e13f0504acc15b740d042ecb810199 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期日, 20 九月 2026 09:06:11 +0800
Subject: [PATCH] feat(mes): 添加质检指标条目类型支持并实现报告生成功能

---
 src/views/mes/qc/indicator/index.vue |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/views/mes/qc/indicator/index.vue b/src/views/mes/qc/indicator/index.vue
index ac34922..b49abd3 100644
--- a/src/views/mes/qc/indicator/index.vue
+++ b/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) }}

--
Gitblit v1.9.3