| | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | sourcelist: [], |
| | | searches: [], |
| | | visible: false, |
| | | source: null |
| | | } |
| | |
| | | } |
| | | |
| | | editDataSource = (item) => { |
| | | // const { config } = this.props |
| | | |
| | | if (!item) { |
| | | item = { |
| | | uuid: Utils.getuuid() |
| | | uuid: Utils.getuuid(), |
| | | setting: {}, |
| | | columns: [], |
| | | scripts: [] |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | source: item |
| | | source: item, |
| | | searches: [] |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { sourcelist, visible, source, dict } = this.state |
| | | const { sourcelist, visible, source, dict, searches } = this.state |
| | | |
| | | return ( |
| | | <div className="mob-datasource"> |
| | |
| | | maskClosable={false} |
| | | style={{minWidth: '900px', maxWidth: '1200px'}} |
| | | okText={dict['mob.submit']} |
| | | cancelText={dict['mob.cancel']} |
| | | onOk={this.verifySubmit} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | destroyOnClose |
| | | > |
| | | <VerifyCard |
| | | card={source} |
| | | dict={dict} |
| | | card={source} |
| | | menuId={this.props.config.uuid} |
| | | searches={searches} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | </Modal> |