Edit D:\rfid\libsystem\js\home.js
var operid=mystorage.get("operid");var vLibcode=mystorage.get("libcode");var _operRows;var _showMsgListRows;var color=["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"];var arrList=["cbbmsl","cbsxsl","cbdgcs","cbyscs","cbdccs","cbhsjkcs","cbqkdgcs","cbjdcs","cbzdcs","cbbzgs","cbltcs"];var boxArr=[{table:"lib_holdings",classname:"hold_count"},{table:"lib_holdings",classname:"year_hold_count",datefld:"senddate"},{table:"lib_cir_reader",classname:"rdr_count"},{table:"lib_cir_reader",classname:"year_rdr_count",datefld:"createdate"},{table:"opac_visit",classname:"visit_count"},{table:"opac_visit",classname:"year_visit_count",datefld:"vdate"},{table:"opac_retrieve_booklog",classname:"bookclick_count",limit:[{condition:"type",typeHandler:"0",value:"1"}]},{table:"opac_retrieve_rdrlog",classname:"rdrlogin_count",limit:[{condition:"type",typeHandler:"0",value:"0"}]},{table:"lib_sys_oplog",classname:"year_bmsl_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"3001"}],chart:{name:"??????",color:"#ffa800",renderTo:"chart-bmsl",type:"column",text:"???"}},{table:"lib_sys_oplog",classname:"year_sxsl_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"3002"}],chart:{name:"??????",color:"#ffa800",renderTo:"chart-sxsl",type:"column",text:"???"}},{table:"lib_sys_oplog",classname:"year_dgcs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"2007"}],chart:{name:"??????",color:"#ffa800",renderTo:"chart-dgcs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_yscs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"2004"}],chart:{name:"??????",color:"#ffa800",renderTo:"chart-yscs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_dccs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"5001"}],chart:{name:"??????",color:"#ffa800",renderTo:"chart-dccs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_hsjkcs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"5001"}],chart:{name:"?????????",color:"#ffa800",renderTo:"chart-hsjkcs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_qkdgcs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"6010"}],chart:{name:"?????????",color:"#ffa800",renderTo:"chart-qkdgcs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_jdcs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"6007,6013"}],chart:{name:"?????????",color:"#ffa800",renderTo:"chart-jdcs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_zdcs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"6004"}],chart:{name:"?????????",color:"#ffa800",renderTo:"chart-zdcs",type:"column",text:"??"}},{table:"lib_sys_oplog",classname:"year_bzgs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"4010"}],chart:{name:"??????",color:"#ffa800",renderTo:"chart-bzgs",type:"column",text:"??"}},{table:"lib_cir_log",classname:"year_ltcs_count",datefld:"logdate",operid:operid,limit:[{condition:"logtype",typeHandler:"3",value:"101,102,201"}],chart:{name:"???????",color:"#ffa800",renderTo:"chart-ltcs",type:"column",text:"??"}},];var startIndex=8;$(function(){getPageCog();getCountInfo(0);getChartData(startIndex);initOperidList()});function formatDigital(a){if(a<10){return"0"+a}return a}function pageSetShowBox(){$("#myModal").modal("show")}function savePageCog(){var b={};var d=$(".cog-checkbox");d.each(function(f,e){if(getValue(e.id)){b[e.id]=getValue(e.id)}});var a={type:"homeCog",paramjson:JSON.stringify(b)};var c=base_path+"lib/config/insert.do";if(getValue("id")>0){c=base_path+"lib/config/update.do";a.id=getValue("id")}$.post(c,a,function(e){if(e.status=="0"){alert(e.message);savePageCogResult(e);$("#myModal").modal("hide")}else{alert(e.message)}},"json")}function getPageCog(){var a={type:"homeCog"};var b=base_path+"lib/config/page.do";$.post(b,a,function(c){if(c.status=="0"){savePageCogResult(c)}else{alert(c.message)}},"json")}function savePageCogResult(c){if(c.status=="0"){var d=c.rows[0];if(d){setValue("id",d.id);var a=JSON.parse(d.paramjson);var b=$(".cog-checkbox");b.each(function(f,e){if(a[e.id]){setValue(e.id,a[e.id])}});resetBoxShow(a)}}}function resetBoxShow(a){if(a){var b=true;for(var c=0;c<arrList.length;c++){if(a[arrList[c]]=="1"){$("."+arrList[c]).show();b=false}else{$("."+arrList[c]).hide()}}if(b){for(var c=0;c<arrList.length;c++){$("."+arrList[c]).show()}}}}function getValue(d){var c;if(!d){return}var a=$("#"+d);if(!a){return}var b=a.attr("type");if(b=="checkbox"){if(a.prop("checked")){return"1"}else{return"0"}}c=a.val();if(!c){c=a.text()}if(!c){c=a.html()}return c}function setValue(d,c){if(!d){return}var a=$("#"+d);if(!a){return}var b=a.attr("type");if(b=="checkbox"){if(c=="1"){a.prop("checked",true)}else{a.prop("checked",false)}}else{a.val(c)}}function getCountInfo(b){if(b>=boxArr.length){return}var a=base_path+"lib/statistics/homeExecute.do";var c=boxArr[b].classname;var d=getParamCondtion(boxArr,b);$.post(a,d,function(e){if(e.status=="0"){dataToPageBind(e,c,b);b++;getCountInfo(b)}else{alert(e.message)}},"json")}function getChartData(b){if(b>=boxArr.length){return}var a=base_path+"lib/statistics/homeExecute.do";var d=getParamCondtion(boxArr,b);d.group=" substr(logdate,0,6) ";var c=boxArr[b].chart;$.post(a,d,function(e){if(e.status=="0"){bindChart(e,c,b);b++;getChartData(b)}else{alert(e.message)}},"json")}function bindChart(g,n,l){if(l<color.length){n.color=color[l]}if(l%3==0){n.type="line"}var a=l-startIndex;if(a>-1){var r=[arrList[a]];$("."+r+" .box-solid.box-success>.box-header").css({color:"#fff",background:n.color,"background-color":n.color});$("."+r+" .box-solid.box-success").css({border:"1px solid "+n.color+""})}var d=new Date();var o=d.getFullYear();var m=d.getMonth()+1;var p=d.getDate();if(m>=1&&m<=9){m="0"+m}var s=g.rows;var q=[];var g=[];for(var f=1;f<=m;f++){q.push(o+"??"+f+"??");var h=f;if(f>=1&&f<=9){h="0"+f}var c=o+""+h;var k=false;for(var e=0;e<s.length;e++){if(c==s[e].date){k=true;g.push(s[e].count);break}}if(!k){g.push(0)}}var b=[{name:n.name,color:n.color,data:g}];chartcir=new Highcharts.Chart({chart:{renderTo:n.renderTo,type:n.type,},title:{text:"",x:-20},exporting:{enabled:false},credits:{enabled:false},xAxis:{categories:q,labels:{rotation:-50}},yAxis:{min:0,title:{text:n.text,}},series:b})}function getParamCondtion(e,c){var f={};f.table=e[c].table;var b=0;if(e[c].datefld){f["limit[0].condition"]=e[c].datefld;f["limit[0].typeHandler"]="7";f["limit[0].value"]=getCurDateYMD().substr(0,4)+"0101";f["limit[1].condition"]=e[c].datefld;f["limit[1].typeHandler"]="5";f["limit[1].value"]=getCurDateYMD();b=2}if(e[c].limit&&e[c].limit.length>0){var a=e[c].limit;for(var d=0;d<a.length;d++){f["limit["+b+"].condition"]=a[d].condition;f["limit["+b+"].typeHandler"]=a[d].typeHandler;f["limit["+b+"].value"]=a[d].value;b++}}if(e[c].operid){f["limit["+b+"].condition"]="operid";f["limit["+b+"].typeHandler"]="0";f["limit["+b+"].value"]=e[c].operid}return f}function dataToPageBind(d,e,b){var f=d.rows[0];if(f.count){var c=b-startIndex;if(c>-1){var a=[arrList[c]];$("."+a+" .small-box").addClass("bg-0"+(c))}$("."+e).html(formatNumber(f.count))}}function expandBoxInfo(b){var c=b.element["0"].id;if(c){var c=c.replace("receive","");for(var a=0;a<_showMsgListRows.length;a++){if(c==_showMsgListRows[a].id&&_showMsgListRows[a].status!="2"){onUpdateMsg(c,"status","2");return}}}}function removeBoxInfo(a){}function myMsgSet(){$("#myMsgSet").modal("show")}function initOperidList(){$(".operid-list").html("");var b='<tr><th style="width: 60px"><input class="alloperid" type="checkbox"></th><th>????????</th></tr>';var a=base_path+"par/common/getInitData.do";var c={code:"operid",key:"operid",condition:"libcode",value:vLibcode};$.post(a,c,function(f){if(f.rows.length>0){var e=f.rows;_operRows=e;for(var d=0;d<e.length;d++){if(e[d].code!=operid){b+='<tr><td><input id="'+e[d].code+'" class="operid-checkbox" type="checkbox"></td><td>'+e[d].name+"</td></tr>"}}}$(".operid-list").html(b);$('input[type="checkbox"]').change(function(g){if(this.className=="alloperid"){$(".operid-checkbox").prop("checked",this.checked)}else{$(".alloperid").prop("checked",$(".operid-checkbox:checked").length==$(".operid-checkbox").length)}});initMyMsgBoxList();initShowMsgBoxList()},"json")}function initMyMsgBoxList(){var a=base_path+"msg/message/list.do";var b={};b["limit[0].condition"]="operid";b["limit[0].typeHandler"]="0";b["limit[0].value"]=operid;b.orderBy="id desc";$.post(a,b,function(d){if(d.status=="0"){$(".send-msg").html("");var c=d.rows;if(c.length>0){buildSendMsg(c)}}else{alert(d.message)}},"json")}function buildSendMsg(f){var e="";var d="0";var c=1;for(var b=0;b<f.length;b++){var a=f[b].operid+""+f[b].msgstamp;if(d!=a){if(d.length>0){c=1;e+="</tbody>";e+="</table>";e+="</div>";e+="</div>"}e+='<div id="send'+f[b].id+'" class="my-box box box-widget collapsed-box">';e+='<div class="box-header with-border" >';e+='<div class="user-block">';e+='<span class="username">'+f[b].title+"</span>";e+='<span class="description">???:'+fmtStringToDate(f[b].msgdate)+"~"+fmtStringToDate(f[b].enddate)+"</span>";e+="</div>";e+='<div class="box-tools">';e+='<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>';e+=" ???";e+="</button>";e+='<button type="button" class="btn btn-box-tool" onclick="onTrashMsg('+f[b].operid+","+f[b].msgstamp+')"><i class="fa fa-trash"></i>';e+="???";e+="</button>";e+="</div>";e+="</div>";e+='<div class="box-body">';e+='<span class="description">'+f[b].content+"</span>";e+="<p>"+f[b].note+"</p>";e+="</div>";e+='<div class="box-footer">';e+='<table class="table table-bordered">';e+="<tbody><tr>";e+='<th style="width: 10px">#</th>';e+="<th>????????</th>";e+="<th>????</th>";e+="</tr>";d=a}e+="<tr>";e+="<td>"+c+"</td>";e+="<td>"+getOperName(f[b].receiveoper)+"</td>";e+="<td>"+getOperStatus(f[b].status)+"</td>";e+="</tr>";c++}e+="</tbody>";e+="</table>";e+="</div>";e+="</div>";$(".send-msg").html(e);$(".my-box").boxWidget()}function getOperStatus(a){var b="";if(a=="0"){b='<span class="badge">???</span>'}if(a=="1"){b='<span class="badge bg-green">???</span>'}if(a=="2"){b='<span class="badge bg-yellow">?????</span>'}return b}function onTrashMsg(d,a){var b=base_path+"msg/message/deleteList.do";var c={};c["limit[0].condition"]="operid";c["limit[0].typeHandler"]="0";c["limit[0].value"]=d;c["limit[0].condition"]="msgstamp";c["limit[0].typeHandler"]="0";c["limit[0].value"]=a;$.post(b,c,function(e){if(e.status=="0"){initMyMsgBoxList()}else{alert(e.message)}},"json")}function initShowMsgBoxList(){var a=base_path+"msg/message/list.do";var b={};b["limit[0].condition"]="receiveoper";b["limit[0].typeHandler"]="0";b["limit[0].value"]=operid;b["limit[1].condition"]="homestatus";b["limit[1].typeHandler"]="0";b["limit[1].value"]="0";b.orderBy="id desc";$.post(a,b,function(d){if(d.status=="0"){$(".receive-msg").html("");var c=d.rows;_showMsgListRows=c;if(c.length>0){buildReceiveMsg(c)}}else{alert(d.message)}},"json")}function onUpdateMsg(e,a,c){var b=base_path+"msg/message/update.do";var d={};d.id=e;d[a]=c;$.post(b,d,function(f){if(f.status=="0"){initShowMsgBoxList()}else{alert(f.message)}},"json")}function buildReceiveMsg(c){var b="";for(var a=0;a<c.length;a++){if(c[a].status=="0"){onUpdateMsg(c[a].id,"status","1")}b+='<div id="receive'+c[a].id+'" class="my-box box box-widget collapsed-box">';b+='<div class="box-header with-border" >';b+='<div class="user-block">';b+='<span class="username">'+c[a].title+"</span>";b+='<span class="description">?????:'+getOperName(c[a].operid)+" ???:"+fmtStringToDate(c[a].msgdate)+"~"+fmtStringToDate(c[a].enddate)+"</span>";b+="</div>";b+='<div class="box-tools">';b+='<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>';b+=" ???";b+="</button>";b+='<button type="button" class="btn btn-box-tool" onclick="onUpdateMsg('+c[a].id+',"homestatus","1")"><i class="fa fa-times"></i>';b+="???";b+="</button>";b+="</div>";b+="</div>";b+='<div class="box-body">';b+='<span class="description">'+c[a].content+"</span>";b+="<p>"+c[a].note+"</p>";b+="</div>";b+="</div>"}$(".receive-msg").html(b);$(".my-box").boxWidget()}function getOperName(b){for(var a=0;a<_operRows.length;a++){if(b==_operRows[a].code){return _operRows[a].name}}return b}function fmtStringToDate(a){if(!a){return a}a=a.toString();if(a!=undefined&&a.length==8){return a.substr(0,4)+"-"+a.substr(4,2)+"-"+a.substr(6,2)}return a}function saveMsgInfo(){var b={};var a=[];var e=$(".operid-checkbox");e.each(function(g,f){if(getValue(f.id)=="1"){a.push(f.id)}});if(a.length==0){alert("?????????????");return}b.operids=a.join(",");var d=$(".msg-text-input");d.each(function(h,g){var f=getValue(g.id);if(f.length>0){b[g.id]=f}});if(!b.title){alert("?????????");return}if(!b.enddate){alert("????????????");return}b.operid=operid;b.enddate=b.enddate.replace(new RegExp("-","g"),"");var c=base_path+"msg/message/insertList.do";if(getValue("msgid")>0){c=base_path+"msg/message/update.do";b.id=getValue("msgid")}b.type=1;$.post(c,b,function(f){if(f.status=="0"){alert(f.message);initMyMsgBoxList();$("#myMsgSet").modal("hide")}else{alert(f.message)}},"json")}function formatNumber(c){var b="";c=c.toString();if(c.indexOf(".")!=-1){b="."+c.split(".")[1];c=parseInt(c.split(".")[0])}var d=c.toString().split("");var a=-3;while(d.length+a>0){d.splice(a,0,",");a-=4}return d.join("")+b}function getCurDateYMD(){var a=new Date();var d=a.getFullYear();var e=a.getMonth()+1;var c=a.getDate();if(e>=1&&e<=9){e="0"+e}if(c>=0&&c<=9){c="0"+c}var b=d+""+e+""+c;return b};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de