From 84804b405cb88f659d055b16eb3bd00b813ccb4a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 10 十二月 2020 10:58:38 +0800 Subject: [PATCH] 2020-12-10 --- src/templates/comtableconfig/index.jsx | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index c0913ae..e23bbbf 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -1101,24 +1101,13 @@ * @description 缂栬緫鍔熻兘瀹屾垚鏇存柊锛屽寘鎷В鍐绘寜閽�佺矘璐淬�佹浛鎹㈢瓑 */ editConfig = (res) => { - - if (res.type === 'thaw') { this.setState({ thawButtons: res.thawButtons, config: res.config }) } else if (res.type === 'paste') { - let config = fromJS(this.state.config).toJS() - if (res.content.copyType === 'search') { - config.search.push(res.content) - } else if (res.content.copyType === 'action') { - config.action.push(res.content) - } else if (res.content.copyType === 'columns' && res.content.columns && res.content.columns.length > 0) { - config.columns = config.columns.filter(col => !col.origin) - config.columns = [...config.columns, ...res.content.columns] - } - this.setState({config}) + this.setState({config: res.config}) } } @@ -1306,7 +1295,7 @@ </div> } bordered={false} extra={ <div> - <EditComponent dict={this.state.dict} type="maintable" config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/> + <EditComponent dict={this.state.dict} options={['search', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/> <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} /> <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button> -- Gitblit v1.8.0