Added ROLE_MANAGE role (#977)

pull/983/head
chen.ma 2 years ago
parent 760564d17a
commit 6f0889435b

@ -4,14 +4,14 @@ export default {
login: 'Login Form', login: 'Login Form',
username: 'Username', username: 'Username',
password: 'Password', password: 'Password',
logOut: 'Log Out' logOut: 'Log Out',
}, },
// 公共 // 公共
common: { common: {
search: 'Search', search: 'Search',
addition: 'Addition', addition: 'Addition',
serialNumber: 'Serial Number', serialNumber: 'No.',
operation: 'Operation', operation: 'Operation',
edit: 'Edit', edit: 'Edit',
delete: 'Delete', delete: 'Delete',
@ -20,7 +20,6 @@ export default {
threadPool: 'Thread Pool', threadPool: 'Thread Pool',
}, },
// 运行报表 // 运行报表
report: { report: {
tenant: 'Tenant', tenant: 'Tenant',
@ -30,14 +29,12 @@ export default {
role: 'Role', role: 'Role',
tenants: 'Tenants', tenants: 'Tenants',
createTime: 'Create Time', createTime: 'Create Time',
updateTime: 'Update Time' updateTime: 'Update Time',
}, },
// 线程池 // 线程池
threadPool: { threadPool: {
tenant: 'Tenant', tenant: 'Tenant',
project: 'Project', project: 'Project',
} },
};
}

@ -4,7 +4,7 @@ export default {
login: '登 陆', login: '登 陆',
username: '用户名', username: '用户名',
password: '密码', password: '密码',
logOut: '注销' logOut: '注销',
}, },
// 公共 // 公共
@ -29,12 +29,12 @@ export default {
role: '用户角色', role: '用户角色',
tenants: '所属租户', tenants: '所属租户',
createTime: '创建时间', createTime: '创建时间',
updateTime: '修改时间' updateTime: '修改时间',
}, },
// 线程池 // 线程池
threadPool: { threadPool: {
tenant: '租户', tenant: '租户',
project: '项目', project: '项目',
} },
} };

@ -122,13 +122,13 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/itemList', redirect: '/hippo4j/itemList',
name: 'item', name: 'item',
meta: { title: '项目管理', icon: 'item4' }, meta: { title: '项目管理', icon: 'item' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'index', name: 'index',
component: () => import('@/views/hippo4j/item/index'), component: () => import('@/views/hippo4j/item/index'),
meta: { title: '项目管理', icon: 'item4' }, meta: { title: '项目管理', icon: 'item' },
}, },
], ],
}, },
@ -138,7 +138,7 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/dynamic/thread-pool', redirect: '/hippo4j/dynamic/thread-pool',
name: 'thread-pool', name: 'thread-pool',
meta: { title: '动态线程池', icon: 'pool3' }, meta: { title: '动态线程池', icon: 'pool' },
children: [ children: [
{ {
path: 'index', path: 'index',
@ -165,7 +165,7 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/server', redirect: '/hippo4j/server',
name: 'server-thread-pool', name: 'server-thread-pool',
meta: { title: '容器线程池', icon: 'vessel3' }, meta: { title: '容器线程池', icon: 'vessel' },
children: [ children: [
{ {
path: 'tomcat', path: 'tomcat',
@ -192,7 +192,7 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/other', redirect: '/hippo4j/other',
name: 'other-thread-pool', name: 'other-thread-pool',
meta: { title: '框架线程池', icon: 'other4' }, meta: { title: '框架线程池', icon: 'other' },
children: [ children: [
{ {
path: 'dubbo', path: 'dubbo',
@ -243,7 +243,7 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/verifyList', redirect: '/hippo4j/verifyList',
name: 'config-modification-verify', name: 'config-modification-verify',
meta: { title: '线程池审核', icon: 'audit', roles: ['ROLE_ADMIN'] }, meta: { title: '线程池审核', icon: 'audit', roles: ['ROLE_MANAGE', 'ROLE_ADMIN'] },
children: [ children: [
{ {
path: 'index', path: 'index',
@ -273,13 +273,13 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/userList', redirect: '/hippo4j/userList',
name: 'user', name: 'user',
meta: { title: '用户权限', icon: 'user6', roles: ['ROLE_ADMIN'] }, meta: { title: '用户权限', icon: 'user', roles: ['ROLE_ADMIN'] },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'index', name: 'index',
component: () => import('@/views/hippo4j/user/index'), component: () => import('@/views/hippo4j/user/index'),
meta: { title: '用户权限', icon: 'user6' }, meta: { title: '用户权限', icon: 'user' },
}, },
], ],
}, },
@ -288,13 +288,13 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/hippo4j/logList', redirect: '/hippo4j/logList',
name: 'log', name: 'log',
meta: { title: '日志管理', icon: 'log3' }, meta: { title: '日志管理', icon: 'log' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'index', name: 'index',
component: () => import('@/views/hippo4j/log/index'), component: () => import('@/views/hippo4j/log/index'),
meta: { title: '日志管理', icon: 'log3' }, meta: { title: '日志管理', icon: 'log' },
}, },
], ],
}, },
@ -305,7 +305,7 @@ export const asyncRoutes = [
children: [ children: [
{ {
path: 'https://hippo4j.cn', path: 'https://hippo4j.cn',
meta: { title: '官网外链', icon: 'link3' }, meta: { title: '官网外链', icon: 'link' },
}, },
], ],
}, },

@ -136,7 +136,9 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" size="small" @click="handleUpdate(row)"> {{ $t('common.edit') }} </el-button> <el-button type="text" size="small" @click="handleUpdate(row)">
{{ $t('common.edit') }}
</el-button>
<el-button size="small" :disabled="isEditDisabled" type="text" @click="handleDelete(row)"> <el-button size="small" :disabled="isEditDisabled" type="text" @click="handleDelete(row)">
{{ $t('common.delete') }} {{ $t('common.delete') }}
</el-button> </el-button>
@ -507,7 +509,9 @@ export default {
this.initSelect(); this.initSelect();
}, },
mounted() { mounted() {
this.isEditDisabled = localStorage.getItem('USER_ROLE') !== 'ROLE_ADMIN'; this.isEditDisabled =
localStorage.getItem('USER_ROLE') !== 'ROLE_ADMIN' &&
localStorage.getItem('USER_ROLE') !== 'ROLE_MANAGE';
}, },
methods: { methods: {
onInput() { onInput() {

@ -119,6 +119,7 @@ export default {
statusFilter(status) { statusFilter(status) {
const statusMap = { const statusMap = {
ROLE_ADMIN: 'danger', ROLE_ADMIN: 'danger',
ROLE_MANAGE: 'warning',
ROLE_USER: '', ROLE_USER: '',
}; };
return statusMap[status]; return statusMap[status];
@ -134,7 +135,7 @@ export default {
size: 10, size: 10,
userName: undefined, userName: undefined,
}, },
roles: ['ROLE_USER', 'ROLE_ADMIN'], roles: ['ROLE_USER', 'ROLE_MANAGE', 'ROLE_ADMIN'],
dialogPluginVisible: false, dialogPluginVisible: false,
pluginData: [], pluginData: [],
dialogFormVisible: false, dialogFormVisible: false,

Loading…
Cancel
Save