mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 13:56:43 +08:00
隐藏案例
This commit is contained in:
@@ -7,6 +7,7 @@ const getters = {
|
||||
cachedViews: state => state.tagsView.cachedViews,
|
||||
avatar: state => state.user.info.avatar,
|
||||
userInfo: state => state.user.info,
|
||||
caseShow: state => state.user.caseShow,
|
||||
newslist: state => state.user.newslist,
|
||||
orgId: state => state.user.orgId,
|
||||
permissions: state => state.user.permissions,
|
||||
|
||||
@@ -5,6 +5,7 @@ import apiMessage from '@/api/system/message.js'
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiBoeCourse from "@/api/boe/course.js";
|
||||
import apiBoeLogout from "@/api/boe/login.js";
|
||||
import caseUser from "@/utils/caseShow.js"
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@@ -14,7 +15,8 @@ const user = {
|
||||
messagesBeReviewed: 0,//待审核的消息
|
||||
studyTaskCount:0,//学习任务数
|
||||
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
|
||||
permissions: []
|
||||
permissions: [],
|
||||
caseShow:false,
|
||||
},
|
||||
mutations: {
|
||||
SET_Identity: (state, iden) => {
|
||||
@@ -28,7 +30,6 @@ const user = {
|
||||
},
|
||||
SET_StudyTaskCount: (state, m) => {
|
||||
state.studyTaskCount = m
|
||||
//console.log(state)
|
||||
},
|
||||
SET_CurIdentity: (state, iden) => {
|
||||
state.curIdentity = iden
|
||||
@@ -39,7 +40,10 @@ const user = {
|
||||
},
|
||||
SET_PERMISSIONS: (state, permissions) => {
|
||||
state.permissions = permissions
|
||||
}
|
||||
},
|
||||
SET_caseShow:(state, iden) => {
|
||||
state.caseShow = iden
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
refrashMsg({ commit }) {
|
||||
@@ -112,7 +116,6 @@ const user = {
|
||||
InitData({ commit, state }) {
|
||||
let token = getToken();
|
||||
return new Promise((resolve, reject) => {
|
||||
//console.log(token);
|
||||
app.initData().then(res =>{
|
||||
let studyTotalH = 0;// 小时显示
|
||||
let t1=parseFloat(res.result.studyTotal);
|
||||
@@ -130,6 +133,13 @@ const user = {
|
||||
dfn = res.result.departFullName;
|
||||
}
|
||||
}
|
||||
if (res.result.userNo != '') {
|
||||
for(let key in caseUser){
|
||||
if(res.result.userNo == key) {
|
||||
commit('SET_caseShow',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
const user = {
|
||||
aid: res.result.aid,
|
||||
sysId:res.result.sysId,
|
||||
|
||||
Reference in New Issue
Block a user