| | |
| | | if (_menu) { |
| | | this.openTab(_menu, 0) |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | this.getwork() |
| | | }, 100) |
| | | }) |
| | | |
| | | // 获取角色权限, edition_type 接口版本控制 ''、'Y'、'A' |
| | |
| | | }, 50) |
| | | } |
| | | |
| | | getwork = () => { |
| | | if (sessionStorage.getItem('work_grade')) return |
| | | |
| | | Api.genericInterface({func: 's_get_local_my_worker_v1'}).then(result => { |
| | | sessionStorage.setItem('work_grade', result.work_grade || 0) |
| | | sessionStorage.setItem('work_group', result.work_group || '') |
| | | |
| | | if (!result.status && sessionStorage.getItem('debug') === 'true') { |
| | | notification.error({ |
| | | top: 92, |
| | | message: /s_get_local_my_worker_v1/.test(result.message) ? '职员信息获取失败,请联系管理员。' : result.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | openTab = (menu, times) => { |
| | | if (times > 50) return |
| | | times++ |