From 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 22 十月 2022 23:21:42 +0800
Subject: [PATCH] 2022-10-22

---
 src/menu/tablenodes/index.jsx |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/src/menu/tablenodes/index.jsx b/src/menu/tablenodes/index.jsx
index 8f31c88..d9c170c 100644
--- a/src/menu/tablenodes/index.jsx
+++ b/src/menu/tablenodes/index.jsx
@@ -55,7 +55,39 @@
       })
     }
 
-    traversal(config.components)
+    if (config.Template === 'BaseTable') {
+      config.components.forEach(item => {
+        if (item.type === 'tabs') {
+          item.subtabs.forEach(tab => {
+            if (tab.components[0].$tables) {
+              ptbs.push(...tab.components[0].$tables)
+              tab.components[0].$tables.forEach(tb => {
+                tbs.push({
+                  label: tab.label,
+                  table: tb,
+                  color: '#5AD8A6',
+                  id: Utils.getuuid(),
+                  direction: 'left'
+                })
+              })
+            }
+          })
+        } else if (item.$tables) {
+          ptbs.push(...item.$tables)
+          item.$tables.forEach(tb => {
+            tbs.push({
+              label: '涓昏〃',
+              table: tb,
+              color: '#5AD8A6',
+              id: Utils.getuuid(),
+              direction: 'left'
+            })
+          })
+        }
+      })
+    } else {
+      traversal(config.components)
+    }
 
     return {tbs, ptbs}
   }
@@ -181,6 +213,12 @@
           delete _param.type
           _param = window.btoa(window.encodeURIComponent(JSON.stringify(_param)))
           window.open(`#/menudesign/${_param}`)
+        } else if (menu.param.MenuType === 'BaseTable') {
+          let _param = {...menu.param}
+          delete _param.type
+          delete _param.MenuType
+          _param = window.btoa(window.encodeURIComponent(JSON.stringify(_param)))
+          window.open(`#/tabledesign/${_param}`)
         }
       } else if (menu.param.type === 'app') {
         if (menu.param.typename !== 'pc') {

--
Gitblit v1.8.0