From a241b66efcc41e973290a6722fb7a4d79b833ea1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 13 十月 2026 09:54:32 +0800
Subject: [PATCH] feat(bi): 为图表配置接口添加名称字段

---
 src/components/table-action/table-action.vue |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/components/table-action/table-action.vue b/src/components/table-action/table-action.vue
index f813c12..e968d87 100644
--- a/src/components/table-action/table-action.vue
+++ b/src/components/table-action/table-action.vue
@@ -6,10 +6,10 @@
 
 import { computed, unref, watch } from 'vue';
 
-import { useAccess } from '..\..\packages\effects\access\src';
-import { IconifyIcon } from '..\..\packages\icons\src';
-import { $t } from '..\..\packages\locales\src';
-import { isBoolean, isFunction } from '..\..\packages\utils\src';
+import { useAccess } from '@vben/access';
+import { IconifyIcon } from '@vben/icons';
+import { $t } from '@vben/locales';
+import { isBoolean, isFunction } from '@vben/utils';
 
 import {
   Button,
@@ -19,6 +19,9 @@
   Space,
   Tooltip,
 } from 'ant-design-vue';
+
+import { automaticApproval } from '#/store/audit-policy';
+import { auditActionMode } from '#/utils/audit-ui-policy';
 
 const props = defineProps({
   actions: {
@@ -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,14 +65,20 @@
 /** 澶勭悊鎸夐挳 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(() => {
@@ -96,6 +106,8 @@
   if (popConfirm.cancel && isFunction(popConfirm.cancel)) {
     attrs.onCancel = popConfirm.cancel;
   }
+
+  // 涓嶈缃� getPopupContainer锛岃瀹冮粯璁ゆ寕杞藉埌 body锛岄伩鍏嶈閬尅
 
   return attrs;
 }
@@ -269,6 +281,12 @@
 }
 
 .ant-popconfirm {
+  width: 210px;
+
+  //.ant-popconfirm-message {
+  //  white-space: nowrap;
+  //}
+
   .ant-popconfirm-buttons {
     .ant-btn {
       margin-inline-start: 4px !important;

--
Gitblit v1.9.3