From d841a8ea6dc2f7fdedbf0ea2b1e539842f5f3e37 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 12 十月 2026 19:45:36 +0800
Subject: [PATCH] 宁夏-九鸿 1.发版配置文件修改

---
 src/views/mes/qc/template/modules/indicator-list.vue |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/views/mes/qc/template/modules/indicator-list.vue b/src/views/mes/qc/template/modules/indicator-list.vue
index 32f6194..6ad5681 100644
--- a/src/views/mes/qc/template/modules/indicator-list.vue
+++ b/src/views/mes/qc/template/modules/indicator-list.vue
@@ -2,14 +2,15 @@
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { MesQcTemplateIndicatorApi } from '#/api/mes/qc/template/indicator';
 
-import { useVbenModal } from '..\..\..\..\..\packages\effects\common-ui\src';
+import { useVbenModal } from '@vben/common-ui';
 
-import { message } from 'ant-design-vue';
+import { message, Switch } from 'ant-design-vue';
 
 import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
 import {
   deleteTemplateIndicator,
   getTemplateIndicatorPage,
+  updateTemplateIndicator,
 } from '#/api/mes/qc/template/indicator';
 import { $t } from '#/locales';
 
@@ -39,6 +40,16 @@
 /** 缂栬緫鎸囨爣椤� */
 function handleEdit(row: MesQcTemplateIndicatorApi.TemplateIndicator) {
   formModalApi.setData({ ...row, templateId: props.templateId }).open();
+}
+
+/** 鍒囨崲鏄惁鍙備笌鍒ゅ畾 */
+async function handleJudgeFlagChange(
+  row: MesQcTemplateIndicatorApi.TemplateIndicator,
+  checked: boolean,
+) {
+  await updateTemplateIndicator({ ...row, judgeFlag: checked });
+  message.success(`妫�娴嬮」[${row.indicatorName}]宸�${checked ? '鍙備笌' : '涓嶅弬涓�'}鍒ゅ畾`);
+  handleRefresh();
 }
 
 /** 鍒犻櫎鎸囨爣椤� */
@@ -100,6 +111,17 @@
           ]"
         />
       </template>
+      <template #judgeFlag="{ row }">
+        <Switch
+          :checked="row.judgeFlag !== false"
+          :disabled="readonly"
+          checked-children="鏄�"
+          un-checked-children="鍚�"
+          @change="
+            (checked: boolean) => handleJudgeFlagChange(row, checked)
+          "
+        />
+      </template>
       <template #actions="{ row }">
         <TableAction
           :actions="[

--
Gitblit v1.9.3