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

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

@ -98,7 +98,7 @@ export default {
Setting.dynamicRoute && this.initTabs() Setting.dynamicRoute && this.initTabs()
}, },
methods: { methods: {
initTabs () { async initTabs () {
const { btns } = this const { btns } = this
const tabs = this.defaultMenus const tabs = this.defaultMenus
btns.includes('/assessment/list') && this.menus.push(tabs[0]) 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('/information/list') && this.menus.push(tabs[5])
btns.includes('/project/list') && this.menus.push(tabs[6]) btns.includes('/project/list') && this.menus.push(tabs[6])
btns.includes('/resourse/list') && this.menus.push(tabs[7]) 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) { handleSelect (index) {

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

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

Loading…
Cancel
Save