Przeglądaj źródła

[FE]考勤路由权限

as1565066165 4 lat temu
rodzic
commit
bfcc4542e1

+ 18 - 6
security-protection-platform/.aid/aid.js

1
const { join } = require('path')
1
const { join } = require('path')
2
const { name } = require('../package.json')
2
const { name } = require('../package.json')
3
3
4
function resolve(dir) {
4
function resolve (dir) {
5
  return join(__dirname, dir)
5
  return join(__dirname, dir)
6
}
6
}
7
7
8
const subappURL = 'http://localhost:5000/'
8
const subappURL = 'http://localhost:5000/'
9
9
10
function rules(config) {
10
function rules (config) {
11
  let rules = config.module.rules.map(v => {
11
  let rules = config.module.rules.map(v => {
12
    if(v.test.toString() === '/\\.css/') {
12
    if (v.test.toString() === '/\\.css/') {
13
      return {
13
      return {
14
        test: /\.css/,
14
        test: /\.css/,
15
        use: [require.resolve('style-loader'), require.resolve('css-loader')]
15
        use: [require.resolve('style-loader'), require.resolve('css-loader')]
42
  cssExt: ".scss", //入口css文件后缀名
42
  cssExt: ".scss", //入口css文件后缀名
43
  autocheck: ['aid-elements-desktop', 'aid-font', 'aid-desktop'],
43
  autocheck: ['aid-elements-desktop', 'aid-font', 'aid-desktop'],
44
  strict: false,
44
  strict: false,
45
  beforeDev(config) {
45
  beforeDev (config) {
46
    return rules(config)
46
    return rules(config)
47
  },
47
  },
48
  beforeBuild(config) {
48
  beforeBuild (config) {
49
    let result = rules(config)
49
    let result = rules(config)
50
    result.output = {
50
    result.output = {
51
      publicPath: '/'
51
      publicPath: '/'
55
  //hmrPath: subappURL, // 作为子应用必须启用
55
  //hmrPath: subappURL, // 作为子应用必须启用
56
  //imagePrefix: url => `${subappURL}/asset/image/${url}`, // 作为子应用必须启用
56
  //imagePrefix: url => `${subappURL}/asset/image/${url}`, // 作为子应用必须启用
57
  //fontPrefix: url => `${subappURL}/asset/font/${url}`, // 作为子应用必须启用
57
  //fontPrefix: url => `${subappURL}/asset/font/${url}`, // 作为子应用必须启用
58
  outputPrefix: '/' // 构建后index.html中资源路径的前缀
58
  outputPrefix: '/',// 构建后index.html中资源路径的前缀
59
  proxy: [
60
    {
61
      url: '/sp',
62
      options: {
63
        target: 'http://10.19.90.34:8018',
64
        changeOrigin: true,
65
        pathRewrite: {
66
          '^/sp': '/'
67
        }
68
      }
69
    },
70
  ]
59
}
71
}

+ 6 - 0
security-protection-platform/src/api/login/index.js

8
    return $default.post('/sp/login/login', data).then(resp => {
8
    return $default.post('/sp/login/login', data).then(resp => {
9
      return resp.data
9
      return resp.data
10
    })
10
    })
11
  },
12
  // 获取用户菜单权限
13
  findMenus (data) {
14
    return $default.post('/sp/login/findMenus', data).then(resp => {
15
      return resp.data
16
    })
11
  }
17
  }
12
}
18
}
13
export default api
19
export default api

+ 2 - 2
security-protection-platform/src/conf/axios.config.js

39
  },
39
  },
40
  root: {
40
  root: {
41
    default: {
41
    default: {
42
      baseURL: 'http://10.19.90.34:8018'
42
      // baseURL: 'http://10.19.90.34:8018'
43
      // baseURL: 'http://localhost:8018'
43
      // baseURL: 'http://localhost:8018'
44
      // baseURL: '/'
44
      baseURL: '/sp'
45
    },
45
    },
46
    picurl: {
46
    picurl: {
47
      baseURL: 'http://10.19.90.34:19000/tool-image/'
47
      baseURL: 'http://10.19.90.34:19000/tool-image/'

+ 0 - 1
security-protection-platform/src/http.js

17
import config from './conf/axios.config.js'
17
import config from './conf/axios.config.js'
18
/* eslint no-useless-escape: "off" */
18
/* eslint no-useless-escape: "off" */
19
/* eslint no-prototype-builtins: "off" */
19
/* eslint no-prototype-builtins: "off" */
20
21
/**
20
/**
22
 * 深度合并多个对象,返回合并后的新对象
21
 * 深度合并多个对象,返回合并后的新对象
23
 * @private
22
 * @private

+ 3 - 0
security-protection-platform/src/main.js

26
// const hls = require('videojs-contrib-hls')
26
// const hls = require('videojs-contrib-hls')
27
// Vue.use(hls)
27
// Vue.use(hls)
28
28
29
import axios from 'axios'
30
axios.defaults.withCredentials = true
31
29
// 安装组件库插件
32
// 安装组件库插件
30
Vue.use(aid, {
33
Vue.use(aid, {
31
  local: i18nManager.language,
34
  local: i18nManager.language,

+ 59 - 36
security-protection-platform/src/modules/login/index.vue

8
        <h3 class="welcome">欢迎登录 <span class="system-name">AISI安防一体化管理平台</span></h3>
8
        <h3 class="welcome">欢迎登录 <span class="system-name">AISI安防一体化管理平台</span></h3>
9
        <t-form ref="loginForm" :model="loginForm" :rules="loginFormRules">
9
        <t-form ref="loginForm" :model="loginForm" :rules="loginFormRules">
10
          <t-form-item prop="userName">
10
          <t-form-item prop="userName">
11
            <t-input v-model="loginForm.userName" placeholder="admin" icon="user-outline" >
11
            <t-input v-model="loginForm.userName" placeholder="admin" icon="user-outline">
12
            </t-input>
12
            </t-input>
13
          </t-form-item>
13
          </t-form-item>
14
          <t-form-item prop="password">
14
          <t-form-item prop="password">
15
            <t-input v-model="loginForm.password" placeholder="Abc@1234" type="password" icon="lock-outline" >
15
            <t-input v-model="loginForm.password" placeholder="Abc@1234" type="password" icon="lock-outline">
16
            </t-input>
16
            </t-input>
17
          </t-form-item>
17
          </t-form-item>
18
          <t-form-item prop="verifyCode">
18
          <t-form-item prop="verifyCode">
19
            <t-input v-model="loginForm.verifyCode"
20
                     placeholder="请输入验证码" >
21
              <img slot="append"
22
                   :src="verifiyCode"
23
                   title="点击以刷新验证码"
24
                   style="height:30px; margin: 0 -12px;cursor:pointer"
25
                   @click="onVerifiyCodeClick"/>
19
            <t-input v-model="loginForm.verifyCode" placeholder="请输入验证码">
20
              <img slot="append" :src="verifiyCode" title="点击以刷新验证码" style="height:30px; margin: 0 -12px;cursor:pointer" @click="onVerifiyCodeClick" />
26
            </t-input>
21
            </t-input>
27
          </t-form-item>
22
          </t-form-item>
28
          <t-form-item class="mb-0">
23
          <t-form-item class="mb-0">
29
            <t-button :loading="loging"
30
                      color="primary"
31
                      block
32
                      @click="onLoginButtonClick">
24
            <t-button :loading="loging" color="primary" block @click="onLoginButtonClick">
33
              <span v-if="!loging">登录</span>
25
              <span v-if="!loging">登录</span>
34
              <span v-else>正在登录...</span>
26
              <span v-else>正在登录...</span>
35
            </t-button>
27
            </t-button>
44
import loginbg from '@/assets/images/loginbg.png'
36
import loginbg from '@/assets/images/loginbg.png'
45
import verifiyCode from '@/assets/images/verifiyCode.jpg'
37
import verifiyCode from '@/assets/images/verifiyCode.jpg'
46
import loginapi from '@/api/login'
38
import loginapi from '@/api/login'
39
import store from '@/store'
47
40
48
export default {
41
export default {
49
  filters: {
42
  filters: {
50
  },
43
  },
51
  components: {
44
  components: {
52
  },
45
  },
53
  data() {
46
  data () {
54
    return {
47
    return {
55
      loginbg: loginbg,
48
      loginbg: loginbg,
56
      loging: false,
49
      loging: false,
77
  computed: {
70
  computed: {
78
  },
71
  },
79
  mounted () {
72
  mounted () {
73
    let userName = localStorage.getItem('userName')
74
    if (userName) {
75
      this.loginForm.userName = userName
76
      this.rememberMe = true
77
    }
80
  },
78
  },
81
  methods: {
79
  methods: {
82
    onVerifiyCodeClick() {
80
    onVerifiyCodeClick () {
83
    },
81
    },
84
    onLoginButtonClick () {
82
    onLoginButtonClick () {
85
      if (this.loging) {
83
      if (this.loging) {
88
      this.loging = true
86
      this.loging = true
89
      this.$refs.loginForm.validate((valid) => {
87
      this.$refs.loginForm.validate((valid) => {
90
        if (valid) {
88
        if (valid) {
91
          loginapi.doLogin({userCode: this.loginForm.userName, passWord: this.loginForm.password}).then((data) => {
89
          loginapi.doLogin({ userCode: this.loginForm.userName, passWord: this.loginForm.password }).then(async (data) => {
92
            this.$store.commit('setLogged', true)
90
            this.$store.commit('setLogged', true)
93
            if (this.rememberMe) {
91
            if (this.rememberMe) {
94
              localStorage.setItem('userName', data.userName)
92
              localStorage.setItem('userName', data.RESULT.CODE)
95
            } else {
93
            } else {
96
              localStorage.removeItem('userName')
94
              localStorage.removeItem('userName')
97
            }
95
            }
96
            const res = await loginapi.findMenus({ userCode: data.RESULT.CODE })
97
            var map = new Map()
98
            res.RESULT.forEach(e => {
99
              if (e.ROOT_MENU) {
100
                map.set(e.ROOT_MENU[0].VIEWNAME, e.ROOT_MENU[0].ID)
101
              }
102
              // 第六个考勤报表没有 menu_list
103
              if (e.menu_list) {
104
                map.set(e.menu_list[0].VIEWNAME, e.ID)
105
              }
106
              if (e.child_list) {
107
                const str = e.child_list[0].menu_list[0].VIEWNAME
108
                map.set(str.substr(0, str.indexOf('/', 1)), parseInt(Math.random() * 1000000))
109
                e.child_list.forEach(m => {
110
                  map.set(m.menu_list[0].VIEWNAME, m.ID)
111
                  if (m.child_list) {
112
                    m.child_list.forEach(mn => {
113
                      map.set(mn.menu_list[0].VIEWNAME, mn.ID)
114
                    })
115
                  }
116
                })
117
              }
118
            })
119
            localStorage.setItem('menus', JSON.stringify(map))
120
            sessionStorage.setItem('isLogged', true)
98
            this.$router.push({ name: 'dashboard' })
121
            this.$router.push({ name: 'dashboard' })
99
          }).catch((e) => {
122
          }).catch((e) => {
100
            this.loging = false
123
            this.loging = false
111
</script>
134
</script>
112
135
113
<style lang="scss">
136
<style lang="scss">
114
.index{
115
  height:100vh;
116
  -moz-background-size:100% 100%;
117
  background-size:100% 100%;
118
  .user-form-box{
137
.index {
138
  height: 100vh;
139
  -moz-background-size: 100% 100%;
140
  background-size: 100% 100%;
141
  .user-form-box {
119
    padding: 20px 40px 20px 40px;
142
    padding: 20px 40px 20px 40px;
120
    background-color: #003561;
143
    background-color: #003561;
121
    position:fixed;
122
    left:70%;
123
    top:20%;
144
    position: fixed;
145
    left: 70%;
146
    top: 20%;
124
    width: 25%;
147
    width: 25%;
125
    height: 65%;
148
    height: 65%;
126
    .from{
149
    .from {
127
      width: 100%;
150
      width: 100%;
128
      height: 100%;
151
      height: 100%;
129
      .hello {
152
      .hello {
130
        height:36px;
131
        font-size:26px;
132
        font-weight:500;
153
        height: 36px;
154
        font-size: 26px;
155
        font-weight: 500;
133
        color: white;
156
        color: white;
134
        line-height:36px;
157
        line-height: 36px;
135
        margin-bottom: 4px;
158
        margin-bottom: 4px;
136
      }
159
      }
137
      .welcome {
160
      .welcome {
138
        height:36px;
139
        font-size:14px;
140
        font-weight:500;
141
        color:rgba(0,0,0,1);
142
        line-height:36px;
161
        height: 36px;
162
        font-size: 14px;
163
        font-weight: 500;
164
        color: rgba(0, 0, 0, 1);
165
        line-height: 36px;
143
        margin-bottom: 24px;
166
        margin-bottom: 24px;
144
        color: white;
167
        color: white;
145
      }
168
      }
146
      .system-name {
169
      .system-name {
147
        font-size: 14px;
170
        font-size: 14px;
148
        font-weight: 500;
171
        font-weight: 500;
149
        color: #0079BE;
172
        color: #0079be;
150
      }
173
      }
151
    }
174
    }
152
  }
175
  }

+ 27 - 1
security-protection-platform/src/router.js

27
  router.beforeEach(async (to, from, next) => {
27
  router.beforeEach(async (to, from, next) => {
28
    // TGlobalLoading.start()
28
    // TGlobalLoading.start()
29
    // const accessRoutes = await store.dispatch('permission/generateRoutes', 'user')
29
    // const accessRoutes = await store.dispatch('permission/generateRoutes', 'user')
30
    next()
30
    /*
31
     * 在每次视图切换时检查当前用户是否处于登
32
     * 录状态,如果没有登录则跳转到登录视图
33
     * 注意此时是调用getter中的isLogged获
34
     * 取客户端缓存的登录状态。
35
     * 真实登录状态仅在应用初始化和每次服务
36
     * 调用时检查即可,在视图(路由)切换时,
37
     * 为了提升视图切换性能(少请求一次服务),
38
     * 只需要调用getter中的isLogged进行简
39
     * 单客户端判断。
40
     * 参见src/frame.vue和src/store.js文件中的逻辑。
41
     */
42
    let isLogged = router.app.$options.store.getters.getLogged || sessionStorage.getItem('isLogged')
43
    console.log(isLogged)
44
    if (to.meta.ignoreAuth === true) {
45
      if (isLogged === true && to.path === '/login') {
46
        router.replace({ name: 'dashboard' })
47
      } else {
48
        next()
49
      }
50
    } else {
51
      if (isLogged === false) {
52
        router.replace({ name: 'login' })
53
      } else {
54
        next()
55
      }
56
    }
31
  })
57
  })
32
58
33
  router.afterEach(() => {
59
  router.afterEach(() => {

+ 32 - 21
security-protection-platform/src/routes.js

21
    name: 'login',
21
    name: 'login',
22
    path: '/login',
22
    path: '/login',
23
    component: () => import('./modules/login'),
23
    component: () => import('./modules/login'),
24
    meta: { title: '登录页', icon: 'home', ignoreAuth: true},
24
    meta: { title: '登录页', icon: 'home', ignoreAuth: true },
25
    hidden: true
25
    hidden: true
26
  },
26
  },
27
  {
27
  {
37
        meta: { title: '首页', icon: 'home' }
37
        meta: { title: '首页', icon: 'home' }
38
      }
38
      }
39
    ]
39
    ]
40
  },
40
  }
41
]
42
43
/**
44
 * asyncRoutes
45
 * the routes that need to be dynamically loaded based on user roles
46
 */
47
// 异步挂载的路由
48
// 动态需要根据权限加载的路由表
49
export const asyncRoutes = [
41
  {
50
  {
42
    path: '/videoSurveillance',
51
    path: '/videoSurveillance',
43
    component: Layout,
52
    component: Layout,
60
  {
69
  {
61
    path: '/access',
70
    path: '/access',
62
    component: Layout,
71
    component: Layout,
63
    meta: { icon: 'file-solution-outline' },
72
    meta: { title: '识别记录', icon: 'file-solution-outline' },
64
    children: [
73
    children: [
65
      {
74
      {
66
        name: 'access',
75
        name: 'access',
73
  {
82
  {
74
    path: '/alarm',
83
    path: '/alarm',
75
    component: Layout,
84
    component: Layout,
76
    meta: { icon: 'bell' },
85
    meta: { title: '智能报警', icon: 'bell' },
77
    children: [
86
    children: [
78
      {
87
      {
79
        name: 'ai_alarm',
88
        name: 'ai_alarm',
85
  }, {
94
  }, {
86
    path: '/workorder',
95
    path: '/workorder',
87
    component: Layout,
96
    component: Layout,
88
    meta: { icon: 'calendar-outline' },
97
    meta: { title: '假勤管理', icon: 'calendar-outline' },
89
    children: [
98
    children: [
90
      {
99
      {
91
        name: 'workorder',
100
        name: 'workorder',
103
    children: [
112
    children: [
104
      {
113
      {
105
        name: 'report',
114
        name: 'report',
106
        path: 'report',
115
        path: '/attendance/report',
107
        component: () => import(/* webpackChunkName: "report" */ './modules/attendance/report'),
116
        component: () => import(/* webpackChunkName: "report" */ './modules/attendance/report'),
108
        meta: { title: '考勤报表' }
117
        meta: { title: '考勤报表' }
109
      }, {
118
      }, {
110
        name: 'abnormal',
119
        name: 'abnormal',
111
        path: 'abnormal',
120
        path: '/attendance/abnormal',
112
        component: () => import(/* webpackChunkName: "abnormal" */ './modules/attendance/abnormal'),
121
        component: () => import(/* webpackChunkName: "abnormal" */ './modules/attendance/abnormal'),
113
        meta: { title: '异常考勤' }
122
        meta: { title: '异常考勤' }
114
      }
123
      }
115
    ]
124
    ]
116
  }, {
125
  },
126
  {
117
    path: '/system',
127
    path: '/system',
118
    component: Layout,
128
    component: Layout,
119
    meta: { title: '系统管理', icon: 'setting' },
129
    meta: { title: '系统管理', icon: 'setting' },
122
    children: [
132
    children: [
123
      {
133
      {
124
        name: 'sys_devicemana',
134
        name: 'sys_devicemana',
125
        path: 'devicemana',
135
        path: '/system/devicemana',
126
        component: () => import(/* webpackChunkName: "sys_devicemana" */ './modules/system/devicemana'),
136
        component: () => import(/* webpackChunkName: "sys_devicemana" */ './modules/system/devicemana'),
127
        meta: { title: '设备管理' }
137
        meta: { title: '设备管理' }
128
      },
138
      },
129
      {
139
      {
130
        name: 'sys_task',
140
        name: 'sys_task',
131
        path: 'assignment',
141
        path: '/system/assignment',
132
        component: () => import(/* webpackChunkName: "sys__task" */ './modules/system/assignment'),
142
        component: () => import(/* webpackChunkName: "sys__task" */ './modules/system/assignment'),
133
        meta: { title: '任务管理' }
143
        meta: { title: '任务管理' }
134
      },
144
      },
135
      {
145
      {
136
        name: 'sys_monitor',
146
        name: 'sys_monitor',
137
        path: 'monitor',
147
        path: '/system/monitor',
138
        component: () => import(/* webpackChunkName: "sys_monitor" */ './modules/system/monitor'),
148
        component: () => import(/* webpackChunkName: "sys_monitor" */ './modules/system/monitor'),
139
        meta: { title: '监控布局' }
149
        meta: { title: '监控布局' }
140
      },
150
      },
141
      {
151
      {
142
        name: 'sys_attendance',
152
        name: 'sys_attendance',
143
        path: 'attendance',
153
        path: '/system/attendance',
144
        component: () => import(/* webpackChunkName: "sys_attendance" */ './modules/system/attendance'),
154
        component: () => import(/* webpackChunkName: "sys_attendance" */ './modules/system/attendance'),
145
        meta: { title: '考勤配置' }
155
        meta: { title: '考勤配置' }
146
      },
156
      }
157
    ]
158
  },
159
  {
160
    path: '/usermana',
161
    component: Layout,
162
    meta: { title: '用户管理', icon: 'user-outline' },
163
    children: [
147
      {
164
      {
148
        name: 'usermana',
165
        name: 'usermana',
149
        path: 'usermana',
166
        path: '/usermana',
150
        component: () => import(/* webpackChunkName: "user_rights" */ './modules/usermana'),
167
        component: () => import(/* webpackChunkName: "user_rights" */ './modules/usermana'),
151
        meta: { title: '用户管理'}
168
        meta: { title: '用户管理', icon: 'user-outline' }
152
      }
169
      }
153
    ]
170
    ]
154
  },
171
  },
161
  }
178
  }
162
]
179
]
163
180
164
/**
165
 * asyncRoutes
166
 * the routes that need to be dynamically loaded based on user roles
167
 */
168
export const asyncRoutes = []
169
170
export default constantRoutes.concat(asyncRoutes)
181
export default constantRoutes.concat(asyncRoutes)

+ 2 - 1
security-protection-platform/src/store/index.js

35
      isLogged: false
35
      isLogged: false
36
    },
36
    },
37
    mutations: {
37
    mutations: {
38
      setLogged(state, token) {
38
      setLogged (state, token) {
39
        state.isLogged = token
39
        state.isLogged = token
40
        console.log(token)
40
      }
41
      }
41
    }
42
    }
42
  })
43
  })

+ 54 - 26
security-protection-platform/src/store/modules/permission.js

1
import { asyncRoutes, constantRoutes } from '@/routes'
1
import { asyncRoutes, constantRoutes } from '@/routes'
2
3
/*
2
/*
4
 * Use meta.role to determine if the current user has permission
3
 * Use meta.role to determine if the current user has permission
5
 * @param roles
4
 * @param roles
6
 * @param route
5
 * @param route
7
 */
6
 */
8
function hasPermission(roles, route) {
9
  if (route.meta && route.meta.roles) {
10
    return roles.some(role => route.meta.roles.includes(role))
11
  } else {
12
    return true
13
  }
7
function hasPermission (permission, route) {
8
  // if (route.meta && route.meta.roles) {
9
  //   return roles.some(role => route.meta.roles.includes(role))
10
  // } else {
11
  //   return true
12
  // }
13
  var x = false
14
  permission.forEach(e => {
15
    if (e[0] === route.path) {
16
      x = true
17
    }
18
  })
19
  return x
14
}
20
}
15
21
16
/**
22
/**
18
 * @param routes asyncRoutes
24
 * @param routes asyncRoutes
19
 * @param roles
25
 * @param roles
20
 */
26
 */
21
export function filterAsyncRoutes(routes, roles) {
22
  const res = []
27
// export function filterAsyncRoutes (routes, roles) {
28
//   const res = []
23
29
24
  routes.forEach(route => {
25
    const tmp = { ...route }
26
    if (hasPermission(roles, tmp)) {
27
      if (tmp.children) {
28
        tmp.children = filterAsyncRoutes(tmp.children, roles)
30
//   routes.forEach(route => {
31
//     const tmp = { ...route }
32
//     if (hasPermission(roles, tmp)) {
33
//       if (tmp.children) {
34
//         tmp.children = filterAsyncRoutes(tmp.children, roles)
35
//       }
36
//       res.push(tmp)
37
//     }
38
//   })
39
40
//   return res
41
// }
42
function filterAsyncRoutes (routerMap, roles, map) {
43
  const accessedRouters = routerMap.filter(route => {
44
    // if (hasPermission(roles.permissionList, route) && map[route.path] || route.path === '/') {
45
    if (hasPermission(map, route) || route.path === '/') {
46
      if (route.children && route.children.length) {
47
        route.children = filterAsyncRoutes(route.children, roles, map)
29
      }
48
      }
30
      res.push(tmp)
49
      return true
31
    }
50
    }
51
    return false
32
  })
52
  })
33
34
  return res
53
  return accessedRouters
35
}
54
}
36
55
37
const state = {
56
const state = {
47
}
66
}
48
67
49
const actions = {
68
const actions = {
50
  generateRoutes({ commit }, roles) {
69
  // generateRoutes ({ commit }, roles) {
70
  //   return new Promise(resolve => {
71
  //     let accessedRoutes
72
  //     if (roles.includes('admin')) {
73
  //       accessedRoutes = asyncRoutes || []
74
  //     } else {
75
  //       accessedRoutes = filterAsyncRoutes(asyncRoutes, roles,menus)
76
  //     }
77
  //     commit('SET_ROUTES', accessedRoutes)
78
  //     resolve(accessedRoutes)
79
  //   })
80
  // }
81
  generateRoutes ({ commit }, roles) {
82
    var menus = JSON.parse(localStorage.getItem('menus'))
51
    return new Promise(resolve => {
83
    return new Promise(resolve => {
52
      let accessedRoutes
53
      if (roles.includes('admin')) {
54
        accessedRoutes = asyncRoutes || []
55
      } else {
56
        accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
57
      }
58
      commit('SET_ROUTES', accessedRoutes)
59
      resolve(accessedRoutes)
84
      let accessedRouters
85
      accessedRouters = filterAsyncRoutes(asyncRoutes, roles, menus)
86
      commit('SET_ROUTES', accessedRouters)
87
      resolve()
60
    })
88
    })
61
  }
89
  }
62
}
90
}