From fa381753ef2a2b25b1c0722549ac17e333da79be Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 22:50:54 +0800 Subject: [PATCH] 2022-09-06 --- src/tabviews/custom/components/editor/braft-editor/index.jsx | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/tabviews/custom/components/editor/braft-editor/index.jsx b/src/tabviews/custom/components/editor/braft-editor/index.jsx index 437de06..e8f4f4b 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.jsx +++ b/src/tabviews/custom/components/editor/braft-editor/index.jsx @@ -14,11 +14,9 @@ class BraftEditorContent extends Component { static propTpyes = { - BID: PropTypes.any, // 鐖剁骇Id data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -30,11 +28,23 @@ } 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') { _sync = _config.setting.sync === 'true' @@ -122,7 +132,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static') { @@ -151,7 +161,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