|
@@ -2,7 +2,9 @@
|
|
|
<!-- 顶部登录导航 -->
|
|
|
<div class="LoginNav">
|
|
|
<div class="logo">
|
|
|
- <span class="logo-img"> logo </span>
|
|
|
+ <span class="logo-img">
|
|
|
+ <el-image :src="$store.state.app.config.logo_image_url" />
|
|
|
+ </span>
|
|
|
<el-menu
|
|
|
:default-active="activeIndex"
|
|
|
class="el-menu-demo"
|
|
@@ -33,7 +35,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">
|
|
@@ -93,7 +95,7 @@
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import { getToken, removeToken } from '@/utils/auth';
|
|
|
-import { GetLanguageList } from '@/api/app';
|
|
|
+import { GetLanguageList, GetChildSysList_CanEnter_PC } from '@/api/app';
|
|
|
import { setI18nLang } from '@/utils/i18n';
|
|
|
import { IsExistMyMessage_NotRead } from '@/api/user';
|
|
|
|
|
@@ -105,56 +107,6 @@ export default {
|
|
|
LoginNavIndex: 0, // 下拉框导航索引
|
|
|
projectName: '教学中心',
|
|
|
projectList: [],
|
|
|
- teacherProList: [
|
|
|
- // 普通教师
|
|
|
- {
|
|
|
- id: 0,
|
|
|
- name: '教学中心',
|
|
|
- img: 'project1'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: '教培中心',
|
|
|
- img: 'project3'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: '教研中心',
|
|
|
- img: 'project4'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- name: '考试中心',
|
|
|
- img: 'project5'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 5,
|
|
|
- name: '学习中心',
|
|
|
- img: 'project6'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 6,
|
|
|
- name: '个人中心',
|
|
|
- img: 'project7'
|
|
|
- }
|
|
|
- ],
|
|
|
- stuProList: [
|
|
|
- {
|
|
|
- id: 0,
|
|
|
- name: '教学中心',
|
|
|
- img: 'project1'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 5,
|
|
|
- name: '学习中心',
|
|
|
- img: 'project6'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 6,
|
|
|
- name: '个人中心',
|
|
|
- img: 'project7'
|
|
|
- }
|
|
|
- ],
|
|
|
userMessage: null,
|
|
|
userShow: false,
|
|
|
language_list: [],
|
|
@@ -166,31 +118,23 @@ export default {
|
|
|
...mapGetters(['language_type'])
|
|
|
},
|
|
|
created() {
|
|
|
- let { token, isHas } = getToken();
|
|
|
+ this.getChildSysList();
|
|
|
+ const { token, isHas } = getToken();
|
|
|
if (isHas) {
|
|
|
this.userMessage = token;
|
|
|
- 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 === 0) {
|
|
|
- this.LoginNavIndex = index;
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ let interval = setInterval(() => {
|
|
|
+ IsExistMyMessage_NotRead()
|
|
|
+ .then(({ is_exist }) => {
|
|
|
+ this.isNotRead = JSON.parse(is_exist);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ clearInterval(interval);
|
|
|
+ });
|
|
|
+ }, 120000);
|
|
|
+
|
|
|
+ this.getLangList();
|
|
|
}
|
|
|
- this.getLangList();
|
|
|
- let interval = setInterval(() => {
|
|
|
- IsExistMyMessage_NotRead()
|
|
|
- .then(({ is_exist }) => {
|
|
|
- this.isNotRead = JSON.parse(is_exist);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- clearInterval(interval);
|
|
|
- });
|
|
|
- }, 120000);
|
|
|
},
|
|
|
methods: {
|
|
|
// 切换导航
|
|
@@ -210,31 +154,8 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.projectName = this.projectList[command].name;
|
|
|
- let id = this.projectList[command].id;
|
|
|
- let url = '';
|
|
|
- if (id === 0) {
|
|
|
- // 教学管理系统
|
|
|
- url = `/GCLS-Learn/#/EnterSys`;
|
|
|
- } else if (id === 1) {
|
|
|
- // 教材管理系统
|
|
|
- url = `/GCLS-Book/#/EnterSys`;
|
|
|
- } else if (id === 2) {
|
|
|
- // 教培中心
|
|
|
- url = `/GCLS-TRC/#/EnterSys`;
|
|
|
- } else if (id === 3) {
|
|
|
- // 教研中心
|
|
|
- url = `/GCLS-TC/#/EnterSys`;
|
|
|
- } else if (id === 4) {
|
|
|
- // 考试中心
|
|
|
- url = `/GCLS-Test/#/EnterSys`;
|
|
|
- } else if (id === 5) {
|
|
|
- // 学习中心
|
|
|
- url = `/GCLS-LC/#/EnterSys`;
|
|
|
- } else {
|
|
|
- // 个人中心
|
|
|
- url = `/GCLS-Personal/#/EnterSys`;
|
|
|
- }
|
|
|
- window.location.href = url;
|
|
|
+ let relative_path = this.projectList[command].relative_path;
|
|
|
+ location.href = relative_path;
|
|
|
},
|
|
|
goPersonal() {
|
|
|
window.location.href = `/GCLS-Personal/#/EnterSys`;
|
|
@@ -261,96 +182,21 @@ export default {
|
|
|
await setI18nLang(language_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++) {
|
|
|
- if (list[i] === 2000003) {
|
|
|
- projectList.push({
|
|
|
- id: 1,
|
|
|
- name: '教材管理系统',
|
|
|
- img: 'project2'
|
|
|
+ getChildSysList() {
|
|
|
+ GetChildSysList_CanEnter_PC()
|
|
|
+ .then(({ child_sys_list }) => {
|
|
|
+ if (child_sys_list && child_sys_list.length > 0) {
|
|
|
+ this.projectList = child_sys_list;
|
|
|
+ this.projectList.forEach((item, index) => {
|
|
|
+ if (item.key === 'GCLS-Learn') {
|
|
|
+ this.LoginNavIndex = index;
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
- } 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,
|
|
|
- name: '个人中心',
|
|
|
- img: 'project7'
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err);
|
|
|
});
|
|
|
- }
|
|
|
- // 排序
|
|
|
- for (let i = 0; i < projectList.length - 1; i++) {
|
|
|
- for (let j = 0; j < projectList.length - 1 - i; j++) {
|
|
|
- // 相邻元素两两对比,元素交换,大的元素交换到后面
|
|
|
- if (projectList[j].id > projectList[j + 1].id) {
|
|
|
- let temp = projectList[j];
|
|
|
- projectList[j] = projectList[j + 1];
|
|
|
- projectList[j + 1] = temp;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return projectList;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -374,16 +220,6 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
|
|
|
- &-img {
|
|
|
- font-style: normal;
|
|
|
- font-weight: 600;
|
|
|
- font-size: 30px;
|
|
|
- font-variant: small-caps;
|
|
|
- color: #000;
|
|
|
- margin-right: 29px;
|
|
|
- line-height: 74px;
|
|
|
- }
|
|
|
-
|
|
|
.el-menu-demo {
|
|
|
background: rgba(0, 0, 0, 0);
|
|
|
|