dev_202412
yujialong 1 month ago
parent 429f9d672c
commit 0c9e5562a1
  1. 43
      src/components/Sidebar.vue
  2. 2
      src/setting.js
  3. 6
      src/views/course/content/index.vue
  4. 18
      src/views/resourse/index.vue
  5. 26
      src/views/system/index.vue
  6. 2
      src/views/workbench/index.vue

@ -30,12 +30,13 @@
</template>
<script>
import Setting from '@/setting'
export default {
props: ['path'],
data () {
return {
active: '',
menus: [
defaultMenus: [
{
index: '1',
title: '系统后台',
@ -125,6 +126,7 @@ export default {
]
},
],
menus: [],
};
},
watch: {
@ -136,9 +138,46 @@ export default {
}
},
mounted () {
Setting.dynamicRoute && this.initTabs()
},
methods: {
initTabs () {
const { btns } = this.$store.state
const tabs = this.defaultMenus
btns.includes('/configure') && this.menus.push(tabs[0])
const children1 = []
btns.includes('/curriculum') && children1.push(tabs[1].children[0])
btns.includes('/theoreticalCourse') && children1.push(tabs[1].children[1])
btns.includes('/information') && children1.push(tabs[1].children[2])
btns.includes('/resourse') && children1.push(tabs[1].children[3])
this.menus.push({
index: '2',
title: '职站教学后台',
children: children1
})
const children2 = []
btns.includes('/shop:产品管理') && children2.push(tabs[2].children[0])
btns.includes('/shop:营销推广管理') && children2.push(tabs[2].children[1])
btns.includes('/parnerOperation') && children2.push(tabs[2].children[2])
btns.includes('/parner') && children2.push(tabs[2].children[3])
this.menus.push({
index: '3',
title: '职站商城后台',
children: children2
})
const children3 = []
btns.includes('/match') && children3.push(tabs[3].children[0])
btns.includes('/data') && children3.push(tabs[3].children[1])
btns.includes('/review') && children3.push(tabs[3].children[2])
this.menus.push({
index: '4',
title: '运营后台',
children: children3
})
},
handleSelect (index) {
},

@ -51,7 +51,7 @@ const Setting = {
isDev,
isPro,
// 是否使用动态路由
dynamicRoute: false,
dynamicRoute: true,
/**
* @description 默认密码
*/

@ -31,10 +31,10 @@
<el-input style="width: 300px" placeholder="请输入资源名称" prefix-icon="el-icon-search" v-model="keyword"
clearable></el-input>
<div>
<el-button class="action-btn" @click="showSource" v-auth="'/curriculum:内容设置:修改章节名称'">添加系统资源</el-button>
<el-button class="action-btn" @click="showSource" v-auth="'/curriculum:内容设置:添加小节'">添加系统资源</el-button>
<el-button class="action-btn" @click="addSection" v-auth="'/curriculum:内容设置:添加小节'">本地上传</el-button>
<el-button class="action-btn" @click="move" v-auth="'/curriculum:内容设置:删除章节'">批量移动</el-button>
<el-button class="action-btn" v-auth="'/curriculum:内容设置:删除节'" @click="batchDelSection">批量移除</el-button>
<el-button class="action-btn" @click="move" v-auth="'/curriculum:内容设置:编辑排序'">批量移动</el-button>
<el-button class="action-btn" v-auth="'/curriculum:内容设置:删除节'" @click="batchDelSection">批量移除</el-button>
</div>
</div>

@ -161,7 +161,7 @@ export default {
data () {
return {
active: +this.$route.query.type || 0,
tabs: [
defaultTabs: [
{
id: 0,
name: '教学课程'
@ -175,6 +175,7 @@ export default {
name: '文件素材'
},
],
tabs: [],
timer: null,
types: SourceConst.types,
courses: [],
@ -268,11 +269,26 @@ export default {
}
},
mounted () {
Setting.dynamicRoute && this.initTabs()
this.insertScript()
this.getData()
this.getCourse()
},
methods: {
initTabs () {
const { btns } = this.$store.state
const tab1 = btns.includes('/resourse:教学课程')
const tab2 = btns.includes('/resourse:精品课程')
const tab3 = btns.includes('/resourse:文件素材')
const tabs = this.defaultTabs
tab1 && this.tabs.push(tabs[0])
tab2 && this.tabs.push(tabs[1])
tab3 && this.tabs.push(tabs[2])
const type = +this.$route.query.type
this.active = this.tabs.find(e => e.id === type) ? type : this.tabs[0].id
},
async getData () {
this.loading = true
try {

@ -1,12 +1,8 @@
<template>
<div class="page system"
style="padding: 0">
<div class="page system" style="padding: 0">
<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, index) in tabs" :key="index" :class="{ active: index == active }"
@click="tabChange(index)">{{ item }}</a>
</div>
<staff v-if="active == 'staff'"></staff>
@ -16,8 +12,8 @@
<div v-if="active == 'task'">
<p class="tips">账号admin;密码huoran@2023</p>
<iframe class="frame"
:src="isPro ? 'https://xxl.huorantech.cn/xxl-job-admin/' : 'http://121.37.12.51:8001/xxl-job-admin/'"
frameborder="0"></iframe>
:src="isPro ? 'https://xxl.huorantech.cn/xxl-job-admin/' : 'http://121.37.12.51:8001/xxl-job-admin/'"
frameborder="0"></iframe>
</div>
<taskLog v-if="active == 'taskLog'"></taskLog>
</div>
@ -56,7 +52,7 @@ export default {
taskLog
},
created () {
Setting.dynamicRoute && this.initTabs();
Setting.dynamicRoute && this.initTabs()
},
methods: {
tabChange (index) {
@ -90,13 +86,15 @@ export default {
<style lang="scss" scoped>
.system {
min-height: calc(100vh - 170px);
min-height: calc(100vh - 170px);
}
.tips {
padding: 10px;
padding: 10px;
}
.frame {
width: 100%;
height: calc(100vh - 280px);
width: 100%;
height: calc(100vh - 280px);
}
</style>

@ -24,7 +24,7 @@
<img src="@/assets/img/workbench/8.png" alt="">
<p class="name">资讯管理</p>
</div>
<div class="app" @click="to('/resourse')">
<div class="app" v-auth="'/resourse'" @click="to('/resourse')">
<img src="@/assets/img/workbench/9.png" alt="">
<p class="name">资源库</p>
</div>

Loading…
Cancel
Save