From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 十一月 2022 16:11:55 +0800
Subject: [PATCH] 2022-11-21

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   46 ++++++++++++++++++++++++++++------------------
 1 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index ff1ef81..3e58939 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -27,7 +27,6 @@
     btn: PropTypes.object,            // 鎸夐挳
     columns: PropTypes.any,           // 瀛楁鍒�
     setting: PropTypes.any,           // 椤甸潰閫氱敤璁剧疆
-    ContainerId: PropTypes.any,       // tab椤甸潰ID锛岀敤浜庡脊绐楁帶鍒�
     disabled: PropTypes.any,          // 琛屾寜閽鐢�
   }
 
@@ -1633,9 +1632,17 @@
         result.open_key = Utils.encryptOpenKey(result.secretkey, result.timestamp)
       }
     } else {
-      if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
-        result.rduri = window.GLOB.mainSystemApi
-      } else if (btn.sysInterface !== 'true') {
+      if (btn.sysInterface === 'true') {
+        if (window.GLOB.mainSystemApi) {
+          result.rduri = window.GLOB.mainSystemApi
+        }
+      } else if (btn.sysInterface === 'external') {
+        if (window.GLOB.systemType === 'production') {
+          result.$token = btn.exProInterface || ''
+        } else {
+          result.$token = btn.exInterface || ''
+        }
+      } else {
         if (window.GLOB.systemType === 'production' && btn.proInterface) {
           result.rduri = btn.proInterface
         } else {
@@ -1905,16 +1912,22 @@
       node && node.scrollIntoView({behavior: 'smooth', block: 'center', inline: 'nearest'})
     }
 
-    if (btn.MenuID && Array.isArray(btn.openmenu) && btn.openmenu.length > 0) {
-      let newtab = {
-        MenuID: btn.MenuID,
-        MenuName: btn.MenuName,
-        MenuNo: btn.MenuNo,
-        type: btn.tabType,
-        param: {
-          $BID: id
+    if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0) {
+      let menuId = btn.openmenu.slice(-1)[0]
+      let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
+
+      if (!newtab && btn.MenuID) {
+        newtab = {
+          MenuID: btn.MenuID,
+          MenuName: btn.MenuName,
+          MenuNo: btn.MenuNo,
+          type: btn.tabType
         }
+      } else if (!newtab) {
+        return
       }
+
+      newtab = {...newtab, param: { $BID: id }}
 
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
@@ -2534,7 +2547,7 @@
    * @description 鏄剧ず妯℃�佹
    */
   getModels = () => {
-    const { setting, BID, btn, BData } = this.props
+    const { BID, btn, BData } = this.props
     const { btnconfig, visible } = this.state
 
     if (!btnconfig || !btnconfig.setting) return null
@@ -2583,12 +2596,9 @@
     } else {
       let container = document.body
 
-      if (
-        (setting.tabType === 'main' && btnconfig.setting.container === 'tab' && this.props.ContainerId) ||
-        (btnconfig.setting.container === 'tab' && btn.ContainerId)
-      ) {
+      if (btnconfig.setting.container === 'tab' && btn.ContainerId) {
         width = btnconfig.setting.width > 100 ? btnconfig.setting.width : btnconfig.setting.width + '%'
-        container = () => document.getElementById(this.props.ContainerId || btn.ContainerId)
+        container = () => document.getElementById(btn.ContainerId)
       }
       return (
         <Modal

--
Gitblit v1.8.0