From ded0a522a7747fb841719c13c8c35f13cf5cda4c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 十一月 2021 17:28:13 +0800
Subject: [PATCH] 2021-11-15

---
 src/index.js                                                |    3 +
 src/tabviews/custom/components/card/cardcellList/index.jsx  |    2 
 src/tabviews/custom/components/card/prop-card/index.jsx     |   19 ++++++---
 src/tabviews/custom/components/carousel/prop-card/index.jsx |   19 ++++++---
 src/tabviews/custom/components/card/balcony/index.jsx       |   19 ++++++---
 src/menu/components/share/actioncomponent/formconfig.jsx    |    2 
 6 files changed, 41 insertions(+), 23 deletions(-)

diff --git a/src/index.js b/src/index.js
index 13aafa7..c5526ea 100644
--- a/src/index.js
+++ b/src/index.js
@@ -85,6 +85,9 @@
       if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) {
         GLOB.probation = true
       }
+    } else if (options.sysType === 'local') {
+      GLOB.probation = true
+      GLOB.systemType = ''
     } else {
       GLOB.systemType = ''
     }
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 2a8d54c..42d604e 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -578,7 +578,7 @@
       key: 'refreshTab',
       label: '鍒锋柊鑿滃崟',
       initVal: card.refreshTab || [],
-      tooltip: '鎵ц鎴愬姛鍚庢垨鏍囩鍏抽棴鏃讹紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟',
+      tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧姛鑳芥寜閽腑鏍囩鍏抽棴绫诲瀷锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟',
       required: false,
       forbid: isApp || viewType === 'popview',
       options: menulist
diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx
index d29d901..8f0c7e6 100644
--- a/src/tabviews/custom/components/card/balcony/index.jsx
+++ b/src/tabviews/custom/components/card/balcony/index.jsx
@@ -39,7 +39,7 @@
     let _config = fromJS(this.props.config).toJS()
     let _cols = new Map()
 
-    let _data = {}
+    let _data = { $$empty: true }
     let _sync = false
     
     if (_config.setting && _config.wrap.datatype !== 'static') {
@@ -52,8 +52,6 @@
         }
         _sync = false
       }
-    } else {
-      _data = {}
     }
 
     if (_data) {
@@ -138,7 +136,7 @@
     const { sync, config, BID } = this.state
 
     if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
-      let _data = {}
+      let _data = {$$empty: true}
       if (nextProps.data && nextProps.data[config.dataName]) {
         _data = nextProps.data[config.dataName]
         if (_data && Array.isArray(_data)) {
@@ -285,12 +283,12 @@
 
     if (config.wrap.datatype === 'static') {
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData},
+        data: {$$BID: BID || '', $$BData: BData, $$empty: true},
       })
       return
     } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇�
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData},
+        data: {$$BID: BID || '', $$BData: BData, $$empty: true},
       })
       return
     }
@@ -308,7 +306,14 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
-      let _data = result.data && result.data[0] ? result.data[0] : {}
+      let _data = {}
+
+      if (!result.data || !result.data[0]) {
+        _data.$$empty = true
+      } else {
+        _data = result.data[0]
+      }
+
       _data.$$BID = BID || ''
       _data.$$BData = BData
 
diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 2112bc2..cfd30dd 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -641,7 +641,7 @@
     } else if (card.eleType === 'button') {
       let _data = [data]
 
-      if (data.$$type === 'extendCard') {
+      if (data.$$type === 'extendCard' || data.$$empty) {
         _data = []
       } else if (card.$sync) {
         _data = this.props.syncData
diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 92d32a2..2e00b88 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -39,7 +39,7 @@
     let _config = fromJS(this.props.config).toJS()
     let _cols = new Map()
 
-    let _data = {}
+    let _data = { $$empty: true }
     let _sync = false
     
     if (_config.setting && _config.wrap.datatype !== 'static') {
@@ -58,8 +58,6 @@
         }
         _sync = false
       }
-    } else {
-      _data = {}
     }
 
     if (_data) {
@@ -155,7 +153,7 @@
     const { sync, config, BID, BData } = this.state
 
     if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
-      let _data = {}
+      let _data = { $$empty: true }
       if (nextProps.data && nextProps.data[config.dataName]) {
         _data = nextProps.data[config.dataName]
         if (_data && Array.isArray(_data)) {
@@ -286,12 +284,12 @@
 
     if (config.wrap.datatype === 'static') {
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData},
+        data: {$$BID: BID || '', $$BData: BData, $$empty: true},
       })
       return
     } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇�
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData},
+        data: {$$BID: BID || '', $$BData: BData, $$empty: true},
       })
       return
     }
@@ -314,7 +312,14 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
-      let _data = result.data && result.data[0] ? result.data[0] : {}
+      let _data = {}
+
+      if (!result.data || !result.data[0]) {
+        _data.$$empty = true
+      } else {
+        _data = result.data[0]
+      }
+
       _data.$$BID = BID || ''
       _data.$$BData = BData
 
diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index a9622b8..4004576 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -34,7 +34,7 @@
     let _config = fromJS(this.props.config).toJS()
     let _cols = new Map()
 
-    let _data = {}
+    let _data = {$$empty: true}
     let _sync = false
     
     if (_config.setting && _config.wrap.datatype !== 'static') {
@@ -53,8 +53,6 @@
         }
         _sync = false
       }
-    } else {
-      _data = {}
     }
 
     if (_data) {
@@ -121,7 +119,7 @@
     const { sync, config, BID, BData } = this.state
 
     if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
-      let _data = {}
+      let _data = {$$empty: true}
       if (nextProps.data && nextProps.data[config.dataName]) {
         _data = nextProps.data[config.dataName]
         if (_data && Array.isArray(_data)) {
@@ -192,12 +190,12 @@
 
     if (config.wrap.datatype === 'static') {
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData}
+        data: {$$BID: BID || '', $$BData: BData, $$empty: true}
       })
       return
     } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇�
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData}
+        data: {$$BID: BID || '', $$BData: BData, $$empty: true}
       })
       return
     }
@@ -218,7 +216,14 @@
 
     let result = await Api.genericInterface(param)
     if (result.status) {
-      let _data = result.data && result.data[0] ? result.data[0] : {}
+      let _data = {}
+
+      if (!result.data || !result.data[0]) {
+        _data.$$empty = true
+      } else {
+        _data = result.data[0]
+      }
+
       _data.$$BID = BID || ''
       _data.$$BData = BData || ''
 

--
Gitblit v1.8.0