From 13dce68bfdf0aca4b05e800494d2cd82c36ac44c Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 22 八月 2024 16:59:13 +0800
Subject: [PATCH] 基础信息页面修改
---
HTML/views/SystemSettings/Role.html | 70 ++++++++++++++++++++++++++++++----
1 files changed, 61 insertions(+), 9 deletions(-)
diff --git a/HTML/views/SystemSettings/Role.html b/HTML/views/SystemSettings/Role.html
index 021b914..f4150c2 100644
--- a/HTML/views/SystemSettings/Role.html
+++ b/HTML/views/SystemSettings/Role.html
@@ -97,7 +97,7 @@
RoleName: RoleName,
};
sendData(IP + "/Basis/GetRolesList?RoleNo=" + RoleNo + "&RoleName=" + RoleName, {}, "get", function (res) {
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
var list = res.data;
@@ -122,10 +122,62 @@
);
}
});
+ sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
+ $(function () {
+ $(".approvalBtn").hide();
+ });
+ $(function () {
+ $(".editClass").hide();
+ });
+ $(function () {
+ $(".roleClass").hide();
+ });
+ $(function () {
+ $(".approvalBtndel").hide();
+ });
+ if (res.code == 0) {
+ //鎴愬姛
+ for (var k = 0; k < res.data.length; k++) {
+ if (res.data[k].MenuName == "缂栬緫瑙掕壊") {
+ $(function () {
+ $(".editClass").show();
+ });
+ }
+ if (res.data[k].MenuName == "鍒嗛厤鏉冮檺") {
+ $(function () {
+ $(".roleClass").show();
+ });
+ }
+ if (res.data[k].MenuName == "娣诲姞瑙掕壊") {
+ $(function () {
+ $(".approvalBtn").show();
+ });
+ }
+ if (res.data[k].MenuName == "鍒犻櫎瑙掕壊") {
+ $(function () {
+ $(".approvalBtndel").show();
+ });
+ }
+ }
+ }
+ else {
+ //涓嶆垚鍔�
+ layer.msg(
+ "鑾峰彇淇℃伅澶辫触",
+ {
+ icon: 2,
+ time: 2000, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ },
+ function () {
+ //鍥炶皟
+ }
+ );
+ }
+ });
}
sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
$(function() {
- $("#approvalBtn").hide();
+ $(".approvalBtn").hide();
});
$(function() {
$(".editClass").hide();
@@ -136,7 +188,7 @@
$(function() {
$(".approvalBtndel").hide();
});
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
for (var k = 0; k < res.data.length; k++)
@@ -156,7 +208,7 @@
if (res.data[k].MenuName == "娣诲姞瑙掕壊")
{
$(function () {
- $("#approvalBtn").show();
+ $(".approvalBtn").show();
});
}
if (res.data[k].MenuName == "鍒犻櫎瑙掕壊")
@@ -232,7 +284,7 @@
sendData(IP + "/basis/GetRolesList", {}, "get", function (res) {
var html = "";
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
var list = res.data;
@@ -298,7 +350,7 @@
Demo: field.Demo, //澶囨敞
};
sendData( IP + "/basis/UpdateRolesInfo", param, "post", function (res) {
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
layer.msg(
@@ -365,7 +417,7 @@
Demo: field.Demo, //澶囨敞
};
sendData( IP + "/basis/UpdateRolesInfo", param, "post", function (res) {
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
layer.msg(
@@ -416,7 +468,7 @@
doing = false;
sendData( IP + "/Basis/DeleteRoleInfo?Roleids=" + data.Id + "", {}, "get", function (res) {
console.log(res);
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
layer.msg(
@@ -487,7 +539,7 @@
{
doing = false;
sendData( IP + "/basis/InsertRoleInfo", param, "post", function (res) {
- if (res.code == 200)
+ if (res.code == 0)
{
//鎴愬姛
layer.msg(
--
Gitblit v1.8.0