From 9be28daa8b377b054127fd78254dfa63d29e3a7b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 六月 2024 15:08:13 +0800
Subject: [PATCH] 2024-06-06

---
 src/tabviews/custom/components/card/data-card/index.jsx |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 1dca646..1e25f5f 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -188,6 +188,23 @@
       }
     }
 
+    if (_config.wrap.zHeight) {
+      if (_config.wrap.zHeight <= 100) {
+        if (_config.wrap.zHeight < 0) {
+          _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+        } else {
+          _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+        }
+      }
+
+      if (_config.style) {
+        delete _config.style.height
+      }
+      _config.wrap.layout += ' fix-height'
+    } else {
+      _config.wrap.zHeight = 'none'
+    }
+
     this.setState({
       pageSize: _config.setting.pageSize || 10,
       pageOptions,
@@ -750,6 +767,10 @@
       if (config.setting.$hasSyncModule) {
         MKEmitter.emit('syncBalconyData', config.uuid, [], false)
       }
+      if (config.$hasTopModule) {
+        window.GLOB.CacheData.set(config.uuid + 'tb', { $$empty: true, $$uuid: '' })
+        MKEmitter.emit('mkPublicData', config.uuid + 'tb', { $$empty: true, $$uuid: '' })
+      }
       return
     }
 
@@ -851,6 +872,11 @@
         pickup: false,
         loading: false
       })
+
+      if (config.$hasTopModule) {
+        window.GLOB.CacheData.set(config.uuid + 'tb', data[0] || { $$empty: true, $$uuid: '' })
+        MKEmitter.emit('mkPublicData', config.uuid + 'tb', data[0] || { $$empty: true, $$uuid: '' })
+      }
 
       if (config.timer && config.clearField && result.data && result.data[0]) {
         let vals = (config.clearValue || '').split(',')
@@ -1199,7 +1225,7 @@
         {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /></div> : null}
         <div className={`data-zoom ${config.wrap.wrapClass}`}>
           {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null}
-          <Row className={'card-row-list ' + config.wrap.layout}>
+          <Row className={'card-row-list ' + config.wrap.layout} style={{maxHeight: config.wrap.zHeight}}>
             {precards.map((item, index) => (
               <Col key={'pre' + index} className="extend-card" style={item.wStyle} span={item.setting.width || 6}>
                 {item.setting.cardRole === 'header' ? <TableHeader card={item} data={extendData} refresh={this.refreshByHeader}>

--
Gitblit v1.8.0