| | |
| | | modifyMainMenu, |
| | | logout |
| | | } from '@/store/action' |
| | | import asyncComponent from '@/utils/asyncSpinComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import options from '@/store/options.js' |
| | |
| | | const { confirm } = Modal |
| | | const { Search } = Input |
| | | const Resetpwd = asyncComponent(() => import('@/components/resetPassword')) |
| | | const LoginForm = asyncComponent(() => import('./loginform')) |
| | | const QrCode = asyncComponent(() => import('@/components/qrcode')) |
| | | const LoginForm = asyncSpinComponent(() => import('./loginform')) |
| | | |
| | | class Header extends Component { |
| | | static propTpyes = { |
| | |
| | | userName: '', |
| | | fullName: '', |
| | | logourl: window.GLOB.mainlogo, |
| | | appVersion: window.GLOB.appVersion, |
| | | loginVisible: false, |
| | | loginLoading: false, |
| | | avatar: Utils.getrealurl(sessionStorage.getItem('avatar')), |
| | |
| | | loginVisible: true |
| | | }) |
| | | } else { |
| | | sessionStorage.setItem('role_id', sessionStorage.getItem('cloudRole_id')) |
| | | sessionStorage.setItem('dataM', sessionStorage.getItem('cloudDataM')) |
| | | sessionStorage.setItem('isEditState', 'true') |
| | | |
| | | this.props.modifyMainMenu(null) |
| | |
| | | sessionStorage.setItem('cloudDataM', res.dataM ? 'true' : '') |
| | | sessionStorage.setItem('cloudRole_id', res.role_id || '') |
| | | |
| | | sessionStorage.setItem('role_id', res.role_id || '') |
| | | sessionStorage.setItem('dataM', res.dataM ? 'true' : '') |
| | | sessionStorage.setItem('isEditState', 'true') |
| | | |
| | | if (param.remember) { |
| | |
| | | setTimeout(() => { |
| | | Api.getAppVersion() |
| | | }, 1000) |
| | | // Api.genericInterface({ |
| | | // func: 's_get_fcc_account_data', |
| | | // fcc_date: '2022-03-01', |
| | | // search_type: '' |
| | | // }).then(res => { |
| | | // }) |
| | | |
| | | // sessionStorage 跨页面共享 |
| | | window.addEventListener('storage', (e) => { |
| | |
| | | content: '重新加载应用信息', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | if (!window.GLOB.WebSql && !window.GLOB.IndexDB) { |
| | | if (!window.GLOB.IndexDB) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '更新失败,请刷新页面重试!', |
| | |
| | | |
| | | about = () => { |
| | | Modal.success({ |
| | | title: '系统版本v' + this.state.appVersion |
| | | title: '系统版本v' + window.GLOB.appVersion |
| | | }) |
| | | } |
| | | |
| | | wxnotice = () => { |
| | | Modal.success({ |
| | | className: 'mk-wx-notice', |
| | | title: <QrCode card={{qrWidth: 320, color: '#000000'}} value={window.GLOB.baseurl + 'mob/wxnotice.html?userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')}/>, |
| | | okText: '关闭' |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | render () { |
| | | const { mainMenu, collapse } = this.props |
| | | const { thdMenuList, searchkey, debug, menulist, appVersion } = this.state |
| | | const { thdMenuList, searchkey, debug, menulist } = this.state |
| | | const navBar = window.GLOB.navBar |
| | | |
| | | const menu = ( |
| | |
| | | <Menu.Item key="verup" onClick={this.verup}> |
| | | 页面更新 |
| | | </Menu.Item> |
| | | {appVersion ? <Menu.Item key="version" onClick={this.about}> |
| | | {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={this.wxnotice}> |
| | | 微信消息 |
| | | </Menu.Item> : null} |
| | | {window.GLOB.appVersion ? <Menu.Item key="version" onClick={this.about}> |
| | | 关于 |
| | | </Menu.Item> : null} |
| | | <Menu.Item key="logout" onClick={this.logout}>退出</Menu.Item> |