| | |
| | | <div class="layui-colla-item"> |
| | | <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" style="width: 23%;"> |
| | | <div class="layui-col-xs3 layui-inline" style="width: 23%; display:none;"> |
| | | <div id="treeUser" lay-filter="treeUser" class="demo-tree demo-tree-box" style="height: 580px; overflow: scroll;"></div> |
| | | </div> |
| | | <div class="layui-col-xs9 layui-inline" style="width: 74%;"> |
| | | <div class="layui-col-xs12 layui-inline"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">代码</label> |
| | |
| | | |
| | | <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(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var TreeFlag = true;//操作类型 |
| | | } else { |
| | | var TreeFlag = params[params[0]];//操作类型 |
| | | } |
| | | |
| | | var treeCkData = { id: 0 }; |
| | | var TagId = ""; |
| | | var TagParentId = ""; |
| | |
| | | , tree = layui.tree |
| | | var sWhere = " where HStopFlag=0 and HEndFlag<>'1' and HUSEORGID = " + sessionStorage["OrganizationID"] + " "; //树型 |
| | | var sWhere1 = " where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + sessionStorage["OrganizationID"] + " "; //列表 |
| | | |
| | | tree.render({ |
| | | elem: '#treeUser', |
| | | data: getData(sWhere), |
| | | showCheckbox: false, //是否显示复选框 |
| | | id: 'demoId', |
| | | isJump: false, //是否允许点击节点时弹出新窗口跳转 |
| | | showLine: true,//是否开启连接线 |
| | | onlyIconControl: true, //点击后不收缩 |
| | | click: function (obj) { |
| | | //点击高光 |
| | | if (obj.data.id !== treeCkData.id) { |
| | | $('div[data-id="' + obj.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 = obj.data; |
| | | TagId = obj.data.id; |
| | | TagParentId = obj.data.ParentID; |
| | | } |
| | | else { |
| | | $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | treeCkData = { id: 0 }; |
| | | TagId = ""; |
| | | TagParentId = ""; |
| | | } |
| | | if (TreeFlag == "false") |
| | | { |
| | | //$(".layui-col-xs3").css("display", "none"); //隐藏树型 |
| | | //$(".layui-col-xs9").css("width", "100%"); //设置宽度 |
| | | } |
| | | else |
| | | { |
| | | //tree.render({ |
| | | // elem: '#treeUser', |
| | | // data: getData(sWhere), |
| | | // showCheckbox: false, //是否显示复选框 |
| | | // id: 'demoId', |
| | | // isJump: false, //是否允许点击节点时弹出新窗口跳转 |
| | | // showLine: true,//是否开启连接线 |
| | | // onlyIconControl: true, //点击后不收缩 |
| | | // click: function (obj) { |
| | | // //点击高光 |
| | | // if (obj.data.id !== treeCkData.id) { |
| | | // $('div[data-id="' + obj.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 = obj.data; |
| | | // TagId = obj.data.id; |
| | | // TagParentId = obj.data.ParentID; |
| | | // } |
| | | // else { |
| | | // $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | // treeCkData = { id: 0 }; |
| | | // TagId = ""; |
| | | // TagParentId = ""; |
| | | // } |
| | | |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_MaintenanceMode/UserCX', |
| | | type: "GET", |
| | | data: { "HInterID": obj.data.id }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + '/Gy_MaintenanceMode/UserCX', |
| | | // type: "GET", |
| | | // data: { "HInterID": obj.data.id }, |
| | | // success: function (data1) { |
| | | // if (data1.count == 1) { |
| | | // option.data = data1.data; |
| | | // table.render(option); |
| | | // layer.close(index); |
| | | // } else { |
| | | // layer.close(index); |
| | | // layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function () { |
| | | // layer.close(index); |
| | | // layer.alert("接口请求失败!", { icon: 5 }); |
| | | // } |
| | | // }); |
| | | // } |
| | | //}); |
| | | } |
| | | |
| | | |
| | | |
| | | var option = { |
| | |
| | | |
| | | //查询按钮 |
| | | form.on('submit(btnSearch)', function (data) { |
| | | |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PublicPageMethod/UserList', |
| | | type: "GET", |
| | |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.alert("查询成功", { icon: 1 }); |
| | | /*layer.alert("查询成功", { icon: 1 });*/ |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | |
| | | return treeData; |
| | | } |
| | | |
| | | function SeachFilter(sWhere1) |
| | | { |
| | | function SeachFilter(sWhere1) { |
| | | var HNumber = $("#HNumber").val(); |
| | | var HName = $("#HName").val(); |
| | | sWhere1 = " where 1=1 "; |