From b34ab52c70464457c4b2b4b4b118b164fde9813b Mon Sep 17 00:00:00 2001
From: weizhiqiang <598748873@qq.com>
Date: Sun, 24 Jul 2022 14:20:08 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E3=80=91=E7=BB=91=E5=AE=9A=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../js/syseverole/sysEveRolePCMenu.js | 121 ++++++++----------
.../assets/lib/layui/css/tree-table.css | 2 +-
.../lib/winui/css/customer/skyeye-custom.css | 26 ++--
3 files changed, 65 insertions(+), 84 deletions(-)
diff --git a/userauth/src/main/resources/template/js/syseverole/sysEveRolePCMenu.js b/userauth/src/main/resources/template/js/syseverole/sysEveRolePCMenu.js
index eca68556f..1fcfa948f 100644
--- a/userauth/src/main/resources/template/js/syseverole/sysEveRolePCMenu.js
+++ b/userauth/src/main/resources/template/js/syseverole/sysEveRolePCMenu.js
@@ -40,58 +40,48 @@ layui.config({
});
/********* tree 处理 start *************/
- var trees = {};
- var treeDoms = $("ul.fsTree");
+ var tree;
AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
$("#roleName").text(json.bean.roleName);
$("#roleDesc").text(json.bean.roleDesc);
checkeRows = json.rows;
- if(treeDoms.length > 0) {
- $(treeDoms).each(function(i) {
- var treeId = $(this).attr("id");
- var funcNo = $(this).attr("funcNo");
- var url = $(this).attr("url");
- var tree = fsTree.render({
- id: treeId,
- funcNo: funcNo,
- url: reqBasePath + url,
- getTree: getTree,
- checkEnable: true,
- loadEnable: false,
- showLine: false,
- showIcon: false,
- addDiyDom: addDiyDom,
- fontCss: setFontCss
- }, function(id){
- var zTreeObj = $.fn.zTree.getZTreeObj(id);
- var zTree = zTreeObj.getCheckedNodes(false);
- for (var i = 0; i < zTree.length; i++) {
- for(var j = 0; j < checkeRows.length; j++){
- if(zTree[i].id == checkeRows[j].menuId){
- zTreeObj.checkNode(zTree[i], true);
- }
- }
- }
- var li_head = '
所属系统
菜单权限
菜单类型
';
- var rows = $("#" + treeId).find('li');
- if(rows.length > 0) {
- rows.eq(0).before(li_head)
- } else {
- $("#" + treeId).append(li_head);
- $("#" + treeId).append('无符合条件数据
')
+
+ tree = fsTree.render({
+ id: "treeDemo",
+ url: reqBasePath + "sys014",
+ getTree: getTree,
+ checkEnable: true,
+ loadEnable: false,
+ showLine: false,
+ showIcon: false,
+ addDiyDom: addDiyDom,
+ fontCss: setFontCss
+ }, function(id) {
+ var zTreeObj = $.fn.zTree.getZTreeObj(id);
+ var zTree = zTreeObj.getCheckedNodes(false);
+ for (var i = 0; i < zTree.length; i++) {
+ for(var j = 0; j < checkeRows.length; j++){
+ if(zTree[i].id == checkeRows[j].menuId){
+ zTreeObj.checkNode(zTree[i], true);
}
- });
- if(treeDoms.length == 1) {
- trees[treeId] = tree;
- } else {
- //深度拷贝对象
- trees[treeId] = $.extend(true, {}, tree);
}
- });
- //绑定按钮事件
- fsCommon.buttonEvent("tree", getTree);
- }
+ }
+ var li_head = '' +
+ '菜单权限
' +
+ '所属系统
' +
+ '菜单类型
' +
+ '';
+ var rows = $("#treeDemo").find('li');
+ if(rows.length > 0) {
+ rows.eq(0).before(li_head);
+ } else {
+ $("#" + treeId).append(li_head);
+ $("#" + treeId).append('无符合条件数据
')
+ }
+ });
+ // 绑定按钮事件
+ fsCommon.buttonEvent("tree", getTree);
}});
function getTree(treeId) {
@@ -111,51 +101,40 @@ layui.config({
* 自定义DOM节点
*/
function addDiyDom(treeId, treeNode) {
- var spaceWidth = 15;
- var liObj = $("#" + treeNode.tId);
var aObj = $("#" + treeNode.tId + "_a");
var switchObj = $("#" + treeNode.tId + "_switch");
var icoObj = $("#" + treeNode.tId + "_ico");
var spanObj = $("#" + treeNode.tId + "_span");
aObj.attr('title', '');
- aObj.append('');
- var div = $(liObj).find('div').eq(0);
+ aObj.append('');
switchObj.remove();
spanObj.remove();
icoObj.remove();
+
+ var div = $("#" + treeNode.tId).find('.swich').eq(0);
div.append(switchObj);
div.append(spanObj);
- var spaceStr = "";
- switchObj.before(spaceStr);
- var editStr = '';
- editStr = '' + (treeNode.sysName == null ? ' ' : treeNode.sysName) + '
';
- aObj.before(editStr);
- editStr = '' + (treeNode.appType == null ? ' ' : treeNode.appType) + '
';
- aObj.append(editStr);
- editStr = '' + (treeNode.type == null ? ' ' : treeNode.type) + '
';
- aObj.append(editStr);
- }
+ switchObj.before("");
+ // 所属系统
+ aObj.append('' + treeNode.sysName + '
');
+ // 菜单类型
+ aObj.append('' + treeNode.pageType + '
');
+ }
- var lastValue = "", nodeList = [], fontCss = {}, hiddenNodes = [];
+ var lastValue = "", nodeList = [], hiddenNodes = [];
$("#menuName").val('');
var key = $("#menuName");
- key.bind("focus", focusKey)
- .bind("blur", blurKey)
- .bind("propertychange", searchNode) //property(属性)change(改变)的时候,触发事件
- .bind("input", searchNode);
-
- function focusKey(e) {
+ key.bind("focus", function(e) {
if (key.hasClass("empty")) {
key.removeClass("empty");
}
- }
-
- function blurKey(e) {
+ }).bind("blur", function(e) {
if (key.get(0).value === "") {
key.addClass("empty");
}
- }
+ }).bind("propertychange", searchNode) //property(属性)change(改变)的时候,触发事件
+ .bind("input", searchNode);
//搜索树
function searchNode(e) {
@@ -247,7 +226,7 @@ layui.config({
}
function setFontCss(treeId, treeNode) {
- return (!!treeNode.highlight) ? {color:"#00ff66", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"};
+ return (!!treeNode.highlight) ? {color: "#00ff66", "font-weight": "bold"} : {color: "#333", "font-weight": "normal"};
}
// 取消
diff --git a/web/src/main/resources/template/assets/lib/layui/css/tree-table.css b/web/src/main/resources/template/assets/lib/layui/css/tree-table.css
index 7b239eb97..b6d2578fe 100644
--- a/web/src/main/resources/template/assets/lib/layui/css/tree-table.css
+++ b/web/src/main/resources/template/assets/lib/layui/css/tree-table.css
@@ -16,7 +16,7 @@
.ztree li>span{
display: block !important;
position: absolute;
- margin-left: 60.5% !important;
+ margin-left: 80.5% !important;
margin-top: 10px !important;
}
diff --git a/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-custom.css b/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-custom.css
index 2f003f0aa..03f474e75 100644
--- a/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-custom.css
+++ b/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-custom.css
@@ -1,27 +1,26 @@
-
/*标识类的样式*/
-.skyeye-badge{
+.skyeye-badge {
margin-bottom: 5px;
color: #46799b !important;
background-color: #e0eaf1 !important;
}
/*图片预览时底部操作按钮所在DOM的样式*/
-.skyeye-image-operator{
+.skyeye-image-operator {
position: fixed;
width: 100%;
text-align: center;
cursor: pointer;
bottom: 0px;
left: 0px;
- background-color: rgba(190,190,190,0.3);
+ background-color: rgba(190, 190, 190, 0.3);
box-shadow: 0 0 10px rgb(0 0 0 / 20%);
}
/*提示信息*/
-.winui-tip{
+.winui-tip {
border-radius: 3px;
- border: 1px solid rgba(0,0,0,.07);
+ border: 1px solid rgba(0, 0, 0, .07);
padding: 5px 5px;
font-size: 13px;
position: relative;
@@ -29,36 +28,39 @@
text-align: left;
}
-.alert-info{
+.alert-info {
color: #2f73c8;
background-color: #d9e7f9;
}
-.alert-warning{
+.alert-warning {
color: #94780a;
background-color: #f9e69b;
}
-.alert-danger{
+.alert-danger {
color: #d83945;
background-color: #fbdbde;
}
-.alert-success{
+.alert-success {
color: #155724;
background-color: #d4edda;
}
-.alert-primary{
+.alert-primary {
color: #3f037a;
background: #d8bff2;
}
-.alert-secondary{
+.alert-secondary {
color: #383d41;
background-color: #e2e3e5;
}
+.layui-table-fixed .layui-table-body {
+ height: auto !important;
+}
/***************************竖向选项卡开始********************************/
--
GitLab