From 4a245839597731db8e787535329995e4fccfb47c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 20 二月 2023 11:57:55 +0800
Subject: [PATCH] 2023-02-20

---
 src/tabviews/custom/components/card/cardcellList/index.jsx       |    4 ++++
 src/tabviews/custom/components/card/double-data-card/index.scss  |    9 ++++++++-
 src/menu/components/share/actioncomponent/dragaction/card.jsx    |    2 +-
 src/menu/components/share/actioncomponent/formconfig.jsx         |    2 +-
 src/tabviews/custom/components/card/double-data-card/index.jsx   |   10 ++++++----
 src/menu/components/card/cardcellcomponent/elementform/index.jsx |    2 +-
 src/menu/components/card/doublecardcomponent/index.scss          |    6 ++++++
 src/menu/components/card/doublecardcomponent/index.jsx           |    5 ++++-
 8 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index 8d23924..2289193 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -158,7 +158,7 @@
       }
     } else if (eleType === 'icon') {
       if (datatype === 'dynamic') {
-        _options.push('field')
+        _options.push('field', 'noValue')
       } else {
         _options.push('icon')
       }
diff --git a/src/menu/components/card/doublecardcomponent/index.jsx b/src/menu/components/card/doublecardcomponent/index.jsx
index 86cdc9a..f6d1544 100644
--- a/src/menu/components/card/doublecardcomponent/index.jsx
+++ b/src/menu/components/card/doublecardcomponent/index.jsx
@@ -255,16 +255,19 @@
     }
 
     let checkAll = ''
+    let mainBox = ''
     if (cards.wrap.selStyle === 'check') {
       checkAll = 'mk-checkable'
     } else if (cards.wrap.selStyle === 'check square') {
       checkAll = 'mk-checkable square'
+    } else if (card.setting.display !== 'default' && card.setting.controlIcon === 'left') {
+      mainBox = 'flex-card '
     }
 
     return (
       <Col span={card.setting.width || 24}>
         <div className="card-item-wrap" style={_wrapStyle}>
-          <div className={`card-item ${card.setting.btnControl || ''} ${checkAll} mk-${card.setting.display}`} style={_style} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
+          <div className={`card-item ${card.setting.btnControl || ''} ${checkAll} mk-${card.setting.display} ${mainBox}`} style={_style} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
             <span className="circle-select"></span>
             {card.setting.controlIcon === 'left' ? <PlusSquareOutlined /> : <UpOutlined />}
             <div className="card-control" onDoubleClick={(e) => e.stopPropagation()}>
diff --git a/src/menu/components/card/doublecardcomponent/index.scss b/src/menu/components/card/doublecardcomponent/index.scss
index 93f72bf..352108a 100644
--- a/src/menu/components/card/doublecardcomponent/index.scss
+++ b/src/menu/components/card/doublecardcomponent/index.scss
@@ -99,6 +99,12 @@
     flex: 1;
   }
 }
+.card-item.flex-card {
+  display: flex;
+  .model-menu-card-cell-list {
+    flex: 1;
+  }
+}
 .card-item.mk-checkable.square {
   .circle-select {
     border-radius: 0;
diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx
index 0059c8d..3163444 100644
--- a/src/menu/components/share/actioncomponent/dragaction/card.jsx
+++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx
@@ -52,7 +52,7 @@
   let _style = resetStyle(card.style)
   let _class = ''
   let show = card.show
-  if (type === 'datacard') {
+  if (type === 'datacard' || type === 'dualdatacard') {
     _style = null
     _class = 'swiper swiper-' + card.color
     show = 'button'
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index b5e6155..2a0179a 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -22,7 +22,7 @@
 
   if (card.eleType === 'button') {
     type = 'card'
-  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') {
+  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard' || config.subtype === 'dualdatacard') {
     type = 'datacard'
   } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') {
     type = 'chart'
diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 993d189..5a3a3e1 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -475,6 +475,10 @@
           icon = card.icon
         }
 
+        if (!icon && card.noValue === 'hide') { // 绌哄�奸殣钘�
+          return null
+        }
+
         if (!height) { // 鍏煎
           let fontSize = 14
           let lineHeight = 1.5
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 b3ee79f..77a5ef3 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -854,12 +854,14 @@
     }
 
     let checkAll = ''
+    let mainBox = ''
     if (config.wrap.selStyle && config.wrap.selStyle.indexOf('check') > -1) {
       if (selectedData.length > 0) {
         checkAll = selectedData.length < data.length ? ' half' : ' whole'
       }
+    } else if (card.setting.display !== 'default' && card.setting.controlIcon === 'left') {
+      mainBox = 'flex-card '
     }
-
     return (
       <div className="custom-data-card-box" id={'anchor' + config.uuid} style={config.style}>
         {loading ?
@@ -890,7 +892,7 @@
               </Col>
             ))}
             {data && data.map((item, index) => {
-              let className = `card-item-wrap mk-card `
+              let className = 'card-item-wrap mk-card ' + mainBox
               let subClass = 'mk-unfold'
               let unfold = true
               if (config.wrap.parity === 'true') {
@@ -899,7 +901,7 @@
                 }
               }
               if (item.$disabled) {
-                className = 'mk-disabled'
+                className = 'mk-disabled ' + mainBox
               } else if (activeKey === index) {
                 className += 'active'
               } else if (selectKeys.indexOf(index) > -1) {
@@ -925,7 +927,7 @@
                       {card.setting.display !== 'default' && card.setting.controlIcon !== 'left' ? <UpOutlined className={subClass} onClick={(e) => this.changeUnfold(e, index, subClass)}/> : null}
                     </CardItem>
                     <div className={'sub-card-wrap ' + subClass}>
-                      {item.children.map((cell, index) => <Col key={'d' + index} span={subcard.setting.width || 24}>
+                      {item.children.map((cell, index) => <Col key={'sub' + index} span={subcard.setting.width || 24}>
                         <CardItem card={subcard} cards={subconfig} data={cell} />
                       </Col>)}
                     </div>
diff --git a/src/tabviews/custom/components/card/double-data-card/index.scss b/src/tabviews/custom/components/card/double-data-card/index.scss
index 6d9583a..8200674 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.scss
+++ b/src/tabviews/custom/components/card/double-data-card/index.scss
@@ -226,7 +226,6 @@
       background: var(--mk-sys-color);
     }
     .card-item-box {
-      // width: 100%;
       display: flex;
     }
     .card-cell-list {
@@ -285,6 +284,14 @@
       transition: height 0.3s;
     }
   }
+  .card-item-wrap.flex-card {
+    >.card-item-box:first-child {
+      display: flex;
+      .card-cell-list {
+        flex: 1;
+      }
+    }
+  }
 }
 .custom-data-card-box::-webkit-scrollbar {
   width: 7px;

--
Gitblit v1.8.0