From c45a375e5b4ce0e33c7fc8a1aecdad67d60acc9e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 01 三月 2021 15:09:06 +0800
Subject: [PATCH] 2021-03-01

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

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 5ced615..1ce4fff 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -33,7 +33,7 @@
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,
     back: false
   }
@@ -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()
       })
@@ -297,7 +295,7 @@
     const { card } = this.state
     let btn = fromJS(item).toJS()
 
-    if (btn.OpenType === 'pop') {
+    if (btn.OpenType === 'pop' || btn.execMode === 'pop') {
       if (!btn.modal) {
         btn.modal = {
           setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },

--
Gitblit v1.8.0