luyanan лет назад: 6
Родитель
Сommit
a03bddddc6
4 измененных файлов с 22 добавлено и 7 удалено
  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
function hasPermission(roles, permissionRoles) {
10
function hasPermission(roles, permissionRoles) {
11
  if (roles.indexOf('1') >= 0) return true
11
  if (roles.indexOf('1') >= 0) return true
12
  if (!permissionRoles) return true
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
const whiteList = ['/login', '/findPwd'] // 不重定向白名单
16
const whiteList = ['/login', '/findPwd'] // 不重定向白名单

+ 9 - 5
src/router/index.js

48
      meta: { title: '主页', noCache: true }
48
      meta: { title: '主页', noCache: true }
49
    }]
49
    }]
50
  },
50
  },
51
52
  {
51
  {
53
    path: '',
52
    path: '',
53
    hidden: true,
54
    component: Layout,
54
    component: Layout,
55
    name: 'bridgesConsole',
55
    name: 'bridgesConsole',
56
    // meta: {
57
    //   noCache: true
58
    // },
56
    meta: {
57
      noCache: true,
58
      roles: ['0']
59
    },
59
    children: [
60
    children: [
60
      {
61
      {
61
        path: 'bridgeDetail',
62
        path: 'bridgeDetail',
88
        path: 'bridgeMonitor',
89
        path: 'bridgeMonitor',
89
        name: 'bridgeMonitor',
90
        name: 'bridgeMonitor',
90
        component: () => import('@/views/bridgesConsole/bridgeMonitor/index'),
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
<template>
1
<template>
2
  <div class="dashboard-editor-container">
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
  </div>
5
  </div>
5
</template>
6
</template>
6
7
21
22
22
<style rel="stylesheet/scss" lang="scss" scoped>
23
<style rel="stylesheet/scss" lang="scss" scoped>
23
.dashboard-editor-container {
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
  .plat-tit{
33
  .plat-tit{
25
    font-size: 34px;
34
    font-size: 34px;
35
    line-height: 60px;
36
    letter-spacing: 4px;
26
  }
37
  }
27
}
38
}
28
</style>
39
</style>