| | |
| | | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | menu: PropTypes.object, // 菜单信息 |
| | | config: PropTypes.object, // 页面配置信息 |
| | | search: PropTypes.array, // 搜索条件 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, menu, dict } = this.props |
| | | const { config, menu } = this.props |
| | | const { loading, activeKey, setting, defaultSql, columns, scripts, status, visible, script, scriptValue } = this.state |
| | | |
| | | return ( |
| | |
| | | <TabPane tab="数据源" key="setting"> |
| | | <DataSource |
| | | menu={menu} |
| | | dict={dict} |
| | | config={config} |
| | | columns={columns} |
| | | setting={setting} |
| | |
| | | this.setState({visible: true, script: null, scriptValue: ''}) |
| | | }}/> : null} |
| | | <CustomScript |
| | | dict={dict} |
| | | setting={setting} |
| | | scripts={scripts} |
| | | defaultSql={defaultSql} |
| | |
| | | <span className="operation-btn" onClick={() => this.handleStatus(item)} style={{color: '#8E44AD'}}><SwapOutlined /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title={this.props.dict['model.query.delete']} |
| | | title="确定删除吗?" |
| | | onConfirm={() => this.handleDelete(item) |
| | | }> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> |