From b9f7560cbe0e562a40e9515a0559a3e951f0fee6 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期一, 07 四月 2025 09:16:01 +0800 Subject: [PATCH] 问题修改 --- HTML/views/SystemSettings/Category.html | 103 +++++++++++++++++++++++++++------------------------ 1 files changed, 54 insertions(+), 49 deletions(-) diff --git a/HTML/views/SystemSettings/Category.html b/HTML/views/SystemSettings/Category.html index 25f834e..f0a2544 100644 --- a/HTML/views/SystemSettings/Category.html +++ b/HTML/views/SystemSettings/Category.html @@ -17,13 +17,13 @@ }); </script> </head> - <body> + <body id="body"> <div class="layui-fluid" style="padding-bottom: 0;"> <div class="layui-card"> - <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC"> + <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top"> <div class="layui-form-item"> <div class="layui-inline"> - <label class="layui-form-label" style="width: 60px;">绫诲埆鍚嶇О</label> + <label class="layui-form-label" style="width: 60px;">搴撳尯鍚嶇О</label> <div class="layui-input-inline"> <input type="text" id="CategoryName" name="CategoryName" placeholder="璇疯緭鍏ョ被鍒悕绉�" autocomplete="off" class="layui-input"> </div> @@ -48,6 +48,9 @@ </div> </div> </div> + + <div id="center"></div> + <div class="layui-card-body"> <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> @@ -78,6 +81,7 @@ laypage = layui.laypage, layer = layui.layer; + var h1 = GetTableHeight(); var tableIns; //鑾峰彇鍖哄煙淇℃伅 @@ -112,6 +116,46 @@ curr: 1 } tableIns = table.render(infoOptions); + sendData(IP + "/basis/GetRoleRightList", {}, 'get', function(res) { + $(function() { + $("#approvalBtn").hide(); + }); + $(function() { + $(".approvalBtnupt").hide(); + }); + $(function() { + $(".approvalBtndel").hide(); + }); + if (res.code == 0) { //鎴愬姛 + for (var k = 0; k < res.data.length; k++) { + if (res.data[k].MenuName == "鏂板搴撳尯") { + $(function() { + $("#approvalBtn").show(); + }); + } + if (res.data[k].MenuName == "鍒犻櫎搴撳尯") { + $(function() { + $(".approvalBtndel").show(); + }); + } + if (res.data[k].MenuName == "缂栬緫搴撳尯") { + console.log(1) + $(function() { + $(".approvalBtnupt").show(); + }); + } + } + } + else + { //涓嶆垚鍔� + layer.msg('鑾峰彇淇℃伅澶辫触', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() { + //鍥炶皟 + }); + } + }); } else //涓嶆垚鍔� { @@ -122,50 +166,11 @@ } }); } - sendData(IP + "/basis/GetRoleRightList", {}, 'get', function(res) { - $(function() { - $("#approvalBtn").hide(); - }); - $(function() { - $(".approvalBtnupt").hide(); - }); - $(function() { - $(".approvalBtndel").hide(); - }); - if (res.code == 0) { //鎴愬姛 - for (var k = 0; k < res.data.length; k++) { - if (res.data[k].MenuName == "鏂板绫诲埆") { - $(function() { - $("#approvalBtn").show(); - }); - } - if (res.data[k].MenuName == "鍒犻櫎绫诲埆") { - $(function() { - $(".approvalBtndel").show(); - }); - } - if (res.data[k].MenuName == "缂栬緫绫诲埆") { - console.log(1) - $(function() { - $(".approvalBtnupt").show(); - }); - } - } - } - else - { //涓嶆垚鍔� - layer.msg('鑾峰彇淇℃伅澶辫触', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - } - }); + var infoOptions = { elem: "#LAY-app-content-list", - height: "full-95", + height: h1, id: "LAY-app-content-list", page: true, limit: pageCnt, @@ -177,10 +182,10 @@ title: '搴忓彿', type: 'numbers', fixed: 'left', width:65 }, { - field: 'CategoryNo', title: '绫诲埆缂栫爜', align: 'center', fixed: 'left',width:100 + field: 'CategoryNo', title: '搴撳尯缂栫爜', align: 'center', fixed: 'left',width:100 }, { - field: 'CategoryName', title: '绫诲埆鍚嶇О', align: 'center',width:100 + field: 'CategoryName', title: '搴撳尯鍚嶇О', align: 'center',width:100 }, { field: 'AreaName', title: '缁戝畾鍖哄煙', align: 'center' @@ -229,7 +234,7 @@ add: function() { layer.open({ type: 2, - title: '娣诲姞绫诲埆淇℃伅', + title: '娣诲姞搴撳尯淇℃伅', content: 'CategoryForm.html', maxmin: true, area: ['530px', '530px'], @@ -321,7 +326,7 @@ //鍒犻櫎 if (obj.event === 'del') { - layer.confirm('纭畾鍒犻櫎閫変腑鐨勭被鍒紵', function(index) { + layer.confirm('纭畾鍒犻櫎閫変腑鐨勫簱鍖猴紵', function(index) { cusid = data.Id; console.log(cusid); @@ -370,7 +375,7 @@ cusId = data.Id; layer.open({ type: 2, - title: '缂栬緫绫诲埆淇℃伅', + title: '缂栬緫搴撳尯淇℃伅', content: 'CategoryForm.html?id=' + cusId, maxmin: true, area: ['530px', '530px'], -- Gitblit v1.8.0