king
2021-04-07 f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2
src/menu/datasource/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Modal } from 'antd'
@@ -16,7 +15,7 @@
  }
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    sourcelist: [],
    mainSearch: [],
    visible: false,
@@ -35,7 +34,7 @@
  }
  editDataSource = () => {
    const { config, menu } = this.props
    const { config } = this.props
    let search = []
    let parents = []
@@ -50,7 +49,7 @@
            _conf = item
            if (_conf.parentId && _conf.tabId) {
              getParents(menu)
              getParents(tab)
            }
          } else {
            getParents(tab)
@@ -60,10 +59,10 @@
    }
    if (config.parentId && config.tabId) {
      getParents(menu)
      getParents(window.GLOB.customMenu)
    }
    parents.unshift(menu)
    parents.unshift(window.GLOB.customMenu)
    parents.forEach(parent => {
      parent.components.forEach(item => {
@@ -110,7 +109,7 @@
  }
  render () {
    const { config, menu } = this.props
    const { config } = this.props
    const { visible, dict, loading, mainSearch } = this.state
    return (
@@ -122,7 +121,6 @@
          visible={visible}
          width={'75vw'}
          maskClosable={false}
          style={{minWidth: '900px', maxWidth: '1200px'}}
          okText={dict['model.submit']}
          onOk={this.verifySubmit}
          confirmLoading={loading}
@@ -131,7 +129,7 @@
        >
          <VerifyCard
            dict={dict}
            menu={menu}
            menu={window.GLOB.customMenu}
            mainSearch={mainSearch}
            config={config}
            wrappedComponentRef={(inst) => this.verifyRef = inst}
@@ -142,14 +140,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(DataSource)
export default DataSource