| | |
| | | pageSize |
| | | ); |
| | | } |
| | | //根据角色查询用户 |
| | | export function roleUserselectByPageForRole(params) { |
| | | //请求地址 |
| | | return request.get('/roleUser/selectByPageAndCount', { params: params }); |
| | | } |
| | | //用户角色删除 |
| | | export function roleUserdeletes(params) { |
| | | //请求地址 |
| | | return request.get('/roleUser/deletes', { params: params }); |
| | | } |
| | | //根据角色部门查询用户 |
| | | export function userselectByPageForRole(params) { |
| | | //请求地址 |
| | | return request.get('/user/selectByPageForRole', { params: params }); |
| | | } |
| | | // 用户角色新增多选 |
| | | export function roleUserinserts(params) { |
| | | //请求地址 |
| | | return request.post('/roleUser/inserts', params ); |
| | | } |
| | |
| | | operatManage: { |
| | | operatManage: 'Operat Manage', |
| | | ResourceLog: 'Resource Log', |
| | | UserRoleAuthorization:"User Role Authorization", |
| | | UserRoleAuthorizationObj:{ |
| | | RoleTable: 'Role Table', |
| | | userTable: 'user Table', |
| | | Added: 'Added', |
| | | delete: 'delete', |
| | | serialNumber: 'serial Number', |
| | | name: 'name', |
| | | }, |
| | | ELM: { |
| | | username: 'username', |
| | | ownedSystem: 'ownedSystem', |
| | |
| | | operatManage: { |
| | | operatManage: '运维管理', |
| | | ResourceLog: '资源日志', |
| | | UserRoleAuthorization:"用户角色授权", |
| | | UserRoleAuthorizationObj:{ |
| | | RoleTable: '角色表', |
| | | userTable: '用户表', |
| | | Added: '新增', |
| | | delete: '删除', |
| | | serialNumber: '编号', |
| | | name: '名称', |
| | | }, |
| | | ELM: { |
| | | username: '用户名称', |
| | | ownedSystem: '所属系统', |
| | |
| | | <el-menu-item |
| | | v-else |
| | | :key="item.id" |
| | | :index="item.url == null ? null : item.url + ''" |
| | | :index="item.url == null ? item.id.toString() : item.url + ''" |
| | | > |
| | | <span slot="title">{{ |
| | | $store.state.lang == "zh" ? item.cnName : item.enName |
| | |
| | | mounted() { |
| | | this.getMenuTree(); |
| | | }, |
| | | computed: {}, |
| | | computed: { |
| | | // 我们使用计算属性来获取到当前点击的菜单的路由路径,然后设置default-active中的值 |
| | | // 使得菜单在载入时就能对应高亮 |
| | | // activeIndex() { |
| | | // const route = this.$route; |
| | | // const { meta, path } = route; |
| | | // // if set path, the sidebar will highlight the path you set |
| | | // // 可以在路由配置文件中设置自定义的路由路径到meta.activeMenu属性中,来控制菜单自定义高亮显示 |
| | | // if (meta.activeMenu) { |
| | | // return meta.activeMenu; |
| | | // } |
| | | // return path; |
| | | // }, |
| | | }, |
| | | methods: { |
| | | getMenuTree() { |
| | | //获取目录树最大ID,新建节点使用 |
| | |
| | | }, |
| | | watch: { |
| | | $route() { |
| | | this.activeIndex = this.$route.path; |
| | | let str = this.$route.path; |
| | | if (str[0] == "/") { |
| | | this.activeIndex = str.slice(1); |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | let str = this.$route.path; |
| | | if (str[0] == "/") { |
| | | this.activeIndex = str.slice(1); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | import groupManage from '../views/userManage/groupManage.vue'; // 用户管理模块 |
| | | import authorityManage from '@/views/userManage/authorityManage.vue'; //用户管理-权限管理 |
| | | import resourceManage from '@/views/userManage/resourceManage.vue'; //用户管理-资源管理 |
| | | import userRoleAuthorization from '@/views/AuthorizationManagement/userRoleAuthorization.vue'; //系统管理- |
| | | const originalPush = VueRouter.prototype.push |
| | | |
| | | VueRouter.prototype.push = function push(location) { |
| | | |
| | | return originalPush.call(this, location).catch(err => err) |
| | | |
| | | } |
| | | |
| | | // 群组管理 |
| | | Vue.use(VueRouter); |
| | | |
| | |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/userRoleAuthorization', |
| | | component: userRoleAuthorization, |
| | | name: 'userRoleAuthorization', |
| | | meta: { |
| | | title: '用户角色授权', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | |
| | | ], |
| | | }, |