From 0eb129a9beddbb86ae74d7106a8e60823206b8d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 14 十二月 2023 11:29:15 +0800
Subject: [PATCH] 2023-12-14

---
 src/tabviews/custom/components/card/double-data-card/index.jsx |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 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 bda5137..e65fe19 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -36,7 +36,7 @@
     loading: false,            // 鏁版嵁鍔犺浇鐘舵��
     card: null,                // 鍗$墖璁剧疆
     data: [],                // 鏁版嵁
-    total: null,
+    total: 0,
     precards: [],
     nextcards: [],
     selected: 'false',
@@ -129,6 +129,12 @@
 
     _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}`
 
+    if (_config.wrap.shifting === 'true') {
+      _config.wrap.shifting = 'shifting'
+    } else {
+      _config.wrap.shifting = ''
+    }
+    
     let wrapStyle = null
     let subcard = fromJS(_card).toJS()
     let subconfig = fromJS(_config).toJS()
@@ -336,9 +342,9 @@
 
     let supModule = config.setting.supModule
 
-    if (position === 'line') {
+    if (position === 'line' || position === 'line_grid') {
       if (lines && lines.length === 1) {
-        this.loadLinedata(lines[0].$$parentId || lines[0].$$uuid)
+        this.loadLinedata(lines[0].$$parentId || lines[0].$$uuid, position)
       } else {
         this.loadData(id)
       }
@@ -771,7 +777,7 @@
   /**
    * @description 鑾峰彇鍗曡鏁版嵁
    */ 
-  async loadLinedata (id) {
+  async loadLinedata (id, position) {
     const { config, pageIndex, pageSize, search, BID, BData, orderBy } = this.state
 
     if (config.forbidLine) {
@@ -803,6 +809,11 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
+      if (position === 'line_grid' && (!result.data || !result.data[0])) {
+        this.loadData()
+        return
+      }
+
       let data = fromJS(this.state.data).toJS()
       let selectedData = fromJS(this.state.selectedData).toJS()
       let selectKeys = fromJS(this.state.selectKeys).toJS()
@@ -1130,7 +1141,7 @@
     }
 
     return (
-      <div className="double-data-card-box" id={'anchor' + config.uuid} style={config.style}>
+      <div className={'double-data-card-box ' + config.wrap.shifting} id={'anchor' + config.uuid} style={config.style}>
         {loading ?
           <div className="loading-mask">
             {data.length ? <div className="ant-spin-blur"></div> : null}

--
Gitblit v1.8.0