前端
bash
// 获取用户名和用户ID
const userid = this.$store.state.user.id;
const username = this.$store.state.user.name;
//部门名
this.$store.state.user.userInfo.dept.deptId
后端
bash
SecurityUtils.getUserId();
SecurityUtils.getDeptId();
SecurityUtils.getLoginUser().getUser().getDept().getDeptName();