import React from 'react'; import { Button, List } from 'antd-mobile-v2'; import 'antd-mobile-v2/dist/antd-mobile.css'; // import ExamineMobile from './ExamineMobile'; import commonConfig from '../../utils/config'; import * as commonUtils from '../../utils/utils'; import CommobileBase from '../../mobile/common/CommobileBase'; import styles from '../mobile.less'; import setting from '../../assets/mobile/setting.png'; import mailList from '../../assets/mobile/mailList.png'; import recommendation from '../../assets/mobile/recommendation.png'; import CommobileListEvent from './CommobileListEvent'; import * as commonFunc from '../../components/Common/commonFunc'; // eslint-disable-next-line prefer-destructuring const Item = List.Item; class myselfMobile extends React.Component { constructor(props) { super(props); this.state = { sId: props.app.userinfo.sId, sUserName: props.app.userinfo.sUserName, sComponanyName: props.app.systemData.findIndex(item => item.sName === 'CbxCompanyName') > -1 ? props.app.systemData.filter(item => item.sName === 'CbxCompanyName')[0].sValue : '', }; } btnOnclick = (value) => { const { dispatch } = this.props; const { sId } = this.state; if (value === 'loginOut') { const url = `${commonConfig.server_host}logout`; dispatch({ type: 'app/loginOut', payload: { url, sId, loginOutType: 'loginMobileOut' } }); } else if (value === 'about') { window.open('about.html'); } else { dispatch({ type: 'content/onRouterMobile', payload: { url: `/indexMobile/${value}`, }, }); } } render() { const { sUserName, sComponanyName } = this.state; const { slaveData } = this.props; let sDepartName = ''; if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyObject(sUserName)) { const findIndex = slaveData.findIndex(item => item.sEmployeeName === 'sUserName'); if (findIndex > -1) { // eslint-disable-next-line prefer-destructuring sDepartName = slaveData[findIndex].sDepartName; } else { sDepartName = '暂无'; } } const companyContactList = commonFunc.showLocalMessage(this.props, 'companyContactList', '企业通讯录'); const ModifyPassword = commonFunc.showLocalMessage(this.props, 'ModifyPassword', '修改密码'); const recommend = commonFunc.showLocalMessage(this.props, 'recommend', '推荐给好友'); const aboutSoftware = commonFunc.showLocalMessage(this.props, 'aboutSoftware', '关于软件'); const Logout = commonFunc.showLocalMessage(this.props, 'Logout', '退出登录'); const sUserNameFirst = sUserName.charAt(0); return (