|
|
@@ -71,75 +71,71 @@ class LoginComponent extends React.Component {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <div className='container'>
|
|
|
- <div className='content'>
|
|
|
- <div className='main'>
|
|
|
- <div className='login-header'>
|
|
|
- <div className='logo'></div>
|
|
|
- <span className='text' >BI 商业智能平台</span>
|
|
|
+ <div className='login-container'>
|
|
|
+ <div className='login-body'>
|
|
|
+ <div className='login-header'></div>
|
|
|
+ <div className='login-text'>登录</div>
|
|
|
+ <Login
|
|
|
+ className='login-content'
|
|
|
+ onSubmit={this.onSubmit}
|
|
|
+ >
|
|
|
+ {
|
|
|
+ notice &&
|
|
|
+ <Alert style={{ marginBottom: 24 }} message={notice} type="error" showIcon closable />
|
|
|
+ }
|
|
|
+ <UserName
|
|
|
+ name="username"
|
|
|
+ disabled={fetching}
|
|
|
+ placeholder='输入用户名'
|
|
|
+ // defaultValue={autoLogin ? defaultAccount : ''}
|
|
|
+ defaultValue={currentUserName}
|
|
|
+ onChange={() => {
|
|
|
+ this.setState({
|
|
|
+ notice: ''
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ rules={[{
|
|
|
+ required: true,
|
|
|
+ whitespace: true,
|
|
|
+ message: '用户名不能为空!'
|
|
|
+ }]}
|
|
|
+ onPressEnter={(e) => {
|
|
|
+ document.getElementsByClassName('antd-pro-login-submit')[0].click();
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Password
|
|
|
+ name="password"
|
|
|
+ disabled={fetching}
|
|
|
+ placeholder='输入密码'
|
|
|
+ defaultValue={autoLogin ? currentPassword : ''}
|
|
|
+ onChange={() => {
|
|
|
+ this.setState({
|
|
|
+ notice: ''
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ rules={[{
|
|
|
+ required: true,
|
|
|
+ whitespace: true,
|
|
|
+ message: "密码不能为空!",
|
|
|
+ }]}
|
|
|
+ onPressEnter={(e) => {
|
|
|
+ document.getElementsByClassName('antd-pro-login-submit')[0].click();
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <div>
|
|
|
+ <Checkbox className='checkbox-remember' defaultChecked={autoLogin} onChange={this.changeAutoLogin}>记住密码</Checkbox>
|
|
|
+ {/* <a style={{ float: 'right' }} href="">忘记密码</a> */}
|
|
|
</div>
|
|
|
- <Login
|
|
|
- className='login'
|
|
|
- onSubmit={this.onSubmit}
|
|
|
- >
|
|
|
- {
|
|
|
- notice &&
|
|
|
- <Alert style={{ marginBottom: 24 }} message={notice} type="error" showIcon closable />
|
|
|
- }
|
|
|
- <UserName
|
|
|
- name="username"
|
|
|
- disabled={fetching}
|
|
|
- placeholder='输入用户名'
|
|
|
- // defaultValue={autoLogin ? defaultAccount : ''}
|
|
|
- defaultValue={currentUserName}
|
|
|
- onChange={() => {
|
|
|
- this.setState({
|
|
|
- notice: ''
|
|
|
- });
|
|
|
- }}
|
|
|
- rules={[{
|
|
|
- required: true,
|
|
|
- whitespace: true,
|
|
|
- message: '用户名不能为空!'
|
|
|
- }]}
|
|
|
- onPressEnter={(e) => {
|
|
|
- document.getElementsByClassName('antd-pro-login-submit')[0].click();
|
|
|
- }}
|
|
|
- />
|
|
|
- <Password
|
|
|
- name="password"
|
|
|
- disabled={fetching}
|
|
|
- placeholder='输入密码'
|
|
|
- defaultValue={autoLogin ? currentPassword : ''}
|
|
|
- onChange={() => {
|
|
|
- this.setState({
|
|
|
- notice: ''
|
|
|
- });
|
|
|
- }}
|
|
|
- rules={[{
|
|
|
- required: true,
|
|
|
- whitespace: true,
|
|
|
- message: "密码不能为空!",
|
|
|
- }]}
|
|
|
- onPressEnter={(e) => {
|
|
|
- document.getElementsByClassName('antd-pro-login-submit')[0].click();
|
|
|
- }}
|
|
|
- />
|
|
|
- <div>
|
|
|
- <Checkbox style={{ color: 'white' }} defaultChecked={autoLogin} onChange={this.changeAutoLogin}>记住密码</Checkbox>
|
|
|
- {/* <a style={{ float: 'right' }} href="">忘记密码</a> */}
|
|
|
- </div>
|
|
|
- <Submit disabled={fetching}>
|
|
|
- {fetching && <Icon type="loading" theme="outlined" />}
|
|
|
- {fetching ? '登录中...' : '登录'}
|
|
|
- </Submit>
|
|
|
- <div>
|
|
|
- {/* <Link to="/register">
|
|
|
- <span style={{ float: 'right' }}>注册</span>
|
|
|
- </Link> */}
|
|
|
- </div>
|
|
|
- </Login>
|
|
|
- </div>
|
|
|
+ <Submit disabled={fetching}>
|
|
|
+ {fetching && <Icon type="loading" theme="outlined" />}
|
|
|
+ {fetching ? '登录中...' : '登录'}
|
|
|
+ </Submit>
|
|
|
+ <div>
|
|
|
+ {/* <Link to="/register">
|
|
|
+ <span style={{ float: 'right' }}>注册</span>
|
|
|
+ </Link> */}
|
|
|
+ </div>
|
|
|
+ </Login>
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|