From ec8ff4f6259404460a0b4437e29a40986c2c4b9d Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 12 十月 2026 18:31:43 +0800
Subject: [PATCH] feat(workflow): 集成自动化审批功能并优化多个业务模块

---
 src/components/table-action/table-action.vue |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/components/table-action/table-action.vue b/src/components/table-action/table-action.vue
index 78220f5..e968d87 100644
--- a/src/components/table-action/table-action.vue
+++ b/src/components/table-action/table-action.vue
@@ -20,6 +20,9 @@
   Tooltip,
 } from 'ant-design-vue';
 
+import { automaticApproval } from '#/store/audit-policy';
+import { auditActionMode } from '#/utils/audit-ui-policy';
+
 const props = defineProps({
   actions: {
     type: Array as PropType<ActionItem[]>,
@@ -43,6 +46,7 @@
 
 /** 妫�鏌ユ槸鍚︽樉绀� */
 function isIfShow(action: ActionItem): boolean {
+  if (auditActionMode(action.label, automaticApproval.value) === 'hidden') return false;
   const ifShow = action.ifShow;
   let isIfShow = true;
   if (isBoolean(ifShow)) {
@@ -61,15 +65,21 @@
 /** 澶勭悊鎸夐挳 actions */
 const getActions = computed(() => {
   const actions = props.actions || [];
-  return actions.filter((action: ActionItem) => isIfShow(action));
+  return actions.filter((action: ActionItem) => isIfShow(action)).map(displayAction);
 });
 
 /** 澶勭悊涓嬫媺鑿滃崟 actions */
 const getDropdownList = computed(() => {
   const dropDownActions = props.dropDownActions || [];
-  return dropDownActions.filter((action: ActionItem) => isIfShow(action));
+  return dropDownActions.filter((action: ActionItem) => isIfShow(action)).map(displayAction);
 });
 
+function displayAction(action: ActionItem): ActionItem {
+  return auditActionMode(action.label, automaticApproval.value) === 'activate'
+    ? { ...action, label: '鐢熸晥', tooltip: '鎻愪氦鍚庤嚜鍔ㄧ敓鏁�' }
+    : action;
+}
+
 /** Space 缁勪欢鐨� size */
 const spaceSize = computed(() => {
   const actions = unref(getActions);

--
Gitblit v1.9.3