|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-container class="layout-container">
|
|
<el-container class="layout-container">
|
|
|
- <el-aside width="200px" class="el-aside">
|
|
|
|
|
|
|
+ <el-aside width="220px" class="el-aside">
|
|
|
<div class="logo">
|
|
<div class="logo">
|
|
|
<img class="logo-mark" src="@/assets/logo-mark.png" alt="爱伴" />
|
|
<img class="logo-mark" src="@/assets/logo-mark.png" alt="爱伴" />
|
|
|
<span class="logo-text">爱伴-健康之旅</span>
|
|
<span class="logo-text">爱伴-健康之旅</span>
|
|
@@ -131,8 +131,10 @@
|
|
|
</el-menu>
|
|
</el-menu>
|
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
|
</el-aside>
|
|
</el-aside>
|
|
|
- <el-container>
|
|
|
|
|
- <el-header>
|
|
|
|
|
|
|
+ <el-container class="right-container">
|
|
|
|
|
+ <div class="crumb-bar">{{ breadcrumb }}</div>
|
|
|
|
|
+ <el-header class="page-head">
|
|
|
|
|
+ <h1 class="page-title">{{ pageTitle }}</h1>
|
|
|
<div class="header-right">
|
|
<div class="header-right">
|
|
|
<el-dropdown trigger="click" @command="handleCommand">
|
|
<el-dropdown trigger="click" @command="handleCommand">
|
|
|
<span class="el-dropdown-link username">
|
|
<span class="el-dropdown-link username">
|
|
@@ -168,6 +170,12 @@ export default {
|
|
|
'/review/submissions', '/review/cards', '/review/roadmaps', '/scoreboard', '/manual-score'],
|
|
'/review/submissions', '/review/cards', '/review/roadmaps', '/scoreboard', '/manual-score'],
|
|
|
management: ['/orders', '/stats']
|
|
management: ['/orders', '/stats']
|
|
|
},
|
|
},
|
|
|
|
|
+ groupLabels: {
|
|
|
|
|
+ overview: '概览与现场',
|
|
|
|
|
+ selection: '选拔',
|
|
|
|
|
+ training: '培训',
|
|
|
|
|
+ management: '管理'
|
|
|
|
|
+ },
|
|
|
reviewPaths: ['/review/submissions', '/review/cards', '/review/roadmaps']
|
|
reviewPaths: ['/review/submissions', '/review/cards', '/review/roadmaps']
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -188,6 +196,16 @@ export default {
|
|
|
defaultOpeneds: function () {
|
|
defaultOpeneds: function () {
|
|
|
return this.activeGroup ? [this.activeGroup] : []
|
|
return this.activeGroup ? [this.activeGroup] : []
|
|
|
},
|
|
},
|
|
|
|
|
+ pageTitle: function () {
|
|
|
|
|
+ return (this.$route.meta && this.$route.meta.title) || ''
|
|
|
|
|
+ },
|
|
|
|
|
+ breadcrumb: function () {
|
|
|
|
|
+ var label = this.groupLabel(this.$route.path)
|
|
|
|
|
+ var parts = ['首页']
|
|
|
|
|
+ if (label) parts.push(label)
|
|
|
|
|
+ if (this.pageTitle) parts.push(this.pageTitle)
|
|
|
|
|
+ return parts.join(' / ')
|
|
|
|
|
+ },
|
|
|
displayName: function () {
|
|
displayName: function () {
|
|
|
var name = this.$store.state.adminInfo.name || this.$store.state.adminInfo.username
|
|
var name = this.$store.state.adminInfo.name || this.$store.state.adminInfo.username
|
|
|
var role = this.$store.state.adminInfo.role
|
|
var role = this.$store.state.adminInfo.role
|
|
@@ -214,6 +232,15 @@ export default {
|
|
|
var self = this
|
|
var self = this
|
|
|
return paths.some(function (path) { return self.canSee(path) })
|
|
return paths.some(function (path) { return self.canSee(path) })
|
|
|
},
|
|
},
|
|
|
|
|
+ groupLabel: function (path) {
|
|
|
|
|
+ var groups = this.groupDefs
|
|
|
|
|
+ var labels = this.groupLabels
|
|
|
|
|
+ var keys = Object.keys(groups)
|
|
|
|
|
+ for (var i = 0; i < keys.length; i++) {
|
|
|
|
|
+ if (groups[keys[i]].indexOf(path) !== -1) return labels[keys[i]] || ''
|
|
|
|
|
+ }
|
|
|
|
|
+ return ''
|
|
|
|
|
+ },
|
|
|
handleMenuSelect: function (index) {
|
|
handleMenuSelect: function (index) {
|
|
|
if (index && index.startsWith('/')) {
|
|
if (index && index.startsWith('/')) {
|
|
|
this.$router.push(index)
|
|
this.$router.push(index)
|
|
@@ -332,13 +359,40 @@ export default {
|
|
|
background: #8FC4EE;
|
|
background: #8FC4EE;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.el-header {
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|
|
|
|
|
|
+/* ---- 右侧容器:面包屑 40px + 页头 56px + 内容区 ---- */
|
|
|
|
|
+.right-container {
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.crumb-bar {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 0 24px;
|
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
|
+ border-bottom: 1px solid #DCE7F1;
|
|
|
|
|
+ color: #6B7B8C;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.page-head {
|
|
|
|
|
+ height: 56px;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
|
|
|
|
+ justify-content: space-between;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- padding: 0 20px;
|
|
|
|
|
|
|
+ padding: 0 24px;
|
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
|
+ border-bottom: 1px solid #DCE7F1;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.page-title {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #1E3A5F;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.header-right {
|
|
.header-right {
|
|
@@ -347,13 +401,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.username {
|
|
.username {
|
|
|
- color: #606266;
|
|
|
|
|
|
|
+ color: #3B5A78;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.el-main {
|
|
.el-main {
|
|
|
background-color: #F0F4F9;
|
|
background-color: #F0F4F9;
|
|
|
- padding: 20px;
|
|
|
|
|
|
|
+ padding: 24px;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
z-index: 1;
|
|
z-index: 1;
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -367,5 +421,6 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
min-height: 0;
|
|
min-height: 0;
|
|
|
|
|
+ min-width: 1200px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|