-
+
@@ -134,7 +134,7 @@ export default {
};
},
computed: {
- ...mapGetters(['userInfo', 'userMsg']),
+ ...mapGetters(['userInfo', 'userMsg','caseShow']),
showName: function() {
//console.log('name='+this.name);
//console.log('loginName='+this.loginName);
diff --git a/src/store/getters.js b/src/store/getters.js
index 45352469..2461ae5d 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -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,
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 8d315d08..0f8b062c 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -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,
diff --git a/src/utils/caseShow.js b/src/utils/caseShow.js
new file mode 100644
index 00000000..6c378221
--- /dev/null
+++ b/src/utils/caseShow.js
@@ -0,0 +1,16 @@
+/**页面设置的一些常量*/
+const caseUser={
+ '00004409': '李玉冰',
+ '101215': '徐涛',
+ '00005011': '邱炜玮',
+ '107863': '苗怡',
+ '00004928': '夏辉',
+ '110858': '毛继禹',
+ '10726944': '王芮',
+ 'boeutest': '测试小助手',
+ 'boeuadmin': '运营小助手',
+ '10181457': '董瑞华',
+ }
+
+ export default caseUser;
+
\ No newline at end of file
diff --git a/src/views/Index.vue b/src/views/Index.vue
index 773c7834..abb9298e 100644
--- a/src/views/Index.vue
+++ b/src/views/Index.vue
@@ -107,7 +107,7 @@
-