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

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

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

@ -136,7 +136,9 @@
class-name="small-padding fixed-width"
>
<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)">
{{ $t('common.delete') }}
</el-button>
@ -507,7 +509,9 @@ export default {
this.initSelect();
},
mounted() {
this.isEditDisabled = localStorage.getItem('USER_ROLE') !== 'ROLE_ADMIN';
this.isEditDisabled =
localStorage.getItem('USER_ROLE') !== 'ROLE_ADMIN' &&
localStorage.getItem('USER_ROLE') !== 'ROLE_MANAGE';
},
methods: {
onInput() {

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

Loading…
Cancel
Save