Edit D:\rfid\libsystem\page\catalogue\js\cat_marcbacth.js
var fieldComBoxData=[];var jsonGridColumns=[{field:"fld",title:"?????",width:"10%",editor:"textbox",},{field:"indicator",title:"?????",width:"10%",editor:"textbox"},{field:"value",title:"??????",width:"70%",editor:"textbox"},{field:"addnewfld",title:"?????????",width:"10%",formatter:onShowCheckBoxName,editor:{type:"checkbox",options:{on:"1",off:"0"}}},];var deleteGridColumns=[{field:"fld",title:"?????",width:"10%",editor:"textbox",},{field:"fldid",title:"??????",width:"10%",editor:"textbox"},{field:"subfldid",title:"????????",width:"10%",editor:"textbox"},];var updateGridColumns=[{field:"fld",title:"?????",width:"10%",editor:"textbox",},{field:"indicator",title:"?????",width:"10%",editor:"textbox"},{field:"oldvalue",title:"????",width:"30%",editor:"textbox"},{field:"newvalue",title:"????",width:"30%",editor:"textbox"},{field:"partialreplace",title:"???????",width:"10%",formatter:onShowCheckBoxName,editor:{type:"checkbox",options:{on:"1",off:"0"}}},];var recordDeleteGridColumns=[{field:"fld",title:"?????",width:"10%",editor:"textbox",},{field:"value",title:"??????",width:"80%",editor:"textbox"},];var curPerviewIndex=1;var maxPerviewNum=undefined;var wbTotal=0;var myWebSocket;var myOptype=undefined;var _bacth;var stopBnt='<br/><div style="text-align: center;margin:10px auto;"><a class="easyui-linkbutton" onclick=\'stopAccept()\'>????????</a></div>';$(function(){setCurImportDataGridHeight(350);bibindex();var b=[{code:"libcode",key:"libcode",condition:"code",value:vLibcode},{key:"sysid"}];_myPage.prototype.initData(b);initFormatDesignGrid("fldadd");$("#opertype").combobox({onChange:function(d,c){if(d){initFormatDesignGrid(d)}}});initWebSocket();var a=mystorage.get("lowerlibcode")+",";console.log(a)});function onShowCheckBoxName(b,c,a){if(b=="1"){return"??"}else{return"??"}}function bibindex(){var b={key:"bibindex"};var a=base_path+"par/common/getInitData.do";$.post(a,b,function(c){$("#bacthindex").combobox({data:c.rows,valueField:"code",textField:"name",panelHeight:"200px",loadFilter:function(d){return d},onLoadSuccess:function(){$(this).combobox("select","ID")}});$("#bibindex").combobox({data:c.rows,valueField:"code",textField:"name",panelHeight:"200px",onLoadSuccess:function(){$(this).combobox("select","ISBN")}});$("#bibindex1").combobox({data:c.rows,valueField:"code",textField:"name",panelHeight:"200px",onLoadSuccess:function(){$(this).combobox("select","TITLE")}});$("#bibindex2").combobox({data:c.rows,valueField:"code",textField:"name",panelHeight:"200px",onLoadSuccess:function(){$(this).combobox("select","AUTHOR")}})},"json")}function initFormatDesignGrid(a){eidtorGridObject=$("#setFldHandlerGrid");var b;if(a=="fldadd"){b=jsonGridColumns}else{if(a=="fldmod"){b=updateGridColumns}else{if(a=="flddel"){b=deleteGridColumns}else{if(a=="recdel"){b=recordDeleteGridColumns}}}}eidtorGridObject.datagrid("loadData",[]);$("#setFldHandlerGrid").datagrid({iconCls:"e-icon fa fa-cog",fit:true,title:"????????????",fitColumns:true,singleSelect:true,border:false,nowrap:false,striped:true,toolbar:toolbar,onClickRow:onClickEditorRow,columns:[b]});$("#setFldHandlerGrid").datagrid("resize")}function onPerviewData(c){$("#showPerviewOrgMarcData").html("");$("#showPerviewTagMarcData").html("");var b=getCurPageRecord();var a=eidtorGridObject.datagrid("getRows");if(a.length==0&&b.optype!="recdel"){return openMessageDlg("????????????????????")}if(b){if(c){curPerviewIndex=c}else{curPerviewIndex=1}b.previewindex=curPerviewIndex;b.express="preview";myWSSend(b)}}function stopAccept(){var a={};a.optype="stop";a.express="stop";myOptype="stop";myWSSend(a);$.messager.progress("close");$.messager.progress({title:"????????",msg:"???????????,?????..."})}function initWebSocket(a){if("WebSocket" in window){myWebSocket=new WebSocket("ws://"+wbServerUrl+"websocket/handleMarc");myWebSocket.onopen=function(){};myWebSocket.onmessage=function(b){myWSOnMessage(b)};myWebSocket.onclose=function(b){openMessageDlg("????????...");$.messager.progress("close")};myWebSocket.onerror=function(b){openMessageDlg("??????...");$.messager.progress("close")}}else{openMessageDlg("???????????? WebSocket!")}}function myWSOnMessage(a){var b=JSON.parse(a.data);if(b.status=="0"){console.log(b);var c=b.rows[0];onHandlerBacthApp(c);if(c&&(c.express=="bacth"||c.express=="stop")){onBacthResult(b)}else{if(c&&c.express=="preview"){setDataToPageShowPerview(b)}else{}}}else{openMessageDlg(b.message)}}function myWSSend(a){myWebSocket.send(JSON.stringify(a))}function getCurPageRecord(){var b={};var c={};c.limit=getSrchlimit();b.srchlimit=c;b.optype=getValue("opertype");acceptEidtorGrid();var a=eidtorGridObject.datagrid("getRows");var d=[];d={};d.optype=getValue("opertype");if(a.length>0){d.list=a}b.param=d;return b}function getSrchlimit(){var b=[];var a=$('[item-type="export_record"]');var c=0;a.each(function(e,g){var f={};var j=g.id;var d=g.attributes["link-combobox"];var i=g.attributes["handler-type"];var h=g.attributes["table-type"];if(i){if(getValue(j).length>0){if(d){f.condition=getValue(d.value)}else{if(h){f.condition=h.value+"."+j.replace("export_beg_","").replace("export_end_","").replace("export_","")}else{f.condition=j.replace("export_beg_","").replace("export_end_","").replace("export_","")}}f.typeHandler=i.value;f.value=getValue(j);b.push(f)}}});return b}function setDataToPageShowPerview(e){var m=e.rows[0];if(m&&m.orgmarc){maxPerviewNum=m.total;$("#showPerviewOrgMarcData").html("");var c=m.orgmarc.split(/[\n\r]/g);var g="<div>"+curPerviewIndex+"</div>";for(var f=0;f<c.length;f++){g+='<div style="word-break: break-all; word-wrap:break-word;width: 100%;white-space:normal;">'+c[f].replace(/[$]([A-Za-z0-9])/g,'<font color="#A60020">$$$1</font>')+"</div>"}$("#showPerviewOrgMarcData").html(g);if(m.tagmarc){$("#showPerviewTagMarcData").html("");var a=m.tagmarc.split(/[\n\r]/g);g="<div>"+curPerviewIndex+"</div>";for(var f=0;f<a.length;f++){var n=eidtorGridObject.datagrid("getRows");var b="";for(var d=0;d<n.length;d++){var k=n[d].fld;var h=a[f];if(h.length>3&&k.length>3){if(k.substr(0,3)==h.substr(0,3)){var l=getValue("opertype");if(l=="fldadd"&&h.indexOf(n[d].value)>-1){b="background:red;color:#fff;";break}else{if(l=="flddel"){b="background:red;color:#fff;";break}else{if(l=="fldmod"&&h.indexOf(n[d].newvalue)>-1){b="background:red;color:#fff;";break}}}}}}g+='<div style="word-break: break-all; word-wrap:break-word;width: 100%;white-space:normal;'+b+'">'+a[f].replace(/[$]([A-Za-z0-9])/g,'<font color="#A60020">$$$1</font>')+"</div>"}$("#showPerviewTagMarcData").html(g)}}else{if(e.message&&e.status!="0"){openMessageDlg(e.message)}}}function onPerviewNextData(){if(curPerviewIndex>=maxPerviewNum){return openMessageDlg("??????????¤????")}onPerviewData(curPerviewIndex+1)}function onPerviewPrevData(){if(curPerviewIndex>1){onPerviewData(curPerviewIndex-1)}else{openMessageDlg("???????????")}}function onHandlerBacth(){onPerviewData(1);_bacth="bacth"}function onHandlerBacthApp(b){if(b){if(_bacth&&!b.complete&&b.total){_bacth=undefined;var a=getCurPageRecord();a.express="bacth";$.messager.confirm("??????","?????"+b.total+"]?¤???,??????????????????",function(c){if(c){myOptype=undefined;$.messager.progress({title:"????????",msg:"?????????,?????..."+stopBnt});myWSSend(a)}})}}}function checkErrorFile(){var c=base_path+"com/webuploader/download.do?filename="+errorfile;var b=window.open(c)}function onBacthResult(b){errorcount=0;handlecount=0;successcount=0;errorfile="";var c=b.rows[0];if(c.handlecount>=0){$.messager.progress("close");errorfile=c.errorfile;errorcount+=c.errorcount;handlecount+=c.handlecount;successcount+=c.successcount;wbTotal=c.total;var a="";if(myOptype){myOptype=undefined;a=""}else{a=stopBnt}$.messager.progress({title:"????????",msg:"?????"+handlecount+"]?????,???["+successcount+"]??,???["+errorcount+"]??,??????????? ..."+a});if(c.complete){$.messager.progress("close");$(".handlecount").html("?????"+handlecount+"]?????");$(".successcount").html("???["+successcount+"]??");$(".errorcount").html("???["+errorcount+"]??");$("#checkerrorfile").show();$("#acceptFileResultDlg").dialog("open")}}}function setCurImportDataGridHeight(b){var a=$(window).height();var c=a-b;$(".import-data-div").css("height",c+"px");$("#perviewlayout").layout("resize");$(".acceptTextTip").hide()};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de