diff --git a/ruoyi-admin/src/main/resources/templates/system/role/role.html b/ruoyi-admin/src/main/resources/templates/system/role/role.html
index 18628819..c16b7fd1 100644
--- a/ruoyi-admin/src/main/resources/templates/system/role/role.html
+++ b/ruoyi-admin/src/main/resources/templates/system/role/role.html
@@ -112,14 +112,18 @@
title: '操作',
align: 'center',
formatter: function(value, row, index) {
- var actions = [];
- actions.push('编辑 ');
- actions.push('删除 ');
- var more = [];
- more.push("数据权限 ");
- more.push("分配用户");
- actions.push('更多操作');
- return actions.join('');
+ if (row.roleId != 1) {
+ var actions = [];
+ actions.push('编辑 ');
+ actions.push('删除 ');
+ var more = [];
+ more.push("数据权限 ");
+ more.push("分配用户");
+ actions.push('更多操作');
+ return actions.join('');
+ } else {
+ return "";
+ }
}
}]
};
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/user.html b/ruoyi-admin/src/main/resources/templates/system/user/user.html
index 21d506c3..94930329 100644
--- a/ruoyi-admin/src/main/resources/templates/system/user/user.html
+++ b/ruoyi-admin/src/main/resources/templates/system/user/user.html
@@ -171,14 +171,18 @@
title: '操作',
align: 'center',
formatter: function(value, row, index) {
- var actions = [];
- actions.push('编辑 ');
- actions.push('删除 ');
- var more = [];
- more.push("重置密码 ");
- more.push("分配角色");
- actions.push('更多操作');
- return actions.join('');
+ if (row.userId != 1) {
+ var actions = [];
+ actions.push('编辑 ');
+ actions.push('删除 ');
+ var more = [];
+ more.push("重置密码 ");
+ more.push("分配角色");
+ actions.push('更多操作');
+ return actions.join('');
+ } else {
+ return "";
+ }
}
}]
};