lihai-oa/public/static/assets/gougu/module/dtree.js

1 line
56 KiB
JavaScript
Raw Normal View History

2023-10-24 15:17:16 +08:00
layui.define(["jquery","layer","form"],function(e){var f=layui.$,b=layui.layer,m=layui.form,y="dtree-nav-ul-sid",v="dtree-nav-item",k="dtree-nav-div",u="dtreefont",g="dtreefont-special",i="dtree-icon-move-down",o="dtree-icon-move-up",n="dtree-icon-refresh",s="dtree-icon-delete1",r="dtree-icon-search_list_light",t="dtree-toolbar",C="dtree-toolbar-tool",j="dtree-icon-dian",I="dtree-nav-checkbox-div",N="dtree-icon-fuxuankuangxuanzhong",T="dtree-icon-fuxuankuang",x="dtree-icon-fuxuankuang-banxuan",P="d-click-checkbar",c="dtree",a="dtree-",d="-item-this",l="-item",h="-dtreefont",p="-ficon",q="-icon",D="-checkbox",S="-choose",A="dtree-nav-this",L="dtree-nav-show",O="dtree-icon-hide",_=f("body"),F="dtree",w={},R={"-1":{open:"dtree-icon-null-open",close:"dtree-icon-null-close"},0:{open:"dtree-icon-jian",close:"dtree-icon-jia"},1:{open:"dtree-icon-xiangxia1",close:"dtree-icon-xiangyou"}},B={"-1":{open:"dtree-icon-null-open",close:"dtree-icon-null-close"},0:{open:"dtree-icon-wenjianjiazhankai",close:"dtree-icon-weibiaoti5"}},M={"-1":"dtree-icon-null",0:"dtree-icon-weibiaoti5",1:"dtree-icon-yonghu",2:"dtree-icon-fenzhijigou",3:"dtree-icon-fenguangbaobiao",4:"dtree-icon-xinxipilu",5:"dtree-icon-shuye1",6:"dtree-icon-caidan_xunzhang",7:"dtree-icon-normal-file"},E="checkNodeClick",U="itemNodeClick",J="addToolbar",z="editToolbar",G="delToolbar",$="moveDown",H="moveUp",X="refresh",K="remove",Q="searchNode",V={getElemId:function(e){var t=e.elem||"",a=e.obj||f(t);return 0==a.length?"":f(a)[0].id},escape:function(e){return"string"!=typeof e?"":e.replace(Z.escape,function(e){return Y.escape[e]})},unescape:function(e){return"string"!=typeof e?"":e.replace(Z.unescape,function(e){return Y.unescape[e]})},cloneObj:function(e,t){var a={};e instanceof Array&&(a=[]);var i="";for(var o in void 0!==t&&(i=t.join(",")),e)if(-1==i.indexOf(o)){var n=e[o];a[o]="object"==typeof n?V.cloneObj(n,void 0!==typeof t?t:[]):n}return a}},W=Object.keys||function(e){e=Object(e);var t=[];for(var a in e)t.push(a);return t},Y={escape:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&quo;"}};Y.unescape=function(e){e=Object(e);var t={};for(var a in e)t[e[a]]=a;return t}(Y.escape);var Z={escape:RegExp("["+W(Y.escape).join("")+"]","g"),unescape:RegExp("("+W(Y.unescape).join("|")+")","g")},ee=function(i){var e=i.data?i.data:{},t="boolean"!=typeof i.async||i.async;f.ajax({type:i.type?i.type:"POST",headers:i.headers,url:i.url,dataType:i.dataType?i.dataType:"json",data:e,async:t,success:i.success,error:function(e,t,a){"function"==typeof i.error?i.error():b.msg("系统异常导致操作失败, 请联系管理员。",{icon:5,shift:6})},statusCode:{404:function(){b.msg("未找到指定请求,请检查访问路径!",{icon:5,shift:6})},500:function(){b.msg("系统错误,请联系管理员。",{icon:5,shift:6})}},complete:function(e,t){"function"==typeof i.complete&&i.complete(e,t)}})},te=function(e){var t="?";for(var a in e)t+=a+"="+e[a]+"&";return t=t.substring(0,t.length-1)},ae=function(e){this.response={statusName:"code",statusCode:200,message:"message",rootName:"data",treeId:"id",parentId:"parentId",title:"title",iconClass:"iconClass",childName:"children",isLast:"isLast",spread:"spread",disabled:"disabled",checkArr:"checkArr",isChecked:"isChecked",type:"type",basicData:"basicData"},this.defaultRequest={nodeId:"nodeId",parentId:"parentId",context:"context",isLeaf:"isLeaf",level:"level",spread:"spread",dataType:"dataType",ischecked:"ischecked",initchecked:"initchecked",basicData:"basicData",recordData:"recordData"},this.toolbarFun={addTreeNode:function(e,t){},editTreeNode:function(e,t){},editTreeLoad:function(e){},delTreeNode:function(e,t){},loadToolbarBefore:function(e,t,a){return e}},this.toolbarStyle={title:"节点",area:["60%","80%"]},this.menubarFun={remove:function(e){return!0}},this.menubarTips={toolbar:[],group:[$,H,X,K,Q],freedom:[]},this.checkbarFun={chooseBefore:function(e,t){return!0},chooseDone:function(e){}},this.iframe={iframeElem:"",iframeUrl:"",iframeLoad:"leaf",iframeDefaultRequest:{nodeId:"nodeId",parentId:"parentId",context:"context",isLeaf:"isLeaf",level:"level"