给万里学院放开备课管理,其他学校隐藏

master
yujialong 1 week ago
parent aa91c8254b
commit 5a25741842
  1. 8
      src/layouts/sidebar/index.vue
  2. 50
      src/pages/achievement/list/index.vue
  3. 12
      src/pages/workbench/list/index.vue

@ -98,7 +98,7 @@ export default {
Setting.dynamicRoute && this.initTabs()
},
methods: {
initTabs () {
async initTabs () {
const { btns } = this
const tabs = this.defaultMenus
btns.includes('/assessment/list') && this.menus.push(tabs[0])
@ -109,7 +109,11 @@ export default {
btns.includes('/information/list') && this.menus.push(tabs[5])
btns.includes('/project/list') && this.menus.push(tabs[6])
btns.includes('/resourse/list') && this.menus.push(tabs[7])
btns.includes('/lesson/list') && this.menus.push(tabs[8])
const { data } = await this.$get(this.api.logoDetail)
this.showLesson = data.schoolId === 901
data.schoolId === 901 && btns.includes('/lesson/list') && this.menus.push(tabs[8])
},
handleSelect (index) {

@ -1,18 +1,17 @@
<template>
<div class="page">
<div class="tabs">
<a class="item" v-for="(item, index) in tabs" :key="index" :class="{ active: index == active }"
@click="tabChange(index)">{{ item }}</a>
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id == active }"
@click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="page-content">
<Course v-if="active == 'tab1'" />
<Project v-if="active == 'tab2' || active == 'tab3'" ref="project" />
<Course v-if="active == 1" />
<Project v-if="active == 2 || active == 3" ref="project" />
</div>
</div>
</template>
<script>
import Setting from "@/setting";
import { mapState } from "vuex";
import Course from "./course";
import Project from "./project";
@ -25,12 +24,17 @@ export default {
},
data () {
return {
active: this.$route.query.tab || "tab2", //
tabs: {
tab1: '课程维度',
tab2: '项目维度',
tab3: '我的课程',
},
active: this.$route.query.tab || 2,
tabs: [
{
id: 1,
name: '课程维度'
},
{
id: 2,
name: '项目维度'
},
]
};
},
computed: {
@ -40,17 +44,26 @@ export default {
},
mounted () {
this.$store.commit('achievement/setRow', null)
// Setting.dynamicRoute && this.initTabs();
this.getSchoolId()
},
methods: {
tabChange (i) {
// schoolId
async getSchoolId () {
const { data } = await this.$get(this.api.logoDetail)
data.schoolId === 901 && this.tabs.push({
id: 3,
name: '我的课程'
})
console.log("🚀 ~ getSchoolId ~ tabs:", this.tabs)
},
tabChange ({ id }) {
this.$router.push({
path: 'list',
query: {
tab: i
tab: id
}
})
this.active = i
this.active = id
const el = this.$refs.project
if (el && el.getCourse) {
@ -58,13 +71,6 @@ export default {
el.getCourse()
}
},
initTabs () {
const { btns } = this
const tab1 = btns.includes('/course/list:课程管理')
const tab2 = btns.includes('/course/list:分类管理')
tab1 || delete this.tabs.first
tab2 || delete this.tabs.second
}
}
};
</script>

@ -45,10 +45,10 @@
<img src="@/assets/img/workbench/9.png" alt="">
<p class="name">理论考试系统</p>
</div> -->
<!-- <div class="app" v-auth="'/lesson/list'" @click="to('/lesson')">
<div v-if="showLesson" class="app" v-auth="'/lesson/list'" @click="to('/lesson')">
<img src="@/assets/img/workbench/10.png" alt="">
<p class="name">备课管理</p>
</div> -->
</div>
<div class="app" v-auth="'/match/list'" @click="to('/match')">
<img src="@/assets/img/workbench/11.png" alt="">
<p class="name">赛事管理专业版</p>
@ -70,6 +70,7 @@ export default {
return {
matchPer: false,
systems: [],
showLesson: false,
};
},
computed: {
@ -78,7 +79,7 @@ export default {
])
},
mounted () {
this.getSchoolId()
},
methods: {
//
@ -86,6 +87,11 @@ export default {
const { show } = await this.$get(this.api.getCustomerOrder)
this.matchPer = show
},
// schoolId
async getSchoolId () {
const { data } = await this.$get(this.api.logoDetail)
this.showLesson = data.schoolId === 901
},
to (path) {
path === 'data' ? window.open('https://www.dataforward.cn/') : this.$router.push(path)
},

Loading…
Cancel
Save