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/components/card/cardcellcomponent/index.jsx |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index 8ab612e..520b227 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -5,7 +5,7 @@
 
 import asyncComponent from '@/utils/asyncComponent'
 import { getCardCellForm } from './formconfig'
-import { getActionForm } from '@/menu/components/share/actioncomponent/formconfig'
+import { getActionForm, getBaseTableActionForm } from '@/menu/components/share/actioncomponent/formconfig'
 
 import MKEmitter from '@/utils/events.js'
 import MenuUtils from '@/utils/utils-custom.js'
@@ -260,12 +260,10 @@
     if (card.eleType === 'button') {
       this.handleAction(card)
     } else {
-      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
-
       this.setState({
         visible: true,
         card: card,
-        formlist: getCardCellForm(card, cards.type, cards.subtype, cardCell, anchors)
+        formlist: getCardCellForm(card, cards, cardCell)
       })
     }
   }
@@ -303,14 +301,23 @@
       }
     }
 
-    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId) || []
-    let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
+    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId)
 
-    this.setState({
-      actvisible: true,
-      card: card,
-      formlist: getActionForm(card, functip, cards, usefulFields, modules, anchors)
-    })
+    if (cards.subtype === 'basetable') {
+      this.setState({
+        actvisible: true,
+        card: card,
+        formlist: getBaseTableActionForm(card, functip, cards, usefulFields, modules)
+      })
+    } else {
+      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
+  
+      this.setState({
+        actvisible: true,
+        card: card,
+        formlist: getActionForm(card, functip, cards, usefulFields, modules, anchors)
+      })
+    }
   }
 
   /**
@@ -431,13 +438,14 @@
               res.style = {}
             }
           } else if (res.class !== cell.class || res.show !== cell.show || !res.style) {
+            let cl = res.class.replace('border-', '')
             let style = {}
             if (res.show === 'link' || res.show === 'icon') {
-              style.color = color[res.class]
+              style.color = color[cl]
               style.backgroundColor = 'transparent'
             } else {
               style.color = '#ffffff'
-              style.backgroundColor = color[res.class]
+              style.backgroundColor = color[cl]
             }
             res.style = {...res.style, ...style}
           }

--
Gitblit v1.8.0