From f07c42a322f41e14ef5b1bf8f2fd66fc5d338cdd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 六月 2023 18:17:09 +0800
Subject: [PATCH] 2023-06-28

---
 src/menu/components/group/groupcomponents/index.jsx |   53 +++++++----------------------------------------------
 1 files changed, 7 insertions(+), 46 deletions(-)

diff --git a/src/menu/components/group/groupcomponents/index.jsx b/src/menu/components/group/groupcomponents/index.jsx
index b35112f..5754e85 100644
--- a/src/menu/components/group/groupcomponents/index.jsx
+++ b/src/menu/components/group/groupcomponents/index.jsx
@@ -5,7 +5,6 @@
 import { Empty, Modal } from 'antd'
 
 import Utils from '@/utils/utils.js'
-import MKEmitter from '@/utils/events.js'
 import Card from './card'
 import './index.scss'
 
@@ -38,48 +37,9 @@
   const deleteCard = (id) => {
     const { card } = findCard(id)
 
-    let uuids = []
-    if (card.action && card.action.length) {
-      card.action.forEach(act => {
-        if (!act.origin) {
-          uuids.push(act.uuid)
-        }
-      })
-    }
-    if (card.type === 'card') {
-      card.subcards.forEach(_card => {
-        _card.elements && _card.elements.forEach(cell => {
-          if (cell.eleType === 'button') {
-            uuids.push(cell.uuid)
-          }
-        })
-        _card.backElements && _card.backElements.forEach(cell => {
-          if (cell.eleType === 'button') {
-            uuids.push(cell.uuid)
-          }
-        })
-      })
-    } else if (card.type === 'table' && card.subtype === 'tablecard') {
-      card.subcards.forEach(_card => {
-        _card.elements && _card.elements.forEach(cell => {
-          if (cell.eleType === 'button') {
-            uuids.push(cell.uuid)
-          }
-        })
-      })
-    } else if (card.type === 'table' && card.subtype === 'normaltable') {
-      card.cols && card.cols.forEach(col => {
-        if (col.type !== 'action') return
-        col.elements && col.elements.forEach(cell => {
-          uuids.push(cell.uuid)
-        })
-      })
-    }
-
     confirm({
       title: `纭畾鍒犻櫎銆�${card.name}銆嬪悧锛焋,
       onOk() {
-        MKEmitter.emit('delButtons', uuids)
         handleList({...config, components: cards.filter(item => item.uuid !== card.uuid)})
       },
       onCancel() {}
@@ -91,7 +51,7 @@
     drop(item) {
       if (item.hasOwnProperty('originalIndex') || item.added) {
         return
-      } else if (item.component === 'tabs' || item.component === 'search' || item.component === 'group') { // 鍒嗙粍涓笉鍙坊鍔犳爣绛鹃〉鎴栨悳绱�
+      } else if (['login', 'navbar', 'topbar', 'tabs', 'search', 'group', 'menubar'].includes(item.component)) {
         return
       }
 
@@ -99,7 +59,8 @@
 
       let name = ''
       let names = {
-        bbar: '鏌辩姸鍥�',
+        bar: '鏌辩姸鍥�',
+        chart: '鍥捐〃',
         line: '鎶樼嚎鍥�',
         tabs: '鏍囩缁�',
         pie: '楗煎浘',
@@ -113,6 +74,10 @@
         dashboard: '浠〃鐩�',
         scatter: '鏁g偣鍥�',
         tree: '鏍戝舰鍒楄〃',
+        balcony: '娴姩鍗�',
+        timeline: '鏃堕棿杞�',
+        antvG6: '鏍戝浘',
+        antvX6: '娴佺▼鍥�',
         card: '鍗$墖'
       }
       let i = 1
@@ -127,15 +92,11 @@
       
       let newcard = {
         uuid: Utils.getuuid(),
-        tabId: config.uuid,
-        parentId: config.parentId,
         type: item.component,
         subtype: item.subtype,
         config: item.config,
         width: item.width || 24,
-        dataName: Utils.getdataName(),
         name: name,
-        floor: config.floor || 1, // 缁勪欢鐨勫眰绾�
         isNew: true               // 鏂版坊鍔犳爣蹇楋紝鐢ㄤ簬鍒濆鍖�
       }
 

--
Gitblit v1.8.0