Browse Source

修改预览页面错误处理

sunyj 9 years ago
parent
commit
ddc15d5845
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/main/webapp/resources/js/preview2/app.js

+ 6 - 3
src/main/webapp/resources/js/preview2/app.js

@@ -283,7 +283,9 @@ function loadWholePdf() {
 	// 开始加载
 	console.log(new Date().format() + " ---- hiddenFrame loading...");
 	hiddenFrame.src = wholePdfPath;
-	setTimeout("printPdf()", 1000);
+	if (printType == "PRINT") {
+		setTimeout("printPdf()", 1000);
+	}
 }
 
 /**
@@ -331,8 +333,9 @@ function getGeneratedPdfOrXlsInformation(pdfOrXls) {
  * Get page info from document, resize canvas accordingly, and render page
  */
 function renderPage() {
-	if (!firstRequest) {
-		hideLoading();
+	hideLoading();
+	if (firstRequest && printType == "PRINT") {
+		showLoading();
 	}
 	if (!pdfDoc) {
 		return;