From 5d41cbe3722ff40b65bfa4de82d62a79f171f5a5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 八月 2022 17:41:55 +0800
Subject: [PATCH] 2022-08-15

---
 src/tabviews/custom/components/table/edit-table/index.jsx |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx
index 36170d3..893c5c0 100644
--- a/src/tabviews/custom/components/table/edit-table/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/index.jsx
@@ -18,7 +18,6 @@
 
 class EditableTable extends Component {
   static propTpyes = {
-    BID: PropTypes.any,              // 鐖剁骇Id
     config: PropTypes.object,        // 缁勪欢閰嶇疆淇℃伅
     mainSearch: PropTypes.any,       // 澶栧眰鎼滅储鏉′欢
   }
@@ -48,12 +47,23 @@
    * 1銆� initdata 涓烘墦鍗版椂浣跨敤鐨勬暟鎹泦
    */
   UNSAFE_componentWillMount () {
-    const { BID, BData } = this.props
     let _config = fromJS(this.props.config).toJS()
     let _cols = new Map()
     let setting = {..._config.setting, ..._config.wrap}
     setting.tableId = Utils.getuuid()
 
+    let BID = ''
+    let BData = ''
+
+    if (_config.setting.supModule) {
+      BData = window.GLOB.CacheData.get(_config.setting.supModule)
+    } else {
+      BData = window.GLOB.CacheData.get(_config.$pageId)
+    }
+    if (BData) {
+      BID = BData.$BID || ''
+    }
+
     _config.submit.style = _config.submit.style || {}
     _config.submit.wrapStyle = {}
     _config.submit.hasAction = _config.action.length > 0

--
Gitblit v1.8.0