|
@@ -5,6 +5,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="ulT">
|
|
<div class="ulT">
|
|
|
|
|
|
|
|
+ <!-- 默认首页 -->
|
|
<div @click.stop="goto(0)" :style="{background :activeL === 0 ?'#E6F0FF':'',zIndex : 10000 }">
|
|
<div @click.stop="goto(0)" :style="{background :activeL === 0 ?'#E6F0FF':'',zIndex : 10000 }">
|
|
<div class="menu_left">
|
|
<div class="menu_left">
|
|
<img class="logo" :src="activeL === 0 ? require('../assets/img/sy1.svg') : require('../assets/img/sy.svg')" alt="">
|
|
<img class="logo" :src="activeL === 0 ? require('../assets/img/sy1.svg') : require('../assets/img/sy.svg')" alt="">
|
|
@@ -12,46 +13,64 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div v-for="(item,index) in fromL.admin.sidebar.list" @click.stop="goto(index,item)" :style="{background :activeL === (index +1) ?'#E6F0FF':'',zIndex : 10000 }" :key="index+1">
|
|
|
|
|
|
+ <!-- 权限 -->
|
|
|
|
+ <div v-for="(item,index) in appSignL(fromL.admin.sidebar.list)"
|
|
|
|
+ @click.stop="goto(index,item)"
|
|
|
|
+ :style="{background :activeL === (index +1) ?'#E6F0FF':'',zIndex : 10000 }"
|
|
|
|
+ :key="index+1">
|
|
|
|
+
|
|
|
|
+ <!-- 渲染菜单类型 -->
|
|
<div class="menu_left" v-if="item.menuName">
|
|
<div class="menu_left" v-if="item.menuName">
|
|
<img class="logo" :src="activeL === (index +1) ? item.menuActiveIcon : item.menuIcon" alt="">
|
|
<img class="logo" :src="activeL === (index +1) ? item.menuActiveIcon : item.menuIcon" alt="">
|
|
- <span :style="{color : activeL === (index +1) ? '#0051D7' :''}">{{ item.menuName }}</span>
|
|
|
|
|
|
+ <span :style="{color : activeL === (index +1) ? '#0051D7' :''}">{{ item.menuName }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="menu_left" v-else>
|
|
|
|
- <div v-for="(p,pin) in item.url" :key="pin+'p'">
|
|
|
|
- <img class="logo3"
|
|
|
|
- v-if="p.region == userinfo.schoolArea && p.icon"
|
|
|
|
- :src="activeL === (index +1) ? p.icon : p.activeIcon"
|
|
|
|
- alt="">
|
|
|
|
- <img class="logo3" v-else-if="p.region == 'cn'" :src="p.icon" alt="">
|
|
|
|
|
|
+ <!-- 渲染应用类型, status判断是否被删除 isAdmin是否为管理员可见 -->
|
|
|
|
+ <div v-else>
|
|
|
|
+ <div>
|
|
|
|
+ <div v-for="(p,pin) in AppCon(item.url)" :key="pin+'p'">
|
|
|
|
+ <div class="menu_left" >
|
|
|
|
+ <div>
|
|
|
|
+ <img class="logo3"
|
|
|
|
+ :src="activeL === (index +1) ? p.icon : p.activeIcon"
|
|
|
|
+ alt="">
|
|
|
|
+ </div>
|
|
|
|
+ <span :style="{color : activeL === (index +1) ? '#0051D7' :''}">
|
|
|
|
+ {{ p.name }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <span :style="{color : activeL === (index +1) ? '#0051D7' :''}">{{ item.description }}</span>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="userInfo">
|
|
<div class="userInfo">
|
|
- <img style="width: 40px;border-radius: 50%;margin-bottom: 4px;" :src="userinfo.headportrait ? userinfo.headportrait : require('../assets/img/root.png')" alt="">
|
|
|
|
|
|
+ <img style="width: 40px;height: 40px;object-fit: cover;border-radius: 50%;margin-bottom: 4px;" :src="userinfo.headportrait ? userinfo.headportrait : require('../assets/img/toux.png')" alt="">
|
|
<div style="margin-bottom: 8px;">{{ userinfo.username }}</div>
|
|
<div style="margin-bottom: 8px;">{{ userinfo.username }}</div>
|
|
|
|
+ <span style="cursor: pointer;padding: 5px;background-color: #e7e7e7;box-sizing: border-box;border-radius: 5px;" @click="handleLogout">退出登录</span>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 二级导航 -->
|
|
<div class="ulTCopy" v-if="isShow && barCopy.length != 0" >
|
|
<div class="ulTCopy" v-if="isShow && barCopy.length != 0" >
|
|
<div class="ulTCopyTit">
|
|
<div class="ulTCopyTit">
|
|
<span>教学中心</span>
|
|
<span>教学中心</span>
|
|
<span @click="closeCopy" class="cha" style="color: #6B7280;font-size: 23px;cursor: pointer;">⨯</span>
|
|
<span @click="closeCopy" class="cha" style="color: #6B7280;font-size: 23px;cursor: pointer;">⨯</span>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<div style="padding: 16px;box-sizing: border-box;">
|
|
<div style="padding: 16px;box-sizing: border-box;">
|
|
- <div class="ulTCopyTxt" v-for="(i,ind) in barCopy" @click="levTwo(i)" :key="ind+'a'">
|
|
|
|
- <div v-for="(p,pin) in i.url" :key="pin+'p'">
|
|
|
|
- <img style="width: 30px;object-fit: contain;margin-right: 5px;"
|
|
|
|
- v-if="p.region == userinfo.schoolArea && p.icon"
|
|
|
|
- :src="p.icon"
|
|
|
|
- alt="">
|
|
|
|
-
|
|
|
|
- <img style="width: 30px;object-fit: contain;margin-right: 5px;" v-else-if="p.region == 'cn'" :src="p.icon" alt="">
|
|
|
|
|
|
+ <div class="ulTCopyTxt" v-for="(i,ind) in appSignL(barCopy)" @click="levTwo(i)" :key="ind+'a'">
|
|
|
|
+ <div>
|
|
|
|
+ <div style="display: flex;justify-content: space-between;align-items: center;" v-for="(p,pin) in AppCon(i.url)" :key="pin+'p'">
|
|
|
|
+ <div>
|
|
|
|
+ <img style="width: 30px;object-fit: contain;margin-right: 5px;"
|
|
|
|
+ :src="p.icon"
|
|
|
|
+ alt="">
|
|
|
|
+ </div>
|
|
|
|
+ <span>{{ p.name }}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <span >{{ i.description }}</span>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -63,10 +82,53 @@
|
|
<script>
|
|
<script>
|
|
import { mapGetters, mapActions } from 'vuex';
|
|
import { mapGetters, mapActions } from 'vuex';
|
|
import { loginOut } from '@/api/user';
|
|
import { loginOut } from '@/api/user';
|
|
|
|
+import store from '../store'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['userinfo','fromL']),
|
|
|
|
|
|
+ ...mapGetters(['userinfo','fromL','appSign']),
|
|
|
|
+ // 如果hk,com没有图标,默认使用cn的
|
|
|
|
+ AppCon(){
|
|
|
|
+ return function(c) {
|
|
|
|
+ let k = JSON.parse(JSON.stringify(c))
|
|
|
|
+ let data = k.filter(e=>{
|
|
|
|
+ return e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ let data2 = k.filter(e=>{
|
|
|
|
+ return e.region == 'cn'
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ // 如果hk,com没有图标,默认使用cn的
|
|
|
|
+ if (!data[0].icon){
|
|
|
|
+ data[0].icon = data2[0].icon
|
|
|
|
+ data[0].activeIcon = data2[0].activeIcon
|
|
|
|
+ }
|
|
|
|
+ return data
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ // 筛选是否为管理员可见,是否被删除
|
|
|
|
+ appSignL(){
|
|
|
|
+ return function(val){
|
|
|
|
+ console.log(val);
|
|
|
|
+
|
|
|
|
+ let data = []
|
|
|
|
+ if (this.userinfo.type == 1 && this.userinfo.role == 1) {
|
|
|
|
+ val.forEach( e =>{
|
|
|
|
+ if (e.menuName || e.status == 0) {
|
|
|
|
+ data.push(e)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ val.forEach( e =>{
|
|
|
|
+ if (e.menuName || (e.isAdmin == '0' && e.status == 0)) {
|
|
|
|
+ data.push(e)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ return data
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -76,9 +138,7 @@ import { loginOut } from '@/api/user';
|
|
activeL:0,
|
|
activeL:0,
|
|
// 二级分类
|
|
// 二级分类
|
|
barCopy:[],
|
|
barCopy:[],
|
|
- // 应用标识
|
|
|
|
- appSign:'',
|
|
|
|
- levAppSign:''
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -112,13 +172,17 @@ import { loginOut } from '@/api/user';
|
|
this.isShow = false
|
|
this.isShow = false
|
|
},
|
|
},
|
|
// 点击一级导航
|
|
// 点击一级导航
|
|
- goto(index,val = null){
|
|
|
|
- this.levAppSign = ''
|
|
|
|
|
|
+ async goto(index,val = null){
|
|
|
|
+ console.log('goto',val);
|
|
|
|
+
|
|
|
|
+ // val = null 就是点击了首页
|
|
if (val) {
|
|
if (val) {
|
|
this.activeL = index + 1
|
|
this.activeL = index + 1
|
|
}else{
|
|
}else{
|
|
- this.appSign = ''
|
|
|
|
|
|
+ // 点击首页清空内容,并把标识去除
|
|
|
|
+ await store.commit('user/SET_AppSIGN', '')
|
|
document.querySelector('#pageCon').innerHTML = '';
|
|
document.querySelector('#pageCon').innerHTML = '';
|
|
|
|
+ this.$emit('getPer')
|
|
|
|
|
|
this.isShow = false
|
|
this.isShow = false
|
|
this.activeL = index
|
|
this.activeL = index
|
|
@@ -126,24 +190,26 @@ import { loginOut } from '@/api/user';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- // 有二级导航的显示二级导航,清除一级导航应用
|
|
|
|
- if (this.fromL.admin.sidebar.list[index].children) {
|
|
|
|
- this.barCopy = JSON.parse(JSON.stringify(this.fromL.admin.sidebar.list[index].children))
|
|
|
|
|
|
+ // 有二级导航的显示二级导航.无二级则进行判断
|
|
|
|
+ if (val.children) {
|
|
|
|
+ this.barCopy = JSON.parse(JSON.stringify(val.children))
|
|
this.isShow = true
|
|
this.isShow = true
|
|
|
|
|
|
- this.appSign = ''
|
|
|
|
- document.querySelector('#pageCon').innerHTML = '';
|
|
|
|
|
|
+ // this.appSign = ''
|
|
|
|
+ // document.querySelector('#pageCon').innerHTML = '';
|
|
}else{
|
|
}else{
|
|
this.isShow = false
|
|
this.isShow = false
|
|
|
|
|
|
// 点击相同应用不刷新
|
|
// 点击相同应用不刷新
|
|
if (this.appSign == val.toolId) return
|
|
if (this.appSign == val.toolId) return
|
|
- this.appSign = val.toolId
|
|
|
|
|
|
+
|
|
|
|
+ // 更新标识
|
|
|
|
+ await store.commit('user/SET_AppSIGN', val.toolId)
|
|
|
|
|
|
let url = ''
|
|
let url = ''
|
|
// 查出对应账号的应用区域地址
|
|
// 查出对应账号的应用区域地址
|
|
val.url.forEach(e => {
|
|
val.url.forEach(e => {
|
|
- if (e.region == this.userinfo.schoolArea) {
|
|
|
|
|
|
+ if (e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea) {
|
|
url = e.url
|
|
url = e.url
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -152,22 +218,44 @@ import { loginOut } from '@/api/user';
|
|
|
|
|
|
document.querySelector('#pageCon').innerHTML = '';
|
|
document.querySelector('#pageCon').innerHTML = '';
|
|
|
|
|
|
- // console.log(document.querySelector('#pageCon'));
|
|
|
|
- window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom)
|
|
|
|
|
|
+ if (val.toolId == 'dataBoardNew') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org','role'])
|
|
|
|
+ }else if (val.toolId == 'classroomObservation') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org'])
|
|
|
|
+ }else if (val.toolId == 'teacher') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org'])
|
|
|
|
+ }else if (val.toolId == 'futureClass') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org','role'])
|
|
|
|
+ }else if (val.toolId == 'student') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','classId','org','role'])
|
|
|
|
+ }else if (val.toolId == 'appStore') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org','role'])
|
|
|
|
+ }else if (val.toolId == 'testTeacher') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org','role'])
|
|
|
|
+ }else if (val.toolId == 'evaluate') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org'])
|
|
|
|
+ }else if (val.toolId == 'project') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org','role'])
|
|
|
|
+ }else if (val.toolId == 'study') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org','type','classId','TscreenType'])
|
|
|
|
+ }else if (val.toolId == 'knowledge') {
|
|
|
|
+ window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom,['userid','oid','org'])
|
|
|
|
+ }
|
|
// 应用标识,url,存储dom
|
|
// 应用标识,url,存储dom
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 点击二级导航
|
|
// 点击二级导航
|
|
- levTwo(val){
|
|
|
|
- this.appSign = ''
|
|
|
|
-
|
|
|
|
|
|
+ async levTwo(val){
|
|
|
|
+
|
|
// 点击相同应用不刷新
|
|
// 点击相同应用不刷新
|
|
- if (this.levAppSign == val.toolId) return
|
|
|
|
- this.levAppSign = val.toolId
|
|
|
|
|
|
+ if (this.appSign == val.toolId) return
|
|
|
|
+
|
|
|
|
+ // 更新标识
|
|
|
|
+ await store.commit('user/SET_AppSIGN', val.toolId)
|
|
|
|
|
|
let url = ''
|
|
let url = ''
|
|
val.url.forEach(e => {
|
|
val.url.forEach(e => {
|
|
- if (e.region == this.userinfo.schoolArea) {
|
|
|
|
|
|
+ if (e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea) {
|
|
url = e.url
|
|
url = e.url
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -210,6 +298,7 @@ import { loginOut } from '@/api/user';
|
|
align-items: center;
|
|
align-items: center;
|
|
padding: 8px;
|
|
padding: 8px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
+ padding-bottom: 20px;
|
|
}
|
|
}
|
|
.left {
|
|
.left {
|
|
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
|
|
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
|
|
@@ -222,7 +311,7 @@ import { loginOut } from '@/api/user';
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
position: relative;
|
|
box-shadow: 5px 0 8px rgba(0, 0, 0, 0.1);
|
|
box-shadow: 5px 0 8px rgba(0, 0, 0, 0.1);
|
|
- z-index: 9999;
|
|
|
|
|
|
+ z-index: 999;
|
|
|
|
|
|
}
|
|
}
|
|
.left .ulT {
|
|
.left .ulT {
|
|
@@ -231,13 +320,13 @@ import { loginOut } from '@/api/user';
|
|
padding: 8px;
|
|
padding: 8px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+ gap: 10px;
|
|
|
|
+ overflow: auto;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
}
|
|
}
|
|
.left .ulT div{
|
|
.left .ulT div{
|
|
- margin-top: 10px;
|
|
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
- overflow: hidden;
|
|
|
|
}
|
|
}
|
|
.ulTCopy{
|
|
.ulTCopy{
|
|
position: absolute;
|
|
position: absolute;
|