From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/custom/components/card/balcony/index.jsx | 51 ++++++++++++++++++++++----------------------------- 1 files changed, 22 insertions(+), 29 deletions(-) diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index 313f2b9..43ec2d1 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -18,7 +18,6 @@ BID: PropTypes.any, data: PropTypes.array, config: PropTypes.object, - menuType: PropTypes.any, } state = { @@ -65,7 +64,7 @@ if (_config.wrap.position === 'fixed' || _config.wrap.position === 'absolute') { _config.style.position = _config.wrap.position - _config.style.zIndex = 2 + _config.style.zIndex = 3 _config.style.left = _config.wrap.left || '' _config.style.right = _config.wrap.right || '' _config.style.top = _config.wrap.top || '' @@ -73,7 +72,7 @@ _config.style.transform = _config.wrap.transform || '' _config.style.width = _config.wrap.realwidth || '' } else { - _config.style.zIndex = 2 + _config.style.zIndex = 3 _config.style.left = _config.wrap.left || '' _config.style.right = _config.wrap.right || '' _config.style.top = _config.wrap.top || '' @@ -91,11 +90,8 @@ } return item }) - } else if (_config.wrap.linkType === 'sup') { - _config.wrap.supModule = _config.wrap.supModule.pop() - if (_config.wrap.supControl === 'hidden') { - show = false - } + } else if (_config.wrap.linkType === 'sup' && _config.wrap.supControl === 'hidden') { + show = false } this.setState({ @@ -194,22 +190,30 @@ }) return } else if (result.run_type) { - this.setState({timer}) + let repeats = config.timerRepeats || 0 + this.setState({timer, repeats}) this.timer = setTimeout(() => { - this.timerTask() + this.timerTask(repeats) }, timer) } }) } - timerTask = () => { - const { timer } = this.state + timerTask = (times) => { + const { timer, repeats } = this.state if (!timer) return this.loadData(true) + if (repeats) { + times = times - 1 + if (times <= 0) { + clearTimeout(this.timer) + return + } + } this.timer = setTimeout(() => { - this.timerTask() + this.timerTask(times) }, timer) } @@ -229,20 +233,10 @@ this.loadData() } else { - let supModule = config.wrap.supModule - - btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) - - if (!btn.syncComponentId || btn.syncComponentId !== supModule) { - if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� - if (supModule && BID) { - MKEmitter.emit('reloadData', supModule, BID) - } else { - this.loadData() - } - } else { - this.loadData() - } + if ((position === 'mainline' || position === 'popclose') && config.wrap.supModule && BID) { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + MKEmitter.emit('reloadData', config.wrap.supModule, BID) + } else { + this.loadData() } if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 @@ -310,7 +304,6 @@ } async loadData (hastimer) { - const { menuType } = this.props const { config, arr_field, BID, BData } = this.state if (config.wrap.datatype === 'static') { @@ -334,7 +327,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