From 176c6e1da22e96a1110fa91f8fc8eb8ad2881e08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 08 八月 2022 18:13:37 +0800
Subject: [PATCH] 2022-08-08

---
 src/menu/components/share/actioncomponent/formconfig.jsx |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index d981ba5..25baad2 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -52,15 +52,28 @@
   ]
 
   let getTabs = (list) => {
-    return list.filter(item => {
-      if (item.type !== 'tabs') return false
+    let _list = []
+    list.forEach(item => {
+      if (item.type !== 'tabs') return
 
-      item.children = item.children.map(cell => {
-        cell.children = getTabs(cell.children)
-        return cell
+      _list.push({
+        value: item.uuid,
+        label: item.name,
+        children: item.subtabs.map(cell => {
+          let children = getTabs(cell.components)
+  
+          if (children.length === 0) {
+            children = null
+          }
+          return {
+            value: cell.uuid,
+            label: cell.label,
+            children: children
+          }
+        })
       })
-      return item
     })
+    return _list
   }
 
   // if (type === 'editable') {
@@ -74,8 +87,7 @@
   //     }
   //   ]
   // }
-
-  let tabs = getTabs(JSON.parse(JSON.stringify(modules)))
+  let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components)))
 
   let pageTemps = [
     { value: 'billprint', text: '鍗曟嵁鎵撳嵃' },

--
Gitblit v1.8.0