|  | @@ -39,7 +39,7 @@
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <img
 | 
	
		
			
				|  |  |                      style="position: relative; width: 24px"
 | 
	
		
			
				|  |  | -                    :src="require('../../assets/login/' + item.img + '.png')"
 | 
	
		
			
				|  |  | +                    :src="item.icon_url_memu_default"
 | 
	
		
			
				|  |  |                      alt=""
 | 
	
		
			
				|  |  |                    />
 | 
	
		
			
				|  |  |                    <span style="margin-left: 16px">
 | 
	
	
		
			
				|  | @@ -119,6 +119,7 @@ import { getToken, removeToken, getConfig } from "@/utils/auth";
 | 
	
		
			
				|  |  |  import Cookies from "js-cookie";
 | 
	
		
			
				|  |  |  import { getContent, getStaticContent, getLearnWebContent } from "@/api/ajax";
 | 
	
		
			
				|  |  |  import { setI18nLang } from "@/utils/i18n";
 | 
	
		
			
				|  |  | +import { saveSession, getSession, removeSession } from "@/utils/role";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "LayoutHeader",
 | 
	
	
		
			
				|  | @@ -218,69 +219,8 @@ export default {
 | 
	
		
			
				|  |  |          return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        _this.projectName = _this.projectList[command].name;
 | 
	
		
			
				|  |  | -      let id = _this.projectList[command].id;
 | 
	
		
			
				|  |  | -      if (id == 0) {
 | 
	
		
			
				|  |  | -        // 教学管理系统
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-Learn/#/EnterSys`;
 | 
	
		
			
				|  |  | -      } else if (id == 1) {
 | 
	
		
			
				|  |  | -        // 教材管理系统
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-Book/#/EnterSys`;
 | 
	
		
			
				|  |  | -      } else if (id == 2) {
 | 
	
		
			
				|  |  | -        // 教培中心
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-TRC/#/EnterSys`;
 | 
	
		
			
				|  |  | -      } else if (id == 3) {
 | 
	
		
			
				|  |  | -        // 教研中心
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-TC/#/EnterSys`;
 | 
	
		
			
				|  |  | -      } else if (id == 4) {
 | 
	
		
			
				|  |  | -        // 考试中心
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-Test/#/EnterSys`;
 | 
	
		
			
				|  |  | -      } else if (id == 5) {
 | 
	
		
			
				|  |  | -        // 学习中心
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-LC/#/EnterSys`;
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        // 个人中心
 | 
	
		
			
				|  |  | -        location.href = `/GCLS-Personal/#/EnterSys`;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    handleCommand2(command) {
 | 
	
		
			
				|  |  | -      let _this = this;
 | 
	
		
			
				|  |  | -      _this.LoginNavIndex = command;
 | 
	
		
			
				|  |  | -      if (!_this.userMessage) {
 | 
	
		
			
				|  |  | -        this.$message.warning("Please login first");
 | 
	
		
			
				|  |  | -        this.projectName = "考试中心";
 | 
	
		
			
				|  |  | -        window.location.href = "/";
 | 
	
		
			
				|  |  | -        return;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      let MethodName = "login_control-CreateAccessCode";
 | 
	
		
			
				|  |  | -      let acsCode = null;
 | 
	
		
			
				|  |  | -      getContent(MethodName, {}).then((res) => {
 | 
	
		
			
				|  |  | -        acsCode = res.access_code;
 | 
	
		
			
				|  |  | -        _this.projectName = this.projectList[command].name;
 | 
	
		
			
				|  |  | -        let id = this.projectList[command].id;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (id == 0) {
 | 
	
		
			
				|  |  | -          // 教学管理系统
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-Learn/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        } else if (id == 1) {
 | 
	
		
			
				|  |  | -          // 教材管理系统
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-Book/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        } else if (id == 2) {
 | 
	
		
			
				|  |  | -          // 教培中心
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-TRC/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        } else if (id == 3) {
 | 
	
		
			
				|  |  | -          // 教研中心
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-TC/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        } else if (id == 4) {
 | 
	
		
			
				|  |  | -          // 考试中心
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-Test/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        } else if (id == 5) {
 | 
	
		
			
				|  |  | -          // 学习中心
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-LC/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          // 个人中心
 | 
	
		
			
				|  |  | -          location.href = `/GCLS-Personal/#/EnterSys?AccessCode=${acsCode}`;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      let relative_path = _this.projectList[command].relative_path;
 | 
	
		
			
				|  |  | +      location.href = relative_path;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 切换登录的注册
 | 
	
		
			
				|  |  |      cutLoginReg() {
 | 
	
	
		
			
				|  | @@ -288,6 +228,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      QuitLogin() {
 | 
	
		
			
				|  |  |        removeToken();
 | 
	
		
			
				|  |  | +      removeSession("SysList");
 | 
	
		
			
				|  |  |        this.userShow = false;
 | 
	
		
			
				|  |  |        this.userMessage = null;
 | 
	
		
			
				|  |  |        window.location.href = "/";
 | 
	
	
		
			
				|  | @@ -312,101 +253,24 @@ 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: "project4",
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            id: 5,
 | 
	
		
			
				|  |  | -            name: "学习中心",
 | 
	
		
			
				|  |  | -            img: "project6",
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          {
 | 
	
		
			
				|  |  | -            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",
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      // 排序
 | 
	
		
			
				|  |  | -      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;
 | 
	
		
			
				|  |  | +    getChildSysList() {
 | 
	
		
			
				|  |  | +      let _this = this;
 | 
	
		
			
				|  |  | +      let MethodName = "login_control-GetChildSysList_CanEnter_PC";
 | 
	
		
			
				|  |  | +      getContent(MethodName, {})
 | 
	
		
			
				|  |  | +        .then((res) => {
 | 
	
		
			
				|  |  | +          if (res.child_sys_list && res.child_sys_list.length > 0) {
 | 
	
		
			
				|  |  | +            _this.projectList = res.child_sys_list;
 | 
	
		
			
				|  |  | +            _this.projectList.forEach((item, index) => {
 | 
	
		
			
				|  |  | +              if (item.key == "GCLS-Personal") {
 | 
	
		
			
				|  |  | +                _this.LoginNavIndex = index;
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            saveSession("SysList", this.projectList);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      console.log(projectList);
 | 
	
		
			
				|  |  | -      return projectList;
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .catch((err) => {
 | 
	
		
			
				|  |  | +          console.log(err);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -415,23 +279,23 @@ export default {
 | 
	
		
			
				|  |  |      if (config) {
 | 
	
		
			
				|  |  |        _this.configInfor = JSON.parse(config);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    let SysList = getSession("SysList");
 | 
	
		
			
				|  |  | +    if (!SysList) {
 | 
	
		
			
				|  |  | +      _this.getChildSysList();
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +      _this.projectList = SysList;
 | 
	
		
			
				|  |  | +      _this.projectList.forEach((item, index) => {
 | 
	
		
			
				|  |  | +        if (item.key == "GCLS-Personal") {
 | 
	
		
			
				|  |  | +          _this.LoginNavIndex = index;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    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.projectList.forEach((item, index) => {
 | 
	
		
			
				|  |  | -        if (item.id == 6) {
 | 
	
		
			
				|  |  | -          _this.LoginNavIndex = index;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  |        _this.getNotReadMessage();
 | 
	
		
			
				|  |  |        setInterval(() => {
 | 
	
		
			
				|  |  |          _this.getNotReadMessage();
 |