| | |
| | | }; |
| | | } |
| | | componentWillMount() { |
| | | document.title = '恒巨信息OA-用户登录' |
| | | document.title = '恒巨信息OA-用户登录'; |
| | | } |
| | | |
| | | handleSubmit = e => { |
| | |
| | | }).then(res => { |
| | | console.log('res', res); |
| | | if (res) { |
| | | console.log('oa', res.map(({ symbol }) => (symbol)).concat(res.map(({ moduleSymbol }) => (moduleSymbol))).reduce((p, n) => { |
| | | if (p.indexOf(n) == -1) { |
| | | return p.concat(n) |
| | | } else { |
| | | return p |
| | | } |
| | | }, []), getMenuListByPermission(oaMenus, res && res.map(({ symbol }) => (symbol)).concat(res.map(({ moduleSymbol }) => (moduleSymbol))).reduce((p, n) => { |
| | | if (p.indexOf(n) == -1) { |
| | | return p.concat(n) |
| | | } else { |
| | | return p |
| | | } |
| | | }, [])), oaMenus) |
| | | window.localStorage.setItem('menu', JSON.stringify(res)); |
| | | window.localStorage.setItem('menusListByRole', JSON.stringify({ |
| | | user: { role: 'user', menus: userMenus }, |
| | |
| | | message.success('登录成功'); |
| | | console.log('this props', this.props); |
| | | history.push({ pathname: "/index" }); |
| | | |
| | | this.props.setContext && this.props.setContext({ role: 'oa' }) |
| | | } |
| | | }) |