Browse Source

导航状态

luyanan 6 years ago
parent
commit
a03bddddc6
4 changed files with 22 additions and 7 deletions
  1. 1 1
      src/permission.js
  2. 9 5
      src/router/index.js
  3. 12 1
      src/views/dashboard/admin/index.vue
  4. BIN
      static/bg.png

+ 1 - 1
src/permission.js

@ -10,7 +10,7 @@ NProgress.configure({ showSpinner: false })// NProgress Configuration
10 10
function hasPermission(roles, permissionRoles) {
11 11
  if (roles.indexOf('1') >= 0) return true
12 12
  if (!permissionRoles) return true
13
  return roles.some(role => permissionRoles.indexOf(role) >= 0)
13
  return roles.some(role => permissionRoles.indexOf('1') >= 0)
14 14
}
15 15
16 16
const whiteList = ['/login', '/findPwd'] // 不重定向白名单

+ 9 - 5
src/router/index.js

@ -48,14 +48,15 @@ export const constantRouterMap = [
48 48
      meta: { title: '主页', noCache: true }
49 49
    }]
50 50
  },
51
52 51
  {
53 52
    path: '',
53
    hidden: true,
54 54
    component: Layout,
55 55
    name: 'bridgesConsole',
56
    // meta: {
57
    //   noCache: true
58
    // },
56
    meta: {
57
      noCache: true,
58
      roles: ['0']
59
    },
59 60
    children: [
60 61
      {
61 62
        path: 'bridgeDetail',
@ -88,7 +89,10 @@ export const constantRouterMap = [
88 89
        path: 'bridgeMonitor',
89 90
        name: 'bridgeMonitor',
90 91
        component: () => import('@/views/bridgesConsole/bridgeMonitor/index'),
91
        meta: { title: '历史监测信息查询', noCache: true }
92
        meta: {
93
          title: '历史监测信息查询',
94
          roles: ['0'],
95
          noCache: true }
92 96
      }
93 97
    ]
94 98
  }

+ 12 - 1
src/views/dashboard/admin/index.vue

@ -1,6 +1,7 @@
1 1
<template>
2 2
  <div class="dashboard-editor-container">
3
    <p class="plat-tit">欢迎使用声脉桥梁云监控平台</p>
3
    <img class="plat-pic" src="/static/pg.png" alt="桥梁">
4
    <p class="plat-tit">欢迎使用<br />声脉桥梁云监控平台</p>
4 5
  </div>
5 6
</template>
6 7
@ -21,8 +22,18 @@ export default {
21 22
22 23
<style rel="stylesheet/scss" lang="scss" scoped>
23 24
.dashboard-editor-container {
25
  display: flex;
26
  align-items: center;
27
  justify-content: center;
28
  flex-direction: column;
29
  text-align: center;
30
  .plat-pic{
31
    margin: 40px auto 10px;
32
  }
24 33
  .plat-tit{
25 34
    font-size: 34px;
35
    line-height: 60px;
36
    letter-spacing: 4px;
26 37
  }
27 38
}
28 39
</style>

BIN
static/bg.png