From 400fee62fb40006a9839f1c3a8244b82566b5057 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 08 五月 2025 16:30:39 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/custom/components/card/double-data-card/index.jsx |   68 ++++++++++++++++++++++++++++-----
 1 files changed, 57 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx
index 8ee5097..223d05d 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -116,6 +116,12 @@
     })
 
     _config.subcards = null
+
+    if (!_config.wrap.cardType) {
+      _config.wrap.selStyle = 'none'
+      _config.wrap.selected = 'false'
+      _config.wrap.pickup = 'false'
+    }
     
     let selected = 'false'
     if (_config.wrap.selected === 'always' || _config.wrap.selected === 'init' || _config.wrap.selected === 'sign') {
@@ -124,26 +130,29 @@
       _config.wrap.selected = 'false'
     }
 
-    _config.wrap.selStyle = _config.wrap.selStyle || 'active'
+    _config.wrap.selStyle = _config.wrap.selStyle || 'check'
     _config.wrap.pagestyle = _config.wrap.pagestyle || 'page'
 
-    _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}`
+    _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}`
 
     if (_config.wrap.zHeight || _config.wrap.minWidth) {
+      _config.wrap.zoomStyle = {
+        maxHeight: 'none',
+        '--mk-data-zoom-width': _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%'
+      }
+
       if (_config.wrap.zHeight) {
         if (_config.wrap.zHeight <= 100) {
           if (_config.wrap.zHeight < 0) {
-            _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+            _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+            _config.wrap.zoomStyle.minHeight = '100px'
           } else {
-            _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+            _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh'
           }
+        } else {
+          _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px'
         }
         _config.wrap.wrapClass += ' fix-height'
-      }
-      _config.wrap.minWidth = _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%'
-      _config.wrap.zoomStyle = {
-        maxHeight: _config.wrap.zHeight || 'none',
-        '--mk-data-zoom-width': _config.wrap.minWidth
       }
     } else {
       _config.wrap.zoomStyle = null
@@ -175,8 +184,10 @@
       })
     }
 
-    _config.setting.sub_field = subconfig.columns.map(col => col.field).join(',')
-    _config.setting.all_field = _config.setting.arr_field + ',' + _config.setting.sub_field
+    if (_config.setting.subdata !== 'sub_data_string') {
+      _config.setting.sub_field = subconfig.columns.map(col => col.field).join(',')
+      _config.setting.all_field = _config.setting.arr_field + ',' + _config.setting.sub_field
+    }
 
     let pageOptions = ['10', '25', '50', '100', '500', '1000']
 
@@ -193,6 +204,10 @@
       if (_config.wrap.maxPageSize) {
         pageOptions = pageOptions.filter(item => item <= _config.wrap.maxPageSize)
       }
+    }
+
+    if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') {
+      _config.setting.onload = 'false'
     }
 
     this.setState({
@@ -274,6 +289,10 @@
 
             delete item[config.setting.subdata]
 
+            if (config.setting.subdata === 'sub_data_string') {
+              _children = this.parseSubData(_children)
+            }
+
             _children.forEach((cell, i) => {
               cell.key = i
               cell.$$uuid = cell[config.setting.subKey] || ''
@@ -332,6 +351,21 @@
         this.loadData()
       }, config.setting.delay || 0)
     }
+  }
+
+  parseSubData = (data) => {
+    try {
+      data = JSON.parse(data)
+      if (typeof(data) !== 'object') {
+        data = []
+      } else if (!Array.isArray(data)) {
+        data = [data]
+      }
+    } catch(e) {
+      console.warn('Data parsing error.')
+      data = []
+    }
+    return data
   }
 
   autoExec = (times) => {
@@ -650,6 +684,10 @@
             let _children = item[config.setting.subdata]
 
             delete item[config.setting.subdata]
+
+            if (config.setting.subdata === 'sub_data_string') {
+              _children = this.parseSubData(_children)
+            }
             
             _children.forEach((cell, i) => {
               cell.key = i
@@ -690,6 +728,10 @@
             let _children = item[config.setting.subdata]
 
             delete item[config.setting.subdata]
+
+            if (config.setting.subdata === 'sub_data_string') {
+              _children = this.parseSubData(_children)
+            }
 
             _children.forEach((cell, i) => {
               cell.key = i
@@ -817,6 +859,10 @@
 
               delete _data[config.setting.subdata]
 
+              if (config.setting.subdata === 'sub_data_string') {
+                _children = this.parseSubData(_children)
+              }
+
               _children.forEach((cell, i) => {
                 cell.key = i
                 cell.$$uuid = cell[config.setting.subKey] || ''

--
Gitblit v1.8.0