From 53b9fb93d0376eb02bb996935f1720b4e95cd897 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 十月 2022 14:41:06 +0800 Subject: [PATCH] 2022-10-12 --- src/tabviews/custom/components/code/sand-box/index.jsx | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/code/sand-box/index.jsx b/src/tabviews/custom/components/code/sand-box/index.jsx index 0938216..66338af 100644 --- a/src/tabviews/custom/components/code/sand-box/index.jsx +++ b/src/tabviews/custom/components/code/sand-box/index.jsx @@ -10,11 +10,9 @@ class SandBoxComponent extends Component { static propTpyes = { - BID: PropTypes.any, // 鐖剁骇Id data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -27,13 +25,25 @@ } UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata } = this.props let _config = fromJS(this.props.config).toJS() let _data = {} let _sync = false + + 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 || '' + } - if (_config.setting && _config.wrap.datatype !== 'static') { + if (_config.wrap.datatype !== 'static') { _sync = _config.setting.sync === 'true' if (_sync && data) { @@ -124,7 +134,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static') { @@ -153,7 +163,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { -- Gitblit v1.8.0