king
2020-07-14 f36141f3075edf9d41928d64f759ad6bd1b1ac60
src/mob/datasource/index.jsx
@@ -18,6 +18,7 @@
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    sourcelist: [],
    searches: [],
    visible: false,
    source: null
  }
@@ -31,15 +32,21 @@
  }
  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: []
    })
  }
@@ -48,7 +55,7 @@
  }
  render () {
    const { sourcelist, visible, source, dict } = this.state
    const { sourcelist, visible, source, dict, searches } = this.state
    return (
      <div className="mob-datasource">
@@ -78,13 +85,16 @@
          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>