From f9ba364d9f41be91ea5a50d22e68cb8cabe41cb3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 10 Jun 2021 10:26:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E4=B8=8D=E5=85=81=E8=AE=B8=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/system/role/role.html | 20 +++++++++++-------- .../resources/templates/system/user/user.html | 20 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) 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 18628819e..c16b7fd1c 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 21d506c37..94930329a 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 ""; + } } }] };