king
2020-02-14 50e83416b0ff2b2447a3993eb40bd86b85daf8cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Card, Col, Row, Icon } from 'antd'
// import Api from '@/api'
import zhCN from '@/locales/zh-CN/role.js'
import enUS from '@/locales/en-US/role.js'
import './index.scss'
 
export default class RoleManage extends Component {
  static propTpyes = {
    MenuNo: PropTypes.string, // 菜单参数
    MenuID: PropTypes.string // 菜单Id
  }
 
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
  }
 
  UNSAFE_componentWillMount () {
 
  }
 
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
 
  render() {
    return (
      <div className="rolemanage">
        <Row gutter={16}>
          <Col span={6}>
            <Card
              title={<span className="role-title"><Icon type="bank" /> {this.state.dict['role.title']}</span>}
              bordered={false}>
              Card content
            </Card>
          </Col>
          <Col span={18}>
            <Card title="Card title" bordered={false}>
              Card content
            </Card>
          </Col>
        </Row>
      </div>
    )
  }
}