侧边导肮更换

master
yu 7 days ago
parent 38d69167c2
commit 2c4be2efb0
  1. 17002
      package-lock.json
  2. 56
      src/layouts/home/index.vue
  3. 4
      src/pages/achievement/list/project.vue
  4. 2
      src/router/modules/information.js
  5. 12
      vue.config.js

17002
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -3,8 +3,10 @@
<v-head></v-head> <v-head></v-head>
<Navbar /> <Navbar />
<div class="layout"> <div class="layout">
<Sidebar :class="{ show: showSidebar }" :path.sync="path" /> <!-- <Sidebar :class="{ show: showSidebar }" :path.sync="path" /> -->
<div class="content"> <div class="content">
<el-page-header v-if="showSidebar" class="m-b-20" @back="back" :content="backName"></el-page-header>
<transition name="move" mode="out-in"> <transition name="move" mode="out-in">
<router-view class="view"></router-view> <router-view class="view"></router-view>
</transition> </transition>
@ -67,6 +69,49 @@ import { mapState, mapMutations, mapActions } from "vuex";
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
const backList = [
{
path: '/assessment/list',
name: '考核管理',
},
{
path: '/achievement/list',
name: '成绩管理',
},
{
path: '/evaluation/list',
name: '测评管理',
},
{
path: '/course/list',
name: '精品课程管理',
},
{
path: '/review/list',
name: '评阅中心',
},
{
path: '/information/list',
name: '资讯管理',
},
{
path: '/project/list',
name: '项目管理',
},
{
path: '/resourse/list',
name: '资源库',
},
// {
// path: '/exam/list',
// name: '',
// },
{
path: '/lesson/list',
name: '备课管理',
},
]
export default { export default {
components: { components: {
vHead, vHead,
@ -77,6 +122,7 @@ export default {
data () { data () {
return { return {
showSidebar: false, showSidebar: false,
backName: '',
path: '', path: '',
logVisible: false, logVisible: false,
list: [], list: [],
@ -121,7 +167,9 @@ export default {
handler (val) { handler (val) {
this.path = val this.path = val
// //
this.showSidebar = ['/assessment/list', '/achievement/list', '/evaluation/list', '/course/list', '/review/list', '/information/list', '/project/list', '/resourse/list', '/exam/list', '/review/list', '/lesson/list', '/resourse/list'].includes(val) const item = backList.find(e => e.path === val)
this.backName = item ? item.name : ''
this.showSidebar = item
}, },
immediate: true immediate: true
} }
@ -195,6 +243,9 @@ export default {
setTimeout(this.logout, 1500); setTimeout(this.logout, 1500);
} }
}, 1000); }, 1000);
},
back() {
this.$router.push('/workbench/list')
} }
} }
}; };
@ -203,6 +254,7 @@ export default {
.main { .main {
.layout { .layout {
display: flex; display: flex;
min-height: calc(100vh - 173px);
} }
.sidebar:not(.show) { .sidebar:not(.show) {

@ -183,7 +183,7 @@ export default {
// //
async getCourse () { async getCourse () {
if (this.$parent.active === 'tab2') { if (this.$parent.active == 2) {
const { data } = await this.$get(this.api.getSchoolEffectiveCourse) const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
this.curs = data this.curs = data
this.form.curriculumId = this.form.curriculumId || data[0].cid this.form.curriculumId = this.form.curriculumId || data[0].cid
@ -210,7 +210,7 @@ export default {
...this.form, ...this.form,
mallId: cur.mallId || '', mallId: cur.mallId || '',
systemId: cur.systemId || '', systemId: cur.systemId || '',
courseType: this.$parent.active === 'tab2' ? 0 : 1, courseType: this.$parent.active == 2 ? 0 : 1,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };

@ -22,7 +22,7 @@ export default {
{ {
name: `${pre}addArticle`, name: `${pre}addArticle`,
path: `addArticle`, path: `addArticle`,
component: () => import("@/pages/information/addArticle"), component: () => import("@/pages/information/addarticle"),
meta: { title: "新增文章" } meta: { title: "新增文章" }
} }
] ]

@ -18,11 +18,11 @@ module.exports = {
}, },
productionSourceMap: false, productionSourceMap: false,
chainWebpack: config => { chainWebpack: config => {
config.module // config.module
.rule("images") // .rule("images")
.use("image-webpack-loader") // .use("image-webpack-loader")
.loader("image-webpack-loader") // .loader("image-webpack-loader")
.options({ bypassOnDebug: true }) // .options({ bypassOnDebug: true })
.end(); // .end();
} }
} }
Loading…
Cancel
Save