wangchun 4 years ago
parent
commit
f3b3459be6
  1. 2
      ureport2-console/src/main/java/com/bstek/ureport/console/BaseServletAction.java
  2. 14
      ureport2-console/src/main/resources/ureport-html/html-preview.html
  3. 21
      ureport2-js/src/print.html
  4. 2
      ureport2-js/webpack.config.js

2
ureport2-console/src/main/java/com/bstek/ureport/console/BaseServletAction.java

@ -137,7 +137,6 @@ public abstract class BaseServletAction implements ServletAction {
* @return
*/
private String getFileName(String reportTitle){
System.out.println("查询数据库开始");
Connection connection = Utils.getBuildinConnection(Utils.getApplicationContext().getEnvironment().getProperty("ureport.datasource.name"));
String fileName = "";
PreparedStatement preparedStatement = null;
@ -150,7 +149,6 @@ public abstract class BaseServletAction implements ServletAction {
while (resultSet.next()){
fileName = resultSet.getString("file_name");
}
System.out.println("查询数据库结束");
} catch (SQLException throwables) {
throwables.printStackTrace();
}finally {

14
ureport2-console/src/main/resources/ureport-html/html-preview.html

@ -11,6 +11,20 @@
<title>${title}</title>
<style type="text/css" id="_ureport_table_style">
${style}
#_ureport_table tr{
height: 34px !important;
}
#_ureport_table ._A1{
line-height: 2 !important;
}
#_ureport_table ._ureport_tr td{
background-color: #f4f4f4;
height: 40px !important;
}
#_ureport_table td{
word-break: break-all;
border-color: #dddddd !important;
}
</style>
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/bootstrap.min.js"></script>

21
ureport2-js/src/print.html

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<script type="text/javascript">
(function() {
loadPrint();
}());
function loadPrint() {
window.print();
console.log("dddddd");
}
</script>
<body>
</body>
</html>

2
ureport2-js/webpack.config.js

@ -51,4 +51,4 @@ module.exports={
}
]
}
};
};

Loading…
Cancel
Save