mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
37 KiB
1 line
37 KiB
7 months ago
|
!function(){var isLayui=window.layui&&layui.define,ready={getPath:function(){var jsPath=document.currentScript?document.currentScript.src:function(){var js=document.scripts,last=js.length-1,src;for(var i=last;i>0;i--){if(js[i].readyState==="interactive"){src=js[i].src;break}}return src||js[last].src}();return jsPath.substring(0,jsPath.lastIndexOf("/")+1)}(),getStyle:function(node,name){var style=node.currentStyle?node.currentStyle:window.getComputedStyle(node,null);return style[style.getPropertyValue?"getPropertyValue":"getAttribute"](name)},link:function(href,fn,cssname){if(!laydate.path){return}var head=document.getElementsByTagName("head")[0],link=document.createElement("link");if(typeof fn==="string"){cssname=fn}var app=(cssname||href).replace(/\.|\//g,"");var id="layuicss-"+app,timeout=0;link.rel="stylesheet";link.href=laydate.path+href;link.id=id;if(!document.getElementById(id)){head.appendChild(link)}if(typeof fn!=="function"){return}(function poll(){if(++timeout>8*1000/100){return window.console&&console.error("laydate.css: Invalid")}parseInt(ready.getStyle(document.getElementById(id),"width"))===1989?fn():setTimeout(poll,100)}())}},laydate={v:"5.0.9",config:{},index:(window.laydate&&window.laydate.v)?100000:0,path:ready.getPath,set:function(options){var that=this;that.config=lay.extend({},that.config,options);return that},ready:function(fn){var cssname="laydate",ver="",path=(isLayui?"modules/laydate/":"theme/")+"default/laydate.css?v="+laydate.v+ver;isLayui?layui.addcss(path,fn,cssname):ready.link(path,fn,cssname);return this}},thisDate=function(){var that=this;return{hint:function(content){that.hint.call(that,content)},config:that.config}},MOD_NAME="laydate",ELEM=".layui-laydate",THIS="layui-this",SHOW="layui-show",HIDE="layui-hide",DISABLED="laydate-disabled",TIPS_OUT="开始日期超出了结束日期<br>建议重新选择",LIMIT_YEAR=[100,200000],ELEM_STATIC="layui-laydate-static",ELEM_LIST="layui-laydate-list",ELEM_SELECTED="laydate-selected",ELEM_HINT="layui-laydate-hint",ELEM_PREV="laydate-day-prev",ELEM_NEXT="laydate-day-next",ELEM_FOOTER="layui-laydate-footer",ELEM_CONFIRM=".laydate-btns-confirm",ELEM_TIME_TEXT="laydate-time-text",ELEM_TIME_BTN=".laydate-btns-time",Class=function(options){var that=this;that.index=++laydate.index;that.config=lay.extend({},that.config,laydate.config,options);laydate.ready(function(){that.init()})},lay=function(selector){return new LAY(selector)},LAY=function(selector){var index=0,nativeDOM=typeof selector==="object"?[selector]:(this.selector=selector,document.querySelectorAll(selector||null));for(;index<nativeDOM.length;index++){this.push(nativeDOM[index])}};LAY.prototype=[];LAY.prototype.constructor=LAY;lay.extend=function(){var ai=1,args=arguments,clone=function(target,obj){target=target||(obj.constructor===Array?[]:{});for(var i in obj){target[i]=(obj[i]&&(obj[i].constructor===Object))?clone(target[i],obj[i]):obj[i]}return target};args[0]=typeof args[0]==="object"?args[0]:{};for(;ai<args.length;ai++){if(typeof args[ai]==="object"){clone(args[0],args[ai])}}return args[0]};lay.ie=function(){var agent=navigator.userAgent.toLowerCase();return(!!window.ActiveXObject||"ActiveXObject" in window)?((agent.match(/msie\s(\d+)/)||[])[1]||"11"):false}();lay.stope=function(e){e=e||window.event;e.stopPropagation?e.stopPropagation():e.cancelBubble=true};lay.each=function(obj,fn){var key,that=this;if(typeof fn!=="function"){return that}obj=obj||[];if(obj.constructor===Object){for(key in obj){if(fn.call(obj[key],key,obj[key])){break}}}else{for(key=0;key<obj.length;key++){if(fn.call(obj[key],key,obj[key])){break}}}return that};lay.digit=function(num,length,end){var str="";num=String(num);length=length||2;for(var i=num.length;i<length;i++){str+="0"}return num<Math.pow(10,length)?str+(num|0):num};lay.elem=function(elemName,attr){var elem=document.createElement(elemName);lay.each(attr||{},function(key,value){elem.setAttribute(key,value)});return elem};LAY.addStr=function(str,new_str){str=str.replace(/\s+/," ");new_str=new_str.replace(/\s+/," ").split(" ");lay.each(new_str,function(ii,item)
|