src/KopSoftWms/wwwroot/js/yui2.min.js

(完整代码) 5KB

function layer_close(){var n=parent.layer.getFrameIndex(window.name);parent.layer.close(n)}function layer_close2(){var n=parent.layer.getFrameIndex(window.name);parent.$("button[name='refresh']").click();parent.layer.close(n)}var yui={ready:function(n){(function(){n&&n()})()},onkeydown:function(n){document.onkeydown=function(t){var i=document.all?window.event:t;i.keyCode===13&&n&&n()}},getWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},getHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},getLength:function(n){return n.length},get:function(n){n&&n()},post:function(){},getDomById:function(n){return document.getElementById(n)},print:function(n){console.info(n)},toJson:function(n){return JSON.stringify(n)},toObj:function(n){return JSON.parse(n)},isRealNum:function(n){return n===""||n===null?!1:isNaN(n)?!1:!0},GetPercent:function(n,t){return(n=parseFloat(n),t=parseFloat(t),isNaN(n)||isNaN(t))?"-":t<=0?"0%":Math.round(n/t*1e4)/100+"%"},getNow:function(){var i=new Date,r="-",u=i.getFullYear(),n=i.getMonth()+1,t=i.getDate();return n>=1&&n<=9&&(n="0"+n),t>=0&&t<=9&&(t="0"+t),u+r+n+r+t},getYearMonth:function(){var t=new Date,i=t.getFullYear(),n=t.getMonth()+1;return n>=1&&n<=9&&(n="0"+n),i+"-"+n},$axiospostform:function(n,t){return new Promise(function(i,r){axios.post(n,Qs.stringify(t),{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(n){i(n)}).catch(function(n){r(n)})})},$axiospostjson:function(n,t){return new Promise(function(i,r){axios.post(n,t,{headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(function(n){i(n)}).catch(function(n){r(n)})})},$axiospost:function(n,t){return new Promise(function(i,r){axios.post(n,t).then(function(n){i(n)}).catch(function(n){r(n)})})},$axiosget:function(n,t){return new Promise(function(i,r){axios.get(n,t).then(function(n){i(n)}).catch(function(n){r(n)})})}},yl={table:function(n,t,i,r,u,f,e,o,s){r=r||"GET";o=o||"CreateDate";s=s||"desc";typeof f=="undefined"&&(f=!0);$("#"+n).bootstrapTable({url:t,method:r,contentType:"application/x-www-form-urlencoded; charset=UTF-8",toolbar:"#toolbar",striped:!0,cache:!1,sortable:!0,sortOrder:s,sortName:o,pagination:!0,paginationLoop:!0,onlyInfoPagination:!1,sidePagination:"server",pageNumber:1,pageSize:10,pageList:[10,25,50,100,"All"],search:!0,strictSearch:!1,trimOnSearch:!0,smartDisplay:!0,showPaginationSwitch:!1,showColumns:!0,showHeader:!0,showFooter:!1,showRefresh:!0,showExport:!1,exportDataType:"all",buttonsAlign:"right",exportTypes:["csv","txt","sql","doc","excel","xlsx","pdf"],Icons:"glyphicon-export",singleSelect:f,minimumCountColumns:1,clickToSelect:!0,uniqueId:u,showToggle:!0,showFullscreen:!1,cardView:!1,detailView:!1,queryParams:function(n){var t={limit:n.limit,offset:n.offset,sort:n.sort,order:n.order,_:n._,search:n.search,datemin:_self.$refs.datemin.value,datemax:_self.$refs.datemax.value};return e&&(t.DeptId=_self.$refs.DeptId.value),t},queryParamsType:"limit",columns:i})},table2:function(n,t,i,r,u,f,e){u=u||"GET";$("#"+n).bootstrapTable({url:t,method:u,toolbar:"#toolbar",striped:!0,cache:!1,sortable:!0,sortOrder:e,sortName:f,pagination:!0,paginationLoop:!0,onlyInfoPagination:!1,sidePagination:"server",pageNumber:1,pageSize:10,pageList:[10,25,50,100,"All"],search:!0,strictSearch:!1,trimOnSearch:!0,smartDisplay:!0,showPaginationSwitch:!1,showColumns:!0,showHeader:!0,showFooter:!1,showRefresh:!0,showExport:!1,exportDataType:"all",buttonsAlign:"right",exportTypes:["csv","txt","sql","doc","excel","xlsx","pdf"],Icons:"glyphicon-export",singleSelect:!0,minimumCountColumns:1,clickToSelect:!0,uniqueId:r,showToggle:!0,showFullscreen:!1,cardView:!1,detailView:!0,queryParamsType:"limit",columns:i})},layershow:function(n,t,i,r){(n===null||n==="")&&(n=!1);(t===null||t==="")&&(t="404.html");(i===null||i==="")&&(i=800);(r===null||r==="")&&(r=$(window).height()-50);layer.open({type:2,area:[i+"px",r+"px"],fix:!1,maxmin:!0,shade:.4,title:n,content:t})},layershowId:function(n,t,i,r){(n===null||n==="")&&(n=!1);(i===null||i==="")&&(i=800);(r===null||r==="")&&(r=$(window).height()-50);layer.open({type:1,area:[i+"px",r+"px"],fix:!1,maxmin:!0,shade:.4,title:n,content:"#"+t})}};const errorMsg="异常";Vue.directive("focus",{inserted:function(n){n.focus()}});Vue.prototype.strLength=function(n,t){return t?n.length:[].reduce.call(n,function(n,t){return t.charCodeAt(0)>255?n+2:n+1},0)};Vue.prototype.GetDateDiff=function(n,t,i){n=n.replace(/\-/g,"/");t=t.replace(/\-/g,"/");i=i.toLowerCase();var u=new Date(n),f=new Date(t),r=1;switch(i){case"second":r=1e3;break;case"minute":r=6e4;break;case"hour":r=36e5;break;case"day":r=864e5}return console.info(f.getTime()-u.getTime()),parseFloat((f.getTime()-u.getTime())/parseInt(r)).toFixed(2)};Vue.prototype.jsonDateFormat=function(n){var i,r;if(n===null||n.length<=0)return"";i=n.toString();try{if(r=parseInt(i.replace("/Date(","").replace(")/",""),10),r<0)return null;var t=new Date(parseInt(i.replace("/Date(","").replace(")/",""),10)),u=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,f=t.getDate()<10?"0"+t.getDate():t.getDate(),e=t.getHours()<10?"0"+t.getHours():t.getHours(),o=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),h=t.getMilliseconds();return t.getFullYear()+"-"+u+"-"+f+" "+e+":"+o+":"+s}catch(c){return"时间格式转换错误"}};Vue.prototype.getNow=function(){var i=new Date,r="-",u=i.getFullYear(),n=i.getMonth()+1,t=i.getDate();return n>=1&&n<=9&&(n="0"+n),t>=0&&t<=9&&(t="0"+t),u+r+n+r+t};Vue.prototype.getCurrentMonthFirst=function(){var i=new Date,r="-",u=i.getFullYear(),t=i.getMonth()+1,n=i.getDate();return n=1,t>=1&&t<=9&&(t="0"+t),n>=0&&n<=9&&(n="0"+n),u+r+t+r+n};Vue.prototype.getCurrentMonthLast=function(){var i="-",r=new Date,u=r.getFullYear()+"",n=r.getMonth()+1+"",f,t;return n>=1&&n<=9&&(n="0"+n),f=new Date(u,n,0),t=f.getDate(),t>=0&&t<=9&&(t="0"+t),u+i+n+i+t};

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。