| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | |
| | | const { confirm } = Modal |
| | | const CommonDict = (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS |
| | | |
| | | class ComTableConfig extends Component { |
| | | class ComModalConfig extends Component { |
| | | static propTpyes = { |
| | | menu: PropTypes.any, |
| | | optionLibs: PropTypes.any, |
| | |
| | | } |
| | | |
| | | let roleList = [] |
| | | if (menu.roleList && menu.roleList.length > 0) { |
| | | roleList = menu.roleList.map(role => { |
| | | if (this.props.sysRoles && this.props.sysRoles.length > 0) { |
| | | roleList = this.props.sysRoles.map(role => { |
| | | return { |
| | | uuid: role.uuid, |
| | | field: role.value, |
| | |
| | | } |
| | | } |
| | | |
| | | export default ComTableConfig |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | sysRoles: state.sysRoles |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(ComModalConfig) |