Commit 3321198b by Java-李昕颖

导出pdf,jsp验证等修改

parent 2ce40995
......@@ -54,7 +54,8 @@ public class ReportToPdfController extends BaseController {
Font textfont = new Font(bfChinese,14,Font.NORMAL);//正常文字
Font urlfont = new Font(bfChinese,12,Font.NORMAL);//路径文字
//document是创建的文档,FileOutputStream是向文档中输入
PdfWriter.getInstance(document, new FileOutputStream(GConstants.FILE_UPLOAD_DIR+"pdf/"+reportEntity.getReportProject()+"_"+reportEntity.getId()+".pdf"));
//PdfWriter.getInstance(document, new FileOutputStream(GConstants.FILE_UPLOAD_DIR+"pdf/"+reportEntity.getReportProject()+"_"+reportEntity.getId()+".pdf"));
PdfWriter.getInstance(document, new FileOutputStream("E:/1.pdf"));
//打开文档
document.open();
Paragraph pt1 = new Paragraph("举报内容",title);
......@@ -256,8 +257,8 @@ public class ReportToPdfController extends BaseController {
if (list != null && list.size() != 0) {
for (ReportAttachmentEntity reportAttachmentEntity : list) {
Chunk chunk = new Chunk(reportAttachmentEntity.getAttachmentPath(),urlfont);
paragraphPath1.add(chunk);
paragraphPath1.add(Chunk.NEWLINE);
paragraphPath2.add(chunk);
paragraphPath2.add(Chunk.NEWLINE);
}
}
PdfPCell supplementAttachment1 = new PdfPCell(paragraphPath2);
......
......@@ -40,7 +40,7 @@
}
},
error:function(){
alert("数据错误!");
alert("请选择需要移交的数据!");
}
});
$("#chooseDiv").hide();
......@@ -187,7 +187,7 @@
$("#userList").html($(data));
},
error:function(){
alert("请选择需要移交的数据!");
alert("数据错误!");
},
complete: function () {
$("#btnSearch").removeAttr("disabled");
......
......@@ -189,9 +189,9 @@
<div class="control-group">
<label class="control-label">处理成果文件:</label>
<div class="controls">
<form:hidden id="nameFile" path="dealAttachment" htmlEscape="false"
<form:hidden id="dealFile" path="dealAttachment" htmlEscape="false"
maxlength="255" class="input-xlarge"/>
<sys:ckfinder input="nameFile" type="files" uploadPath="/file"
<sys:ckfinder input="dealFile" type="files" uploadPath="/file"
selectMultiple="true" maxWidth="100" maxHeight="100"/>
<label id="checkFile" class="error" style="display: none;">必填信息</label>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment