From ddddb07002201150da9551875c25e75499563249 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 一月 2021 15:22:55 +0800
Subject: [PATCH] 2021-01-15

---
 src/menu/components/card/data-card/index.jsx |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 5ced615..37cebdb 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -52,16 +52,17 @@
         pageable: true,    // 缁勪欢灞炴�� - 鏄惁鍙垎椤�
         switchable: true,  // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹�
         dataName: card.dataName || '',
-        width: 24,
+        width: card.width || 24,
         name: card.name,
         subtype: card.subtype,
         setting: { interType: 'system' },
-        wrap: { name: card.name, width: 24, title: '', pagestyle: 'page', switch: 'false' },
+        wrap: { name: card.name, width: card.width || 24, title: '', pagestyle: 'page', switch: 'false' },
         style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' },
         headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' },
         columns: [],
         scripts: [],
         action: [],
+        search: [],
         btnlog: [],
         subcards: [{
           uuid: Utils.getuuid(),
@@ -80,8 +81,8 @@
       if (card.config) {
         let config = fromJS(card.config).toJS()
 
-        _card.setting = config.setting
         _card.wrap = config.wrap
+        _card.wrap.name = card.name
         _card.style = config.style
         _card.headerStyle = config.headerStyle
 
@@ -97,15 +98,11 @@
           })
           return scard
         })
-        _card.columns = config.columns.map(col => {
-          col.uuid = Utils.getuuid()
-          return col
-        })
-        _card.scripts = config.scripts.map(col => {
-          col.uuid = Utils.getuuid()
-          return col
-        })
         _card.action = config.action.map(col => {
+          col.uuid = Utils.getuuid()
+          return col
+        })
+        _card.search = config.search.map(col => {
           col.uuid = Utils.getuuid()
           return col
         })
@@ -118,6 +115,7 @@
     } else {
       card.action = card.action || [] // 鍏煎
       card.search = card.search || [] // 鍏煎
+
       this.setState({
         card: fromJS(card).toJS()
       })

--
Gitblit v1.8.0