From e4666c46c685ec7eabff25af9890d54c0ff2952b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 16 六月 2023 17:55:56 +0800 Subject: [PATCH] 2023-06-16 --- src/tabviews/custom/components/card/data-card/index.jsx | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 9b84661..7005107 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -215,6 +215,7 @@ MKEmitter.addListener('mkCheckAll', this.mkCheckAll) MKEmitter.addListener('resetSelectLine', this.resetParentParam) MKEmitter.addListener('queryModuleParam', this.queryModuleParam) + MKEmitter.addListener('refreshLineData', this.refreshLineData) MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) if (config.timer) { @@ -305,6 +306,7 @@ MKEmitter.removeListener('mkCheckAll', this.mkCheckAll) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) + MKEmitter.removeListener('refreshLineData', this.refreshLineData) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) this.timer && this.timer.stop() @@ -377,6 +379,22 @@ } } + refreshLineData = (menuId, btn, uuid, count) => { + const { config, data } = this.state + + if (config.uuid !== menuId) return + + let _data = fromJS(data).toJS().forEach(item => { + if (item.$$uuid === uuid) { + item[btn.field] = count + } + }) + + this.setState({ + data: _data + }) + } + checkTopLine = (id) => { const { config, data, selected } = this.state -- Gitblit v1.8.0