From 1a11f7115e61c548f9ffc77d0a9e504307ca71b2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 24 八月 2021 18:37:20 +0800 Subject: [PATCH] 2021-08-24 --- src/tabviews/custom/components/card/prop-card/index.jsx | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 0cfd2c5..d00a06d 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -32,7 +32,8 @@ activeKey: '', // 閫変腑鏁版嵁 sync: false, // 鏄惁缁熶竴璇锋眰鏁版嵁 data: {}, // 鏁版嵁 - timer: null // 瀹氭椂鍣ㄦ椂闂撮棿闅� + timer: null, // 瀹氭椂鍣ㄦ椂闂撮棿闅� + BData: null } UNSAFE_componentWillMount () { @@ -240,12 +241,12 @@ } } - resetParentParam = (MenuID, id) => { + resetParentParam = (MenuID, id, data) => { const { config } = this.state if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return if (id !== this.state.BID) { - this.setState({ BID: id }, () => { + this.setState({ BID: id, BData: data }, () => { this.loadData() }) } @@ -261,16 +262,16 @@ async loadData (hastimer) { const { mainSearch, menuType } = this.props - const { config, arr_field, BID } = this.state + const { config, arr_field, BID, BData } = this.state if (config.wrap.datatype === 'static') { this.setState({ - data: {$$BID: BID || ''}, + data: {$$BID: BID || '', $$BData: BData}, }) return } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� this.setState({ - data: {$$BID: BID || ''}, + data: {$$BID: BID || '', $$BData: BData}, }) return } @@ -295,6 +296,7 @@ if (result.status) { let _data = result.data && result.data[0] ? result.data[0] : {} _data.$$BID = BID || '' + _data.$$BData = BData this.setState({ activeKey: '', -- Gitblit v1.8.0