| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Icon, Input, Button, Checkbox, Select, Modal, Tabs, message } from 'antd' |
| | | import { Form, Icon, Input, Button, Checkbox, Select, Modal, message } from 'antd' |
| | | import md5 from 'md5' |
| | | import moment from 'moment' |
| | | |
| | |
| | | import './index.scss' |
| | | |
| | | const { warning } = Modal |
| | | const { TabPane } = Tabs |
| | | let LoginVerCodeTimer = null |
| | | |
| | | class LoginTabForm extends Component { |
| | |
| | | |
| | | return ( |
| | | <Form className={`login-form login-form-${loginWays.length}`} id="login-form" onSubmit={this.handleSubmit}> |
| | | <Tabs type="card" activeKey={activeKey} onChange={this.onChangeTab}> |
| | | {loginWays.map(item => (<TabPane tab={item.label} key={item.type}></TabPane>))} |
| | | </Tabs> |
| | | <p className="title">{this.props.platName}</p> |
| | | <div className="form-item-wrap"> |
| | | {activeKey === 'uname_pwd' ? <Form.Item> |
| | | {getFieldDecorator('username', { |
| | |
| | | initialValue: remember, |
| | | })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} |
| | | </Form.Item> : null} |
| | | {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> |
| | | {getFieldDecorator('lang', { |
| | | initialValue: this.props.lang, |
| | | <Form.Item className="minline right"> |
| | | {getFieldDecorator('system', { |
| | | initialValue: localStorage.getItem('bmsSystem') === 'new' ? 'new' : 'old', |
| | | })( |
| | | <Select |
| | | onChange={(value) => {this.changelang(value)}} |
| | | getPopupContainer={() => document.getElementById('login-form')} |
| | | > |
| | | {this.props.langList.map((item, index) => { |
| | | return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> |
| | | })} |
| | | <Select getPopupContainer={() => document.getElementById('login-form')}> |
| | | <Select.Option key="old" value="old">原系统</Select.Option> |
| | | <Select.Option key="new" value="new">新系统</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> : null} |
| | | </Form.Item> |
| | | {['uname_pwd', 'sms_vcode'].includes(activeKey) ? <Form.Item className="btn-login"> |
| | | <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}> |
| | | {this.props.dict['login.submit']} |