|
@@ -276,103 +276,7 @@ export default {
|
|
|
await setI18nLang(lang_type);
|
|
|
this.$router.go(0);
|
|
|
},
|
|
|
- handleProList(list) {
|
|
|
- let projectList = [];
|
|
|
- if (list.length == 0) {
|
|
|
- let arr = [
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: "教培中心",
|
|
|
- img: "project3",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: "教研中心",
|
|
|
- img: "project6",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 5,
|
|
|
- name: "学习中心",
|
|
|
- img: "project4",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 6,
|
|
|
- name: "个人中心",
|
|
|
- img: "project7",
|
|
|
- },
|
|
|
- ];
|
|
|
- projectList = arr;
|
|
|
- } else {
|
|
|
- if (list.includes(2000001)) {
|
|
|
- projectList = JSON.parse(JSON.stringify(this.teacherProList));
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- let code = list[i];
|
|
|
- if (code == 2000003) {
|
|
|
- projectList.push({
|
|
|
- id: 1,
|
|
|
- name: "教材管理系统",
|
|
|
- img: "project2",
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- let code = list[i];
|
|
|
- if (code == 2000002) {
|
|
|
- projectList.push({
|
|
|
- id: 0,
|
|
|
- name: "教学管理系统",
|
|
|
- img: "project1",
|
|
|
- });
|
|
|
- } else if (code == 2000003) {
|
|
|
- projectList.push({
|
|
|
- id: 1,
|
|
|
- name: "教材管理系统",
|
|
|
- img: "project2",
|
|
|
- });
|
|
|
- } else if (code == 2000004) {
|
|
|
- projectList.push({
|
|
|
- id: 2,
|
|
|
- name: "教师培训中心",
|
|
|
- img: "project3",
|
|
|
- });
|
|
|
- } else if (code == 2000005) {
|
|
|
- projectList.push({
|
|
|
- id: 4,
|
|
|
- name: "考试中心",
|
|
|
- img: "project5",
|
|
|
- });
|
|
|
- } else if (code == 2000006) {
|
|
|
- projectList.push({
|
|
|
- id: 3,
|
|
|
- name: "教研中心",
|
|
|
- img: "project4",
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- projectList.push({
|
|
|
- id: 6,
|
|
|
- // Teacher training center
|
|
|
- name: "个人中心",
|
|
|
- img: "project7",
|
|
|
- text: "您收集和购买的所有资源都可以在这里轻松找到。",
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- // 排序
|
|
|
- for (var i = 0; i < projectList.length - 1; i++) {
|
|
|
- for (var j = 0; j < projectList.length - 1 - i; j++) {
|
|
|
- // 相邻元素两两对比,元素交换,大的元素交换到后面
|
|
|
- if (projectList[j].id > projectList[j + 1].id) {
|
|
|
- var temp = projectList[j];
|
|
|
- projectList[j] = projectList[j + 1];
|
|
|
- projectList[j + 1] = temp;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- console.log(projectList);
|
|
|
- return projectList;
|
|
|
- },
|
|
|
+
|
|
|
getNotReadMessage() {
|
|
|
let MethodName = "message-message_manager-IsExistMyMessage_NotRead";
|
|
|
let data = {};
|
|
@@ -395,7 +299,6 @@ export default {
|
|
|
_this.LoginNavIndex = index;
|
|
|
}
|
|
|
});
|
|
|
- saveSession("SysList", this.projectList);
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -405,31 +308,14 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
let _this = this;
|
|
|
- let SysList = getSession("SysList");
|
|
|
- if (!SysList) {
|
|
|
- _this.getChildSysList();
|
|
|
- } else {
|
|
|
- _this.projectList = SysList;
|
|
|
- _this.projectList.forEach((item, index) => {
|
|
|
- if (item.key == "GCLS-LC") {
|
|
|
- _this.LoginNavIndex = index;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ _this.getChildSysList();
|
|
|
},
|
|
|
mounted() {
|
|
|
let _this = this;
|
|
|
let user = getToken();
|
|
|
if (user) {
|
|
|
_this.userMessage = JSON.parse(user);
|
|
|
- let popedom_code_list = _this.userMessage.popedom_code_list;
|
|
|
- if (_this.userMessage.user_type == "TEACHER") {
|
|
|
- // _this.projectList = _this.handleProList(popedom_code_list);
|
|
|
- } else if (_this.userMessage.user_type == "STUDENT") {
|
|
|
- _this.projectList = _this.stuProList;
|
|
|
- }
|
|
|
}
|
|
|
- // _this._getConfig();
|
|
|
_this.configInfor = JSON.parse(getConfig());
|
|
|
_this.getLangList();
|
|
|
_this.headTimer = _this.getNotReadMessage();
|