From 42fae277ae5ebe794fc070bf38482a919eb661fc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 25 十一月 2020 14:36:02 +0800 Subject: [PATCH] 2020-11-25 --- src/templates/calendarconfig/index.jsx | 19 ++++++------------- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx index d0ebf5a..5929c3f 100644 --- a/src/templates/calendarconfig/index.jsx +++ b/src/templates/calendarconfig/index.jsx @@ -52,7 +52,6 @@ originConfig: null, // 鍘熼厤缃� tabviews: [], // 鎵�鏈夋爣绛鹃〉 activeKey: '0', // 榛樿灞曞紑鍩烘湰淇℃伅 - pasteContent: null, // 绮樿创鍐呭 openEdition: '', // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣� mockdata: [], // 娴嬭瘯鏁版嵁 } @@ -687,13 +686,12 @@ config: res.config }) } else if (res.type === 'paste') { - this.setState({ - pasteContent: res.content - }, () => { - this.setState({ - pasteContent: null - }) - }) + let config = fromJS(this.state.config).toJS() + if (res.content.copyType === 'search') { + config.search.push(res.content) + } + + this.setState({config}) } } @@ -795,14 +793,11 @@ config={config} MenuID={menu.MenuID} tableFields={this.state.tableFields} - permFuncField={this.props.permFuncField} updateConfig={this.updateconfig} /> <SearchComponent menu={{MenuID: menu.MenuID, MenuName: config.MenuName}} config={config} - pasteContent={this.state.pasteContent} - sysRoles={this.props.sysRoles} updatesearch={this.updatesearch} /> <div className="calendar-wrap"> @@ -838,8 +833,6 @@ const mapStateToProps = (state) => { return { - sysRoles: state.sysRoles, - permFuncField: state.permFuncField, memberLevel: state.memberLevel } } -- Gitblit v1.8.0