| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>人员权限</title> |
| | |
| | | <script src="../../layuiadmin/treeTable.js"></script> |
| | | <script src="../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/layui/zgqlayui.js"></script> |
| | | <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../layuiadmin/layui/lay/modules/util.js"></script> |
| | | <script src="../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <style media="screen"> |
| | | .custom-tree-item-clicked { |
| | | color: #FC9003 |
| | | } |
| | | |
| | | .layui-form-item .layui-inline { |
| | | margin-bottom: 5px; |
| | | margin-right: 0px; |
| | | margin-right: 0px; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">授权</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" |
| | | lay-submit="" lay-filter="Saver">授权</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" |
| | | lay-filter="Exit">退出</button> |
| | | |
| | | </div> |
| | | |
| | |
| | | <div class="layui-form-item" style="border-top: solid 1px #F6F6F6;"> |
| | | <div class="layui-row" style="padding:10px 0"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <div id="treeUser" lay-filter="treeUser" class="demo-tree demo-tree-box" style="height:650px;overflow: scroll;"></div> |
| | | <div id="treeUser" lay-filter="treeUser" class="demo-tree demo-tree-box" |
| | | style="height:650px;overflow: scroll;"></div> |
| | | </div> |
| | | <div class="layui-col-xs9 layui-inline"> |
| | | <div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="../../layuiadmin/layui/zgqlayui.js"></script> |
| | | <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../layuiadmin/PubCustom.js"></script> |
| | | |
| | | <script> |
| | | //获取参数 |
| | | var params = get_UrlVars(); |
| | |
| | | var OperationType = params[params[0]];//操作类型 |
| | | var linterid = params[params[1]];//源单id |
| | | var HSouceBillType = params[params[2]];//源单类型 |
| | | //将url参数中的中文乱码重新转换成中文。 注:linterid 是参数命名,不是值 |
| | | linterid = getParams("linterid"); |
| | | } |
| | | |
| | | var treeCkData = { id: 0 }; |
| | |
| | | |
| | | var option = { |
| | | id: 'mainTable' |
| | | ,elem: '#mainTable' |
| | | , elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '650' |
| | | , limit: Number.MAX_VALUE // 数据表格默认全部显示 |
| | |
| | | $('tr[data-index=' + index + '] input[type="checkbox"]').next().addClass('layui-form-checked'); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }; |
| | | |
| | |
| | | //进入页面显示的缓存列表 |
| | | get_Display(sGnbm); |
| | | |
| | | //#region 默认展开第一个节点数据列表 |
| | | var treeData_bak = getData(); |
| | | if (treeData_bak) { |
| | | var data = treeData_bak[0]; |
| | | //点击高光 |
| | | $('div[data-id="' + data.id + '"] span').eq(1).last().addClass("custom-tree-item-clicked"); |
| | | $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | treeCkData = data; |
| | | TagId = data.id; |
| | | TagParentId = data.ParentID; |
| | | |
| | | sGnbm = data.id; |
| | | get_Display(sGnbm); |
| | | } |
| | | //#endregion |
| | | |
| | | //退出 |
| | | form.on('submit(Exit)', function (data) { |
| | |
| | | //table.reload("mainTable", { |
| | | // data: buttonArr //将数据重新载入表格 |
| | | //}) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PublicPageMethod/PowerList', |
| | | type: "GET", |
| | | data: { "czybm": linterid, "sGnbm": sGnbm, "HSouceBillType": HSouceBillType}, |
| | | data: { "czybm": linterid, "sGnbm": sGnbm, "HSouceBillType": HSouceBillType }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_MaintenanceMode/PowerLoadTree', |
| | | async: false, |
| | | type: "GET", |
| | | //data: { "sWhere": sWhere }, |
| | | async: false, |
| | |
| | | treeData.push(it) |
| | | } |
| | | }) |
| | | // 递归过滤掉没有子节点的项 |
| | | function filterTree(node) { |
| | | if (!node.children || node.children.length === 0) { |
| | | return null; // 过滤掉没有子节点的项 |
| | | } |
| | | node.children = node.children.map(filterTree).filter(n => n !== null); |
| | | return node; |
| | | } |
| | | // 对每个根节点应用过滤 |
| | | treeData = treeData.map(filterTree).filter(n => n !== null); |
| | | return treeData; |
| | | } |
| | | |
| | | //将url参数中的中文乱码重新转换成中文 |
| | | function getParams(key) { |
| | | var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)"); |
| | | //如果地址栏中出现中文则进行编码 |
| | | var r = encodeURI(window.location.search).substr(1).match(reg); |
| | | if (r != null) { |
| | | //将中文编码的字符重新变成中文 |
| | | return decodeURI(unescape(r[2])); |
| | | } |
| | | return null; |
| | | }; |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | | </html> |