From 49c034a005f22ad6c8a3e0c9828de3176190d06a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 16 六月 2023 18:09:08 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/components/card/table-card/index.jsx | 3 ++- src/tabviews/custom/components/table/edit-table/index.jsx | 6 ++++-- src/tabviews/custom/components/card/double-data-card/index.jsx | 3 ++- src/tabviews/custom/components/table/normal-table/index.jsx | 6 ++++-- src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 3 ++- src/tabviews/custom/components/card/data-card/index.jsx | 3 ++- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 7005107..1d2e850 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -384,10 +384,11 @@ if (config.uuid !== menuId) return - let _data = fromJS(data).toJS().forEach(item => { + let _data = fromJS(data).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) this.setState({ diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 38f7251..3a19ad3 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -332,7 +332,7 @@ if (config.uuid !== menuId) return - let _data = fromJS(data).toJS().forEach(item => { + let _data = fromJS(data).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } @@ -341,6 +341,7 @@ cell[btn.field] = count } }) + return item }) this.setState({ diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index e8d7904..f453ff7 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -222,10 +222,11 @@ if (config.uuid !== menuId) return - let _data = fromJS(data).toJS().forEach(item => { + let _data = fromJS(data).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) this.setState({ diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index f21a620..f0cfdb3 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -507,15 +507,17 @@ if (config.uuid !== menuId) return - let _data = fromJS(this.state.data).toJS().forEach(item => { + let _data = fromJS(this.state.data).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) - let _selectedData = fromJS(this.state.selectedData).toJS().forEach(item => { + let _selectedData = fromJS(this.state.selectedData).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) this.setState({ diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index 6a52bc5..dc99a3a 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -611,15 +611,17 @@ if (config.uuid !== menuId) return - let _data = fromJS(this.state.data).toJS().forEach(item => { + let _data = fromJS(this.state.data).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) - let _selectedData = fromJS(this.state.selectedData).toJS().forEach(item => { + let _selectedData = fromJS(this.state.selectedData).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) this.setState({ diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index d75ebe9..5126d9e 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -215,10 +215,11 @@ if (config.uuid !== menuId) return - let _data = fromJS(data).toJS().forEach(item => { + let _data = fromJS(data).toJS().map(item => { if (item.$$uuid === uuid) { item[btn.field] = count } + return item }) this.setState({ -- Gitblit v1.8.0