From 02822f7c9b50bf1b58c11f9820cff5b9e41a1a59 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 20 二月 2023 16:19:17 +0800
Subject: [PATCH] 2023-02-20

---
 src/tabviews/custom/components/card/double-data-card/index.scss |    4 ++++
 src/views/billprint/index.jsx                                   |    7 +++++++
 src/tabviews/custom/components/card/double-data-card/index.jsx  |    5 +++--
 src/pc/menushell/card.jsx                                       |    3 +++
 src/tabviews/custom/components/card/data-card/index.scss        |    4 ++++
 5 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/pc/menushell/card.jsx b/src/pc/menushell/card.jsx
index e003785..7cdc671 100644
--- a/src/pc/menushell/card.jsx
+++ b/src/pc/menushell/card.jsx
@@ -31,6 +31,7 @@
 const Timeline = asyncComponent(() => import('@/menu/components/timeline/normal-timeline'))
 const AntvG6 = asyncComponent(() => import('@/menu/components/chart/antv-G6'))
 const Iframe = asyncComponent(() => import('@/menu/components/iframe'))
+const DoubleDataCard = asyncComponent(() => import('@/menu/components/card/double-data-card'))
 
 const Card = ({ id, card, moveCard, findCard, delCard, unGroup, updateConfig }) => {
   const originalIndex = findCard(id).index
@@ -99,6 +100,8 @@
       return (<DataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'card' && card.subtype === 'propcard') {
       return (<PropCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
+    } else if (card.type === 'card' && card.subtype === 'dualdatacard') {
+      return (<DoubleDataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'carousel' && card.subtype === 'datacard') {
       return (<CarouselDataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
     } else if (card.type === 'carousel' && card.subtype === 'propcard') {
diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss
index f329033..820b993 100644
--- a/src/tabviews/custom/components/card/data-card/index.scss
+++ b/src/tabviews/custom/components/card/data-card/index.scss
@@ -197,6 +197,9 @@
     .circle-select {
       border-radius: 0!important;
     }
+    .circle-select.half::after {
+      border-radius: 0px;
+    }
   }
   .data-zoom.check {
     .mk-card.active, .mk-card.selected {
@@ -221,6 +224,7 @@
       left: 4px;
       content: ' ';
       display: block;
+      border-radius: 8px;
       width: 8px;
       height: 8px;
       background: var(--mk-sys-color);
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 77a5ef3..8bb925b 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -20,7 +20,6 @@
 
 class DoubleDataCard extends Component {
   static propTpyes = {
-    data: PropTypes.array,           // 缁熶竴鏌ヨ鏁版嵁
     config: PropTypes.object,        // 缁勪欢閰嶇疆淇℃伅
     mainSearch: PropTypes.any,       // 澶栧眰鎼滅储鏉′欢
   }
@@ -50,8 +49,9 @@
   loaded = false
 
   UNSAFE_componentWillMount () {
-    let _config = fromJS(this.props.config).toJS()
+    const { config } = this.props
 
+    let _config = fromJS(config).toJS()
     let BID = ''
     let BData = ''
 
@@ -862,6 +862,7 @@
     } 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 ?
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 8200674..02ad6b2 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.scss
+++ b/src/tabviews/custom/components/card/double-data-card/index.scss
@@ -197,6 +197,9 @@
     .circle-select {
       border-radius: 0!important;
     }
+    .circle-select.half::after {
+      border-radius: 0px;
+    }
   }
   .data-zoom.check {
     .mk-card.active, .mk-card.selected {
@@ -221,6 +224,7 @@
       left: 4px;
       content: ' ';
       display: block;
+      border-radius: 8px;
       width: 8px;
       height: 8px;
       background: var(--mk-sys-color);
diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 8b1b229..f69b43a 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -21,6 +21,7 @@
 const AntvScatter = asyncComponent(() => import('@/tabviews/custom/components/chart/antv-scatter'))
 const DataCard = asyncComponent(() => import('@/tabviews/custom/components/card/data-card'))
 const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card'))
+const DoubleDataCard = asyncComponent(() => import('@/tabviews/custom/components/card/double-data-card'))
 const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card'))
 const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table'))
 const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
@@ -837,6 +838,12 @@
             <PropCard config={item} initdata={item.data} mainSearch={[]} />
           </Col>
         )
+      } else if (item.type === 'card' && item.subtype === 'dualdatacard') {
+        return (
+          <Col span={item.width} style={style} key={item.uuid}>
+            <DoubleDataCard config={item} mainSearch={[]}/>
+          </Col>
+        )
       } else if (item.type === 'card' && item.subtype === 'tablecard') {
         return (
           <Col span={item.width} style={style} key={item.uuid}>

--
Gitblit v1.8.0