From 044a4ec4ebe85f8c00e889fe3914de17a6ea1f28 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 17 十月 2024 18:18:01 +0800
Subject: [PATCH] 2024-10-17

---
 src/tabviews/zshare/actionList/tabbutton/index.jsx |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index dbc22b9..94322e0 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -22,7 +22,8 @@
   state = {
     disabled: false,
     hidden: false,
-    primaryId: ''
+    primaryId: '',
+    dict: window.GLOB.dict
   }
 
   UNSAFE_componentWillMount () {
@@ -100,16 +101,13 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId, record, type) => {
-    const { btn, selectedData, BID } = this.props
-    const { disabled } = this.state
+  actionTrigger = (triggerId, record, type, lid) => {
+    const { btn, selectedData, BID, LID } = this.props
+    const { disabled, dict } = this.state
 
     if (disabled || btn.multiMenus) return
     if (triggerId && btn.uuid !== triggerId) return
-
-    if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) {
-      return
-    }
+    if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return
     
     let data = record || selectedData || []
 
@@ -117,7 +115,7 @@
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
       notification.warning({
         top: 92,
-        message: '璇烽�夋嫨琛岋紒',
+        message: dict['select_row'] || '璇烽�夋嫨琛岋紒',
         duration: 5
       })
       return false
@@ -125,7 +123,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
+        message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -190,10 +188,18 @@
       if (!menu) {
         notification.warning({
           top: 92,
-          message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
+          message: dict['no_perm'] || '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
           duration: 5
         })
         return
+      }
+
+      if (btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') {
+        Object.keys(data[0]).forEach(key => {
+          if (/^\$/.test(key)) return
+          if (key === 'children') return
+          menu.param[key] = data[0][key]
+        })
       }
 
       newtab = menu
@@ -214,6 +220,7 @@
 
   triggerMenu = (tab) => {
     const { btn, selectedData, BID } = this.props
+    const { dict } = this.state
 
     let data = selectedData || []
 
@@ -221,7 +228,7 @@
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
       notification.warning({
         top: 92,
-        message: '璇烽�夋嫨琛岋紒',
+        message: dict['select_row'] || '璇烽�夋嫨琛岋紒',
         duration: 5
       })
       return false
@@ -229,7 +236,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: '璇烽�夋嫨鍗曡鏁版嵁锛�',
+        message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -278,7 +285,7 @@
     if (!menu) {
       notification.warning({
         top: 92,
-        message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
+        message: dict['no_perm'] || '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
         duration: 5
       })
       return
@@ -325,7 +332,7 @@
           type="link"
           title={btn.show === 'icon' ? btn.label : ''}
           style={btn.style || null}
-          className={btn.$toolbtn ? (btn.hover || '') : ''}
+          className={btn.hover || ''}
         >{label}</Button>
       </Dropdown>)
     }
@@ -337,7 +344,7 @@
         title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
         style={btn.style || null}
         disabled={disabled}
-        className={btn.$toolbtn ? (btn.hover || '') : ''}
+        className={btn.hover || ''}
         onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
       >{label}</Button>
     )

--
Gitblit v1.8.0