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> </template>
<script> <script>
import Setting from '@/setting'
export default { export default {
props: ['path'], props: ['path'],
data () { data () {
return { return {
active: '', active: '',
menus: [ defaultMenus: [
{ {
index: '1', index: '1',
title: '系统后台', title: '系统后台',
@ -125,6 +126,7 @@ export default {
] ]
}, },
], ],
menus: [],
}; };
}, },
watch: { watch: {
@ -136,9 +138,46 @@ export default {
} }
}, },
mounted () { mounted () {
Setting.dynamicRoute && this.initTabs()
}, },
methods: { 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) { handleSelect (index) {
}, },

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

@ -31,10 +31,10 @@
<el-input style="width: 300px" placeholder="请输入资源名称" prefix-icon="el-icon-search" v-model="keyword" <el-input style="width: 300px" placeholder="请输入资源名称" prefix-icon="el-icon-search" v-model="keyword"
clearable></el-input> clearable></el-input>
<div> <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="addSection" v-auth="'/curriculum:内容设置:添加小节'">本地上传</el-button>
<el-button class="action-btn" @click="move" 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" v-auth="'/curriculum:内容设置:删除节'" @click="batchDelSection">批量移除</el-button>
</div> </div>
</div> </div>

@ -161,7 +161,7 @@ export default {
data () { data () {
return { return {
active: +this.$route.query.type || 0, active: +this.$route.query.type || 0,
tabs: [ defaultTabs: [
{ {
id: 0, id: 0,
name: '教学课程' name: '教学课程'
@ -175,6 +175,7 @@ export default {
name: '文件素材' name: '文件素材'
}, },
], ],
tabs: [],
timer: null, timer: null,
types: SourceConst.types, types: SourceConst.types,
courses: [], courses: [],
@ -268,11 +269,26 @@ export default {
} }
}, },
mounted () { mounted () {
Setting.dynamicRoute && this.initTabs()
this.insertScript() this.insertScript()
this.getData() this.getData()
this.getCourse() this.getCourse()
}, },
methods: { 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 () { async getData () {
this.loading = true this.loading = true
try { try {

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

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

Loading…
Cancel
Save