|  | @@ -3,11 +3,11 @@ import { userStore } from '@/store/mobx'
 | 
	
		
			
				|  |  |  import { iFromValues, iLoginProps, iRetrieveFormProps } from '@/types/login'
 | 
	
		
			
				|  |  |  import consts from '@/utils/consts'
 | 
	
		
			
				|  |  |  import { Button, Form, Input, Modal } from 'antd'
 | 
	
		
			
				|  |  | -import React, { useState, useEffect } from 'react'
 | 
	
		
			
				|  |  | -import { useAliveController } from 'react-activation'
 | 
	
		
			
				|  |  | +import React, { useState } from 'react'
 | 
	
		
			
				|  |  |  import { RouteComponentProps, withRouter } from 'react-router-dom'
 | 
	
		
			
				|  |  |  import { apiProject } from "./api"
 | 
	
		
			
				|  |  |  import styles from './index.module.scss'
 | 
	
		
			
				|  |  | +import QueueAnim from 'rc-queue-anim'
 | 
	
		
			
				|  |  |  import './index.scss'
 | 
	
		
			
				|  |  |  // 正常登录Form表单
 | 
	
		
			
				|  |  |  const initLoginState = {
 | 
	
	
		
			
				|  | @@ -18,11 +18,8 @@ const initLoginState = {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  type iState = typeof initLoginState
 | 
	
		
			
				|  |  | -const NormalLoginForm:React.FC<iLoginProps> = () => {
 | 
	
		
			
				|  |  | -  const { clear } = useAliveController()
 | 
	
		
			
				|  |  | -  useEffect(() => {
 | 
	
		
			
				|  |  | -    clear()
 | 
	
		
			
				|  |  | -  }, [])
 | 
	
		
			
				|  |  | +const NormalLoginForm: React.FC<iLoginProps> = () => {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    const [ state, setState ] = useState<iState>(initLoginState)
 | 
	
		
			
				|  |  |    const onFinish = (values: iFromValues) => {
 | 
	
		
			
				|  |  |      userStore.login(values)
 | 
	
	
		
			
				|  | @@ -48,43 +45,59 @@ const NormalLoginForm:React.FC<iLoginProps> = () => {
 | 
	
		
			
				|  |  |      setState({ ...state, visible: !state.visible })
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    return (
 | 
	
		
			
				|  |  | -      <Form
 | 
	
		
			
				|  |  | -        name="normal_login"
 | 
	
		
			
				|  |  | -        className={styles.loginForm}
 | 
	
		
			
				|  |  | -        // initialValues={{ password: '123456', code : '234' }}
 | 
	
		
			
				|  |  | -        onFinish={onFinish}
 | 
	
		
			
				|  |  | -      >
 | 
	
		
			
				|  |  | -        <h4>纵横工程建设项目管理系统</h4>
 | 
	
		
			
				|  |  | -        <h5 className={[ 'project-title' ].join(' ')} >{state.projectInfo}</h5>
 | 
	
		
			
				|  |  | -        <Form.Item
 | 
	
		
			
				|  |  | -          name="code"
 | 
	
		
			
				|  |  | -          rules={[ { required: true, message: '请输入项目编号!' } ]}
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <Input placeholder="项目编号" onChange={handleProjectCode} autoFocus/>
 | 
	
		
			
				|  |  | -        </Form.Item>
 | 
	
		
			
				|  |  | -        <Form.Item
 | 
	
		
			
				|  |  | -          name="account"
 | 
	
		
			
				|  |  | -          rules={[ { required: true, message: '请输入账号!' } ]}
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <Input placeholder="登录账号" />
 | 
	
		
			
				|  |  | -        </Form.Item>
 | 
	
		
			
				|  |  | -        <Form.Item
 | 
	
		
			
				|  |  | -          name="password"
 | 
	
		
			
				|  |  | -          rules={[ { required: true, message: '请输入密码!' } ]}
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <Input.Password type="password" placeholder="密码" />
 | 
	
		
			
				|  |  | -        </Form.Item>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        <Form.Item>
 | 
	
		
			
				|  |  | -          <Button type="primary" htmlType="submit">登录</Button>
 | 
	
		
			
				|  |  | -        </Form.Item>
 | 
	
		
			
				|  |  | +  return (
 | 
	
		
			
				|  |  | +    <Form
 | 
	
		
			
				|  |  | +      name="normal_login"
 | 
	
		
			
				|  |  | +      className={styles.loginForm}
 | 
	
		
			
				|  |  | +      // initialValues={{ password: '123456', code : '234' }}
 | 
	
		
			
				|  |  | +      onFinish={onFinish}
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  | +      <h4>纵横工程建设项目管理系统</h4>
 | 
	
		
			
				|  |  | +      <h5 className={[ 'project-title' ].join(' ')} >{state.projectInfo}</h5>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      <QueueAnim >
 | 
	
		
			
				|  |  | +        <div key="code">
 | 
	
		
			
				|  |  | +          <Form.Item
 | 
	
		
			
				|  |  | +            name="code"
 | 
	
		
			
				|  |  | +            rules={[ { required: true, message: '请输入项目编号!' } ]}
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <Input placeholder="项目编号" onChange={handleProjectCode} />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +        <div key="account">
 | 
	
		
			
				|  |  | +          <Form.Item
 | 
	
		
			
				|  |  | +            name="account"
 | 
	
		
			
				|  |  | +            rules={[ { required: true, message: '请输入账号!' } ]}
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <Input placeholder="登录账号" />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +        <div key="password">
 | 
	
		
			
				|  |  | +          <Form.Item
 | 
	
		
			
				|  |  | +            name="password"
 | 
	
		
			
				|  |  | +            rules={[ { required: true, message: '请输入密码!' } ]}
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <Input.Password type="password" placeholder="密码" />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <div key="button">
 | 
	
		
			
				|  |  | +          <Form.Item>
 | 
	
		
			
				|  |  | +            <Button type="primary" htmlType="submit">登录</Button>
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          {/* <div className={styles.textRight}>
 | 
	
		
			
				|  |  | -          <span onClick={this.handleForgetPsw}>忘记密码?</span>
 | 
	
		
			
				|  |  | -        </div> */}
 | 
	
		
			
				|  |  | -        <RetrieveForm visible={state.visible} setVisible={setVisible} />
 | 
	
		
			
				|  |  | -      </Form>
 | 
	
		
			
				|  |  | -    )
 | 
	
		
			
				|  |  | +            <span onClick={this.handleForgetPsw}>忘记密码?</span>
 | 
	
		
			
				|  |  | +          </div> */}
 | 
	
		
			
				|  |  | +        {/* <RetrieveForm visible={state.visible} setVisible={setVisible} /> */}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      </QueueAnim>
 | 
	
		
			
				|  |  | +    </Form>
 | 
	
		
			
				|  |  | +  )
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // 找回密码Form表单
 |