From 75e19f1d649e971e3422d3a3171592be4bfbe14e Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期四, 15 八月 2024 16:21:33 +0800
Subject: [PATCH] ·
---
HTML/views/SystemSettings/PrintSetting.html | 75 +++++++++----------------------------
1 files changed, 19 insertions(+), 56 deletions(-)
diff --git a/HTML/views/SystemSettings/PrintSetting.html b/HTML/views/SystemSettings/PrintSetting.html
index d7e8133..514f274 100644
--- a/HTML/views/SystemSettings/PrintSetting.html
+++ b/HTML/views/SystemSettings/PrintSetting.html
@@ -154,61 +154,6 @@
TypeList = res.data;
}
});
- sendData(IP + "/basis/GetRoleRightList", {}, 'get', function (res) {
- $(function () {
- $("#approvalBtn").hide();
- });
- $(function () {
- $(".approvalBtndel").hide();
- });
- $(function () {
- $(".approvalBtnupt").hide();
- });
- if (res.code == 200) //鎴愬姛
- {
- var list = res.data.filter(item => item.Layer == 0);
- if (list) {
- for (var i = 0; i < list.length; i++) {
- xml = xml + '<li class="layui-nav-item">' + '<a href="javascript:;" lay-tips=' + list[i].Icon + ' lay-direction="2">' + '<span class="iconfont ' + list[i].Icon + '"></span>' + '<cite>' + list[i].MenuName + '</cite>' + '</a>';
- var id = list[i].Id;
- //鏌ヨ鏈夋棤瀛愯彍鍗�
- var count = res.data.filter(item => item.ParentId == id).length;
- if (count > 0) {
- xml = xml + '<dl class="layui-nav-child">';
- getchiled(res.data, id);
- xml = xml + '</dl>';
- }
- xml = xml + '</li>'
- }
- }
- 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 == "缂栬緫妯℃澘") {
- $(function () {
- $(".approvalBtnupt").show();
- });
- }
- }
- }
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇淇℃伅澶辫触', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () {
- //鍥炶皟
- });
- }
- })
var infoOptions = {
elem: '#LAY-app-content-list',
height: 'full-95',
@@ -263,7 +208,25 @@
{
title: '鎿嶄綔', fixed: 'right', width: 200, align: 'center', toolbar: '#table-content-list'
}
- ]]
+ ]],
+ done: function () {
+ //鏉冮檺
+ var listRole = JSON.parse(localStorage.getItem('listRole'));
+ $("#approvalBtn").hide();
+ $(".approvalBtndel").hide();
+ $(".approvalBtnupt").hide();
+ if (listRole) {
+ if (listRole.filter(s => s.MenuName == "娣诲姞妯℃澘").length > 0) {
+ $("#approvalBtn").show();
+ }
+ if (listRole.filter(s => s.MenuName == "缂栬緫妯℃澘").length > 0) {
+ $(".approvalBtnupt").show();
+ }
+ if (listRole.filter(s => s.MenuName == "鍒犻櫎妯℃澘").length > 0) {
+ $(".approvalBtndel").show();
+ }
+ }
+ }
};
//鐩戝惉鎼滅储
form.on('submit(LAY-app-contlist-search)', function (data) {
--
Gitblit v1.8.0