From 2ff464f30d94235b3ad04475593b75a74a354de9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 09 四月 2020 19:04:01 +0800 Subject: [PATCH] 2020-04-09 --- src/templates/modalconfig/index.jsx | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index d15da7d..620b41b 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -1,5 +1,6 @@ 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' @@ -29,7 +30,7 @@ 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, @@ -495,8 +496,8 @@ } 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, @@ -1439,4 +1440,14 @@ } } -export default ComTableConfig \ No newline at end of file +const mapStateToProps = (state) => { + return { + sysRoles: state.sysRoles + } +} + +const mapDispatchToProps = () => { + return {} +} + +export default connect(mapStateToProps, mapDispatchToProps)(ComModalConfig) \ No newline at end of file -- Gitblit v1.8.0