Skip to content

Commit

Permalink
unit crud
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jan 28, 2019
1 parent 9163126 commit cddaad7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ import store from './store'
import '@/icons/index' // icon
import '@/permission' // 权限import axios from 'axios';
import '@/styles/index.scss' // global css
import {
asyncRouterMap,
} from '@/router/index'

Vue.use(ElementUI)

Vue.config.productionTip = false
Vue.prototype.axios = axios

console.log(asyncRouterMap)
new Vue({
el: '#app',
router,
Expand Down
7 changes: 3 additions & 4 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ export const asyncRouterMap = [{
{
path: 'unit',
name: 'unit',
noDropdown: false,
hidden: false,
component: () => import('@/views/system/unit'),
meta: {
title: '单位设置',
Expand All @@ -179,8 +177,6 @@ export const asyncRouterMap = [{
{
path: 'formdesigner',
name: 'formdesigner',
noDropdown: false,
hidden: false,
component: () => import('@/views/system/formdesigner'),
meta: {
title: '表单设计',
Expand All @@ -195,3 +191,6 @@ export const asyncRouterMap = [{
hidden: true,
},
]


console.log(asyncRouterMap)
1 change: 1 addition & 0 deletions src/store/modules/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const permission = {
const {
roleauthname,
} = data

const accessedRouters = filterAsyncRouter(asyncRouterMap, roleauthname)

commit('SET_ROUTERS', accessedRouters)
Expand Down
2 changes: 1 addition & 1 deletion src/views/system/role.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,6 @@ export default {
this.fetchData(this.listQuery)
})
},
}, //
},
}
</script>
1 change: 0 additions & 1 deletion src/views/system/unit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export default {
this.unitoptions = res.data.list;
})
this.fetchUnit()
this.fetchUnit()
},
methods: {
Expand Down

0 comments on commit cddaad7

Please sign in to comment.