Edit D:\rfid\apache-tomcat-8.5.32\webapps\libsystem\page\export\exportlist.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page import="zlicense.util.FunModuleEnum"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String jsondata = request.getParameter("jsondata"); %> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>??????</title> <%@ include file="../global/linkcss.jsp" %> <link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/page/export/css/exportlist.css?version=<%=MyJspUtils.getVersion() %>"> <style type="text/css"> .all-data,.limit-data{ position: relative; } .export-type{ position: fixed; top:50px; width: 140px; height: 180px; background-color: #2a94de; z-index: 999; display: none; } .export-type div{ border-top: 1px solid #008fbf; cursor: pointer; height: 40px; line-height: 40px; color: #fff; } .all-data:hover .export-type,.limit-data:hover .export-type{ display: block; } </style> </head> <body id="body" > <!-- header --> <div class="header"> <!-- ???????? --> <div class="header-title"> ?????? </div> <div class="header-nva"> <ul class="navbar-nav navbar-nav-menu"> <li><a href="javascript:void(0)" onclick="onPrintPerview()"><i class="fa fa-print"></i> ??????</a></li> <li class="all-data"><a href="javascript:void(0)" onclick="onExportExcelFlie()"><i class="fa fa-file-excel-o"></i> ??????</a> <%if (MyJspUtils.checkLicense(FunModuleEnum.YAN_SHI_GONG_NENG)) {%> <div class='export-type'> <div data="csv">???CSV</div> <div data="dbf">???DBF</div> <div data="excel">???EXCEL</div> <div data="access">???ACCESS</div> </div> <%}%> </li> <li class="limit-data" style="display: none;"><a href="javascript:void(0)" onclick="onExportExcelFlie()"><i class="fa fa-file-excel-o"></i> ??????????</a> <%if (MyJspUtils.checkLicense(FunModuleEnum.YAN_SHI_GONG_NENG)) {%> <div class='export-type'> <div data="csv">???CSV</div> <div data="dbf">???DBF</div> <div data="excel">???EXCEL</div> <div data="access">???ACCESS</div> </div> <%}%> </li> <li class="limit-data" style="display: none;"><a href="javascript:void(0)" onclick="onExportExcelFlie(1)"><i class="fa fa-file-excel-o"></i> ?????????</a> <%if (MyJspUtils.checkLicense(FunModuleEnum.YAN_SHI_GONG_NENG)) {%> <div class='export-type'> <div data="csv">???CSV</div> <div data="dbf">???DBF</div> <div data="excel">???EXCEL</div> <div data="access">???ACCESS</div> </div> <%}%> </li> <li class="bar-chart" style="display: none;"><a href="javascript:void(0)" onclick="onTable()"><i class="fa fa-table"></i> ??????</a></li> <li class="bar-chart" style="display: none;"><a href="javascript:void(0)" onclick="onBarChart()"><i class="fa fa-bar-chart"></i> ??????</a></li> <li><a href="javascript:void(0)" onclick="onCloseWin()"><i class="fa fa-close"></i> ??????</a></li> </ul> </div> <!-- ??????????????--> <div class="header-operator"> <ul class="navbar-nav"> </ul> </div> </div> <div class="lold-div"> <div style="color: #555;left: 46%;top:40%;position: absolute;">??????????????....</div> <div class="lold-div container "> <div class="lold-div circle"></div> <div class="lold-div circle"></div> <div class="lold-div circle"></div> </div> </div> <div style="border: 1px solid #efefef;"> <div class="data-limit-tip"></div> <div class="labelDisplayArea" style="margin-top: 20px;"> <div >?????????</div> </div> <div class="countDisplayArea"> <div id="echartBox" style="width: 100%;height:800px; "></div> </div> </div> </body> <%@ include file="../global/linkjs.jsp" %> <script type="text/javascript"> var jsonData = '<%=jsondata%>'; var vType = "export"; </script> <script type="text/javascript" src="${pageContext.request.contextPath}/third-party/jqprint/jquery-1.4.4.min.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/third-party/jqprint/jquery.jqprint-0.3.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/page/public/js/expstapublic.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/tableExport.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/jquery.base64.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/echarts.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/macarons.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/mychart.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript"> var maxRecord = 1500; var paramjson = null; var allStyle="line-height:auto;padding:10px 0;"; var getPostData; $(function(){ $(".export-type div").bind("click",function(){ var data = $(this).attr("data"); onExportExcelFlie("",data); }); }); function onExportExcelFlie(){ /* var url = base_path+'lib/export/download.do'; openPostWindowDownLoad(url,jsonData); */ $('.table-grid').tableExport({ type:'excel', escape:'false', fileName: 'sum' }); } function onExportExcelFlie(type,fmt){ var url = base_path+'lib/export/download.do'; if(type){ url+="?count="+maxRecord; } if(fmt){ url+="?fmt="+fmt; } openPostWindowDownLoad(url,jsonData); } function onBarChart(){ $(".countDisplayArea").show(); $(".labelDisplayArea").hide(); } function onTable(){ $(".countDisplayArea").hide(); $(".labelDisplayArea").show(); } function setLabelDisplayArea(designData,returnData){ if(jsonData.count){ maxRecord = jsonData.count; } getPostData = returnData; var designDataRow = designData.rows[0]; paramjson = JSON.parse(designDataRow.paramjson); var vDesignGrid = paramjson.grid; var vDesignPropertyGrid = paramjson.propertygrid; var vExportname,vPageFontSize,vPageAlignType,vShowName,vShowOperator,vShowTime; if(paramjson.propertygrid){ for(var i = 0;i < vDesignPropertyGrid.length;i++){ if(vDesignPropertyGrid[i].code == "exportname"){ vExportname = vDesignPropertyGrid[i].value; } //?????? if(vDesignPropertyGrid[i].code == "pageFontSize"){//?????? vPageFontSize = parseInt(vDesignPropertyGrid[i].value); } //?????? if(vDesignPropertyGrid[i].code == "pageAlignType"){//?????? vPageAlignType = vDesignPropertyGrid[i].value; } if(vDesignPropertyGrid[i].code == "showname"){ vShowName = vDesignPropertyGrid[i].value; } if(vDesignPropertyGrid[i].code == "showoperator"){ vShowOperator = vDesignPropertyGrid[i].value; } if(vDesignPropertyGrid[i].code == "showtime"){ vShowTime = vDesignPropertyGrid[i].value; } } }else{ vExportname = paramjson.title //?????? if(paramjson.pageFontSize){//?????? vPageFontSize = parseInt(paramjson.pageFontSize); } //?????? if(paramjson.pageAlignType){//?????? vPageAlignType = paramjson.pageAlignType; } if(paramjson.showname){ vShowName = paramjson.showname; } if(paramjson.showoperator){ vShowOperator = paramjson.showoperator; } if(paramjson.showtime){ vShowTime = paramjson.showtime; } } var dfHtml = ""; if(vShowOperator == "1"){ dfHtml += "<li><a><i class=\"fa fa-user-o\"></i> " + jsonData.account + "</a></li>"; } if(vShowName == "1"){ $(".header-title").html(vExportname); } if(vShowTime == "1"){ dfHtml += "<li><a><i class=\"fa fa-calendar-times-o\"> </i>" + fmtStringToDate(getCurDateYMD()) + "</a></li>"; } $(".header-operator .navbar-nav").html(dfHtml); //????????????????? var vTotal = returnData.total; var returnDataRows = returnData.rows; var wapperStyle=""; if(paramjson.tablewidth && paramjson.tableUnit){ wapperStyle ="width:"+ paramjson.tablewidth + paramjson.tableUnit+";margin: auto;"; } /* pageAlignType: "left" pageFont: "STKaiti" pageFontSize: "12" pageHeight: "297" pageRows: "15" showname: "1" showoperator: "1" showtime: "1" sortField: "" sortType: "" table: "lib_cir_reader" tableUnit: "%" tablewidth: "80" title: "???????????" */ if(paramjson.pageFont){ allStyle+="font-family:"+paramjson.pageFont+";"; } if(paramjson.pageFontSize){ allStyle+="font-size:"+paramjson.pageFontSize+"px;"; } var vExportList = "<div style='"+ wapperStyle +"'>"; vExportList += "<div class='jqprint-view-data' style='width:100%;'>"; vExportList += "<div style='text-align: center;padding:10px 0;font-weight:700;font-size:"+ (parseInt(paramjson.pageFontSize)+4) +"px;font-family:"+paramjson.pageFont+";'>"+ vExportname +"</div>"; vExportList += "<div style='"+ allStyle +"'>?????:"+ jsonData.account +" ??????:"+ fmtStringToDate(getCurDateYMD()) +"</div>"; var tableThead = "<thead><tr><th style='"+ allStyle +"'>???</th>"; for(var i = 0; i < vDesignGrid.length ;i++){ tableThead += "<th style='"+ allStyle +"'>" + vDesignGrid[i].name + "</th>"; } tableThead += "</tr></thead>"; var nCountTotal = returnDataRows.length; if(paramjson.pageHeight){ vExportList+=pageTableForPrint(returnDataRows,vDesignGrid,tableThead); }else{ vExportList += "<table class='table-black'>"; if(vTotal > maxRecord){ $(".data-limit-tip").html("<div style='"+ wapperStyle + allStyle +"'>??????????"+vTotal+"]???,??????"+maxRecord+"?¤???,???????????????????</div>"); $(".limit-data").show(); $(".all-data").hide(); } vExportList +=tableThead; vExportList += "<tbody>"; for(var i = 0; i < nCountTotal;i++){ var row = returnDataRows[i]; vExportList += getExportListData(row,vDesignGrid,i,nCountTotal); } vExportList += "</tbody>"; vExportList += "</table></div></div>"; } $(".labelDisplayArea").html(vExportList); if(jsonData.keycode.indexOf("E_READERLOANTOP")>-1){ buildExpMyChart(designData,returnData,vExportname,"name"); }else if(jsonData.keycode.indexOf("E_BIBLOANTOP")>-1){ buildExpMyChart(designData,returnData,vExportname,"title"); } } function pageTableForPrint(returnDataRows,vDesignGrid){ var nCountTotal = returnDataRows.length; var rows = 15; if(paramjson.pageRows){ rows = parseInt(paramjson.pageRows); } var rowHeight = paramjson.pageHeight/(rows+2); var totalpage = (nCountTotal % rows == 0 ? nCountTotal / rows : parseInt(nCountTotal / rows) + 1); var html = ""; var startNum = 0; for(var i = 0; i < vDesignGrid.length ;i++){ if(vDesignGrid[i].total == "1"){ totalFlag = true; } } allStyle = "height:"+ rowHeight +"mm;line-height:"+ rowHeight/2 +"mm;overflow: hidden;text-overflow: ellipsis; overflow: hidden;text-overflow: ellipsis;-webkit-line-clamp: 2;-webkit-box-orient: vertical;"; if(paramjson.pageFont){ allStyle+="font-family:"+paramjson.pageFont+";"; } if(paramjson.pageFontSize){ allStyle+="font-size:"+paramjson.pageFontSize+"px;"; } var tableThead = "<thead><tr><th style='"+ allStyle +"'><div>???</div></th>"; for(var i = 0; i < vDesignGrid.length ;i++){ tableThead += "<th style='"+ allStyle +"'><div>" + vDesignGrid[i].name + "</div></th>"; } tableThead += "</tr></thead>"; for(var i = 0;i<totalpage;i++){ for(var t = 0; t < vDesignGrid.length ;t++){ if(vDesignGrid[t].total == "1"){ vDesignGrid[t].count = 0; } } html += "<table class='table-black'>"; html += tableThead; html += "<tbody>"; for(var j = 0;j<rows;j++){ if(totalFlag && startNum<nCountTotal-1){ var row = returnDataRows[startNum]; if(row){ html += getTbodyForPrint(row,vDesignGrid,startNum); } for(var k = 0; k < vDesignGrid.length ;k++){ if(vDesignGrid[k].total == "1"){ var curPageCount = 0; if(row[vDesignGrid[k].code]!=undefined) curPageCount = row[vDesignGrid[k].code]; else if(row[vDesignGrid[k].field]!==undefined) curPageCount = row[vDesignGrid[k].field]; vDesignGrid[k].count += parseInt(curPageCount); } } }else if(!totalFlag){ var row = returnDataRows[startNum]; if(row){ html += getTbodyForPrint(row,vDesignGrid,startNum); } } startNum++; } html += "</tbody>"; html += "</table>"; html += "<div style='page-break-after:always;'>"; if(totalFlag){ var row = returnDataRows[nCountTotal-1]; html += "<div><div style='"+ allStyle +";float:left;width:30%;font-size:"+ (parseInt(paramjson.pageFontSize)+2) +"px;'>??"+(i+1) + "??,??"+totalpage+"??</div>"; html += "<div style='"+ allStyle +";float:rigth;width:70%;text-align:right;;font-size:"+ (parseInt(paramjson.pageFontSize)+2) +"px;'>"; if(row){ for(var k = 0; k < vDesignGrid.length ;k++){ if(row[vDesignGrid[k].code]!=undefined) html +=vDesignGrid[k].name+"(??????:" + vDesignGrid[k].count + "??<label style='font-weight:700;'>???:" + row[vDesignGrid[k].code]+"</label>) "; else if(row[vDesignGrid[k].field]!==undefined) html +=vDesignGrid[k].name+"(??????:" + vDesignGrid[k].count + "??<label style='font-weight:700;'>???:" + row[vDesignGrid[k].field]+"</label>) "; } } html += "</div>"; } html += "</div></div>"; } return html; } function getTbodyForPrint(row,vDesignGrid,index){ var html =''; html = "<tr>"; html += "<td style='width:40px;"+ allStyle +"'>" + (index+1) + "</td>"; if(row){ for(var i = 0; i < vDesignGrid.length ;i++){ var style =allStyle; if(vDesignGrid[i].width) style +="width:"+ vDesignGrid[i].width +"px;"; if(vDesignGrid[i].total == "1"){ style +="text-align:right;padding-right:6px;"; } html += "<td >"; var showVal = ""; if(row[vDesignGrid[i].code]!=undefined) showVal = row[vDesignGrid[i].code]; else if(row[vDesignGrid[i].field]!==undefined) showVal = row[vDesignGrid[i].field]; if(showVal.toString().indexOf(" ")>-1 || showVal.toString().indexOf("\"")>-1){ html += "<div style='"+style+"' >" + showVal + "</div>"; }else{ html += "<div style='"+style+"' title="+ showVal +">" + showVal + "</div>"; } html += "</td>"; } } html += "</tr>"; return html; } function onPrintPerview(){ $(".jqprint-view-data").jqprint(); } var totalFlag = false; function getExportListData(row,vDesignGrid,index,nCountTotal){ var html =''; if(totalFlag && (nCountTotal-1) == index){ html = "<tr>"; //<tfoot> html += "<td style='width:40px;"+ allStyle +"'>???</td>"; }else{ html = "<tr>"; html += "<td style='width:40px;"+ allStyle +"'>" + (index + 1) + "</td>"; } if(row){ for(var i = 0; i < vDesignGrid.length ;i++){ var style =allStyle; if(vDesignGrid[i].width) style +="width:"+ vDesignGrid[i].width +"px;"; if(row[vDesignGrid[i].code]!=undefined) html += "<td><div style='"+style+"' title="+ formatDataExport(row[vDesignGrid[i].code],vDesignGrid[i].code,"title",row) +">" + formatDataExport(row[vDesignGrid[i].code],vDesignGrid[i].code,"",row) + "</div></td>"; else if(row[vDesignGrid[i].field]!==undefined) html += "<td><div style='"+style+"' title="+ formatDataExport(row[vDesignGrid[i].field],vDesignGrid[i].field,"title",row) +">" + formatDataExport(row[vDesignGrid[i].field],vDesignGrid[i].field,"",row) + "</div></td>"; else html += "<td><div style='"+style+"'></div></td>"; if(vDesignGrid[i].total == "1"){ totalFlag = true; } } } if(totalFlag && (nCountTotal-1) == index){ html += "</tr>"; //</tfoot> }else{ html += "</tr>"; } return html; } function formatDataExport(val,code,title,row){ if(code == "LOGSTAMP"){ if(val.indexOf('-')>-1){ return val; } return onShowDateStamp(val); } if(code == "ordstatus"){ return onShowOrdStatusName(val); } /*if(code == "money" && row.rectype == "????"){ return -val; }*/ if(title && val){ if(val.toString().indexOf(" ")>-1){ return ""; } } return val; } function onShowOrdStatusName(value,row,index){ if(value == '0' ){ return "???"; }else if(value == '1' ){ return "????"; }else if(value == '2' ){ return "???"; }else if(value == '3' ){ return "???"; }else{ return value; } } </script> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de