更新页面bug

master
bigbananass 4 years ago
parent eb9bc60a0a
commit 80da70d350

@ -260,7 +260,6 @@ public class FontController {
boolean flag = false; boolean flag = false;
boolean nurseflag = false; boolean nurseflag = false;
for(Archive_Detail detail : list){ for(Archive_Detail detail : list){
if(StringUtils.isNotBlank(detail.getSubassort()) && assortName.equals(detail.getSubassort())){
String assortid = detail.getAssortid(); String assortid = detail.getAssortid();
if(StringUtils.isNotBlank(assortid) && assortid.equals(assortId)){ if(StringUtils.isNotBlank(assortid) && assortid.equals(assortId)){
//是病程记录 //是病程记录
@ -307,7 +306,6 @@ public class FontController {
id++; id++;
} }
} }
}
tree1.setName(assortName + "("+count+")"); tree1.setName(assortName + "("+count+")");
tree1.setChecked("true"); tree1.setChecked("true");
treeList.add(tree1); treeList.add(tree1);

@ -34,4 +34,6 @@ public interface Archive_DetailMapper {
List<Archive_Detail> selectByCol2(Archive_Detail record); List<Archive_Detail> selectByCol2(Archive_Detail record);
List<Archive_Detail> selectTypeTreeByPatientIdAndAssortIds(@Param("patientId")String patientId, @Param("assortIds")String assortIds); List<Archive_Detail> selectTypeTreeByPatientIdAndAssortIds(@Param("patientId")String patientId, @Param("assortIds")String assortIds);
List<Archive_Detail> selectByIdStr1(Archive_Detail record);
} }

@ -96,7 +96,7 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
@Override @Override
public void selectByIdStrFont(HttpServletResponse response, HttpSession session, Archive_Detail detail) { public void selectByIdStrFont(HttpServletResponse response, HttpSession session, Archive_Detail detail) {
List<Archive_Detail> arList = archiveDetailMapper.selectByIdStr(detail); List<Archive_Detail> arList = archiveDetailMapper.selectByIdStr1(detail);
List<String> pdfList = mulFile2OneById(response, arList); List<String> pdfList = mulFile2OneById(response, arList);
//存至session //存至session
session.setAttribute("showRecord",pdfList); session.setAttribute("showRecord",pdfList);

@ -5,11 +5,11 @@
#jdbc.mysql.password=root #jdbc.mysql.password=root
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://127.0.0.1:1433;databaseName=emr_record_zj #jdbc.url=jdbc\:sqlserver\://127.0.0.1:1433;databaseName=emr_record_zj
#jdbc.url=jdbc\:sqlserver\://10.6.1.127:1433;databaseName=DB_PrivilegeManagement_GYFY jdbc.url=jdbc\:sqlserver\://10.6.1.127:1433;databaseName=DB_PrivilegeManagement_GYFY
jdbc.username=sa jdbc.username=sa
#jdbc.password=123456 jdbc.password=123456
jdbc.password=xjgs+docus911 #jdbc.password=xjgs+docus911
#hibernate config #hibernate config
hibernate.dialect=org.hibernate.dialect.SQLServerDialect hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.show_sql=true hibernate.show_sql=true
@ -20,10 +20,10 @@ hibernate.current_session_context_class=thread
hibernate.jdbc.batch_size=50 hibernate.jdbc.batch_size=50
hibernate.enable_lazy_load_no_trans=true hibernate.enable_lazy_load_no_trans=true
#图片地址 #图片地址
pictureUrl=C:\\Users\\HIPAA\\Desktop\\test\\uploadImage pictureUrl=D:\\JSsoftworking\\zhangjiang\\pdf
#pictureUrl=src\\main\\webapp #pictureUrl=src\\main\\webapp
#本地自动生成PDF地址 #本地自动生成PDF地址
autoPdfUrl=C:/Users/HIPAA/Desktop/test/autoPdf autoPdfUrl=D:\\JSsoftworking\\zhangjiang\\autoPdf
#本地上传PDF地址 #本地上传PDF地址
pdfUrl=C:\\Users\\HIPAA\\Desktop\\test\\localPdf pdfUrl=C:\\Users\\HIPAA\\Desktop\\test\\localPdf
#PDF文件不存在或损坏列表地址 #PDF文件不存在或损坏列表地址
@ -47,7 +47,7 @@ powerGetUserList=http://127.0.0.1:8081/power/font/getUserList?userName=admin
allAddortIds = 00000000 allAddortIds = 00000000
#pdf\u6C34\u5370 #pdf\u6C34\u5370
pdfWater = \u4F5B\u5C71\u5E02\u9AD8\u660E\u4EBA\u6C11\u533B\u9662 pdfWater = \u5e7f\u4e1c\u533b\u79d1\u5927\u5b66\u9644\u5c5e\u533b\u9662
#菜单接口http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag #菜单接口http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag
#powerUrl=http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag #powerUrl=http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag

@ -20,6 +20,7 @@
/test=anon /test=anon
/login=anon /login=anon
/static/**=anon /static/**=anon
/font/**=anon
/jspf/**=anon /jspf/**=anon
/img/**=anon /img/**=anon
/styles/**=anon /styles/**=anon

@ -115,6 +115,18 @@
</if> </if>
ORDER BY page_number ORDER BY page_number
</select> </select>
<select id="selectByIdStr1" parameterType="com.emr.entity.Archive_Detail" resultMap="BaseResultMap">
select
PDF_PATH,archive_detail.AssortID,archive_detail.title
from archive_detail
left join zd_assort
on zd_assort.assort_id = archive_detail.AssortID
where 1=1 and flag=0
<if test="title != null and title!=''">
and id in (${title})
</if>
order by zd_assort.assort_sort,archive_detail.UpLoadDateTime
</select>
<select id="selectByColm" parameterType="com.emr.entity.Archive_Detail" resultMap="BaseResultMap"> <select id="selectByColm" parameterType="com.emr.entity.Archive_Detail" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>

@ -65,16 +65,16 @@ var menu = {
//加载树 //加载树
$().ready(function(data){ $().ready(function(data){
menu.loadMenuTree(); menu.loadMenuTree();
//判断是否是护理按需采集,是显示刷新按钮 // //判断是否是护理按需采集,是显示刷新按钮
var typeFlag = parent.$("#typeFlag").val(); // var typeFlag = parent.$("#typeFlag").val();
if(typeFlag == 1){ // if(typeFlag == 1){
$("#freshBtnDiv").show(); // $("#freshBtnDiv").show();
}else if(typeFlag == 2){ // }else if(typeFlag == 2){
var delPower = parent.$("#delPower").val(); // var delPower = parent.$("#delPower").val();
if(delPower == 1){ // if(delPower == 1){
$("#delBtnDiv").show(); // $("#delBtnDiv").show();
} // }
} // }
}); });
//获取获取树选中节点赋值隐藏域并加载pdf //获取获取树选中节点赋值隐藏域并加载pdf
@ -129,7 +129,7 @@ function onloadPdf(){
toastr.error(data.msg); toastr.error(data.msg);
} }
} }
}) });
} }
/*$("#iframe1").attr("src",path+"/static/pdfjs/web/viewer.html?file="+path+"/font/getPdfToPdf/"+patientId+"/"+detailIds);*/ /*$("#iframe1").attr("src",path+"/static/pdfjs/web/viewer.html?file="+path+"/font/getPdfToPdf/"+patientId+"/"+detailIds);*/

@ -30,32 +30,62 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<script src="compatibility.js"></script> <script src="compatibility.js"></script>
<!-- This snippet is used in production (included from viewer.html) --> <!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"/> <link rel="resource" type="application/l10n" href="locale/locale.properties"/>
<link rel="shortcut icon" href="../../favicon.ico">
<script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
<script type="text/javascript"
src="../../bootstrap-3.3.7/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="l10n.js"></script> <script src="l10n.js"></script>
<script src="../build/pdf.js"></script> <script src="../build/pdf.js"></script>
<script src="debugger.js"></script> <script src="debugger.js"></script>
<script src="viewer.js"></script> <script src="viewer.js?time=2020-10-16_1"></script>
<style>
.loading {
width: 160px;
height: 56px;
position: absolute;
top: 50%;
left: 50%;
line-height: 56px;
color: #fff;
padding-left: 60px;
font-size: 15px;
background: #000;
opacity: 0.7;
z-index: 9999;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
}
</style>
</head> </head>
<body tabindex="1" class="loadingInProgress"> <body tabindex="1" class="loadingInProgress" onkeydown="disabledPrint()">
<div id="outerContainer" class="sidebarOpen"> <div id="myModal" class="modal fade" data-keyboard="false"
data-backdrop="static" data-role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div id="loading" class="loading">加载中。。。</div>
</div>
<div id="outerContainer">
<div id="sidebarContainer"> <div id="sidebarContainer">
<div id="toolbarSidebar"> <div id="toolbarSidebar">
<div class="splitToolbarButton toggled"> <div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs"> <button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="2"
data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Thumbnails</span> <span data-l10n-id="thumbs_label">Thumbnails</span>
</button> </button>
<button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="3" data-l10n-id="outline"> <button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="3"
data-l10n-id="outline">
<span data-l10n-id="outline_label">Document Outline</span> <span data-l10n-id="outline_label">Document Outline</span>
</button> </button>
<button id="viewAttachments" class="toolbarButton group" title="Show Attachments" tabindex="4" data-l10n-id="attachments"> <button id="viewAttachments" class="toolbarButton group" title="Show Attachments" tabindex="4"
data-l10n-id="attachments">
<span data-l10n-id="attachments_label">Attachments</span> <span data-l10n-id="attachments_label">Attachments</span>
</button> </button>
</div> </div>
@ -75,7 +105,8 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<label for="findInput" class="toolbarLabel" data-l10n-id="find_label">Find:</label> <label for="findInput" class="toolbarLabel" data-l10n-id="find_label">Find:</label>
<input id="findInput" class="toolbarField" tabindex="91"> <input id="findInput" class="toolbarField" tabindex="91">
<div class="splitToolbarButton"> <div class="splitToolbarButton">
<button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="92" data-l10n-id="find_previous"> <button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="92"
data-l10n-id="find_previous">
<span data-l10n-id="find_previous_label">Previous</span> <span data-l10n-id="find_previous_label">Previous</span>
</button> </button>
<div class="splitToolbarButtonSeparator"></div> <div class="splitToolbarButtonSeparator"></div>
@ -84,63 +115,73 @@ http://sourceforge.net/adobe/cmap/wiki/License/
</button> </button>
</div> </div>
<input type="checkbox" id="findHighlightAll" class="toolbarField"> <input type="checkbox" id="findHighlightAll" class="toolbarField">
<label for="findHighlightAll" class="toolbarLabel" tabindex="94" data-l10n-id="find_highlight">Highlight all</label> <label for="findHighlightAll" class="toolbarLabel" tabindex="94" data-l10n-id="find_highlight">Highlight
all</label>
<input type="checkbox" id="findMatchCase" class="toolbarField"> <input type="checkbox" id="findMatchCase" class="toolbarField">
<label for="findMatchCase" class="toolbarLabel" tabindex="95" data-l10n-id="find_match_case_label">Match case</label> <label for="findMatchCase" class="toolbarLabel" tabindex="95" data-l10n-id="find_match_case_label">Match
case</label>
<span id="findMsg" class="toolbarLabel"></span> <span id="findMsg" class="toolbarLabel"></span>
</div> <!-- findbar --> </div> <!-- findbar -->
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight"> <div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
<div id="secondaryToolbarButtonContainer"> <div id="secondaryToolbarButtonContainer">
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode"> <button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView"
title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span> <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button> </button>
<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView"
<!--<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file"> title="Open File" tabindex="52" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span> <span data-l10n-id="open_file_label">Open</span>
</button>--> </button>
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print"
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print"> tabindex="53" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span> <span data-l10n-id="print_label">Print</span>
</button> </button>
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download"> <button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView"
title="Download" tabindex="54" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span> <span data-l10n-id="download_label">Download</span>
</button> </button>
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark"> <a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView"
title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span> <span data-l10n-id="bookmark_label">Current View</span>
</a> </a>
<div class="horizontalToolbarSeparator visibleLargeView"></div> <div class="horizontalToolbarSeparator visibleLargeView"></div>
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page"> <button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56"
data-l10n-id="first_page">
<span data-l10n-id="first_page_label">Go to First Page</span> <span data-l10n-id="first_page_label">Go to First Page</span>
</button> </button>
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page"> <button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57"
data-l10n-id="last_page">
<span data-l10n-id="last_page_label">Go to Last Page</span> <span data-l10n-id="last_page_label">Go to Last Page</span>
</button> </button>
<div class="horizontalToolbarSeparator"></div> <div class="horizontalToolbarSeparator"></div>
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw"> <button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58"
data-l10n-id="page_rotate_cw">
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span> <span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
</button> </button>
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw"> <button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise"
tabindex="59" data-l10n-id="page_rotate_ccw">
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span> <span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
</button> </button>
<div class="horizontalToolbarSeparator"></div> <div class="horizontalToolbarSeparator"></div>
<button id="toggleHandTool" class="secondaryToolbarButton handTool" title="Enable hand tool" tabindex="60" data-l10n-id="hand_tool_enable"> <button id="toggleHandTool" class="secondaryToolbarButton handTool" title="Enable hand tool"
tabindex="60" data-l10n-id="hand_tool_enable">
<span data-l10n-id="hand_tool_enable_label">Enable hand tool</span> <span data-l10n-id="hand_tool_enable_label">Enable hand tool</span>
</button> </button>
<div class="horizontalToolbarSeparator"></div> <div class="horizontalToolbarSeparator"></div>
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="61" data-l10n-id="document_properties"> <!--<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="61" data-l10n-id="document_properties">
<span data-l10n-id="document_properties_label">Document Properties…</span> <span data-l10n-id="document_properties_label">Document Properties…</span>
</button> </button>-->
</div> </div>
</div> <!-- secondaryToolbar --> </div> <!-- secondaryToolbar -->
@ -148,28 +189,34 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<div id="toolbarContainer"> <div id="toolbarContainer">
<div id="toolbarViewer"> <div id="toolbarViewer">
<div id="toolbarViewerLeft"> <div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar"> <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11"
data-l10n-id="toggle_sidebar">
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span> <span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button> </button>
<div class="toolbarButtonSpacer"></div> <div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document" tabindex="12" data-l10n-id="findbar"> <button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document"
tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span> <span data-l10n-id="findbar_label">Find</span>
</button> </button>
<div class="splitToolbarButton"> <div class="splitToolbarButton">
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous"> <button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13"
data-l10n-id="previous">
<span data-l10n-id="previous_label">Previous</span> <span data-l10n-id="previous_label">Previous</span>
</button> </button>
<div class="splitToolbarButtonSeparator"></div> <div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next"> <button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14"
data-l10n-id="next">
<span data-l10n-id="next_label">Next</span> <span data-l10n-id="next_label">Next</span>
</button> </button>
</div> </div>
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label> <label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label>
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="15"> <input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1"
tabindex="15">
<span id="numPages" class="toolbarLabel"></span> <span id="numPages" class="toolbarLabel"></span>
</div> </div>
<div id="toolbarViewerRight"> <div id="toolbarViewerRight">
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode"> <button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView"
title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span> <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button> </button>
@ -177,44 +224,52 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<span data-l10n-id="open_file_label">Open</span> <span data-l10n-id="open_file_label">Open</span>
</button>--> </button>-->
<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print"> <button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33"
data-l10n-id="print" style="display: none">
<span data-l10n-id="print_label">Print</span> <span data-l10n-id="print_label">Print</span>
</button> </button>
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download"> <!--<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span> <span data-l10n-id="download_label">Download</span>
</button> </button>-->
<a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark"> <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView"
title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span> <span data-l10n-id="bookmark_label">Current View</span>
</a> </a>
<div class="verticalToolbarSeparator hiddenSmallView"></div> <div class="verticalToolbarSeparator hiddenSmallView"></div>
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools"> <button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36"
data-l10n-id="tools">
<span data-l10n-id="tools_label">Tools</span> <span data-l10n-id="tools_label">Tools</span>
</button> </button>
</div> </div>
<div class="outerCenter"> <div class="outerCenter">
<div class="innerCenter" id="toolbarViewerMiddle"> <div class="innerCenter" id="toolbarViewerMiddle">
<div class="splitToolbarButton"> <div class="splitToolbarButton">
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out"> <button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21"
data-l10n-id="zoom_out">
<span data-l10n-id="zoom_out_label">Zoom Out</span> <span data-l10n-id="zoom_out_label">Zoom Out</span>
</button> </button>
<div class="splitToolbarButtonSeparator"></div> <div class="splitToolbarButtonSeparator"></div>
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in"> <button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22"
data-l10n-id="zoom_in">
<span data-l10n-id="zoom_in_label">Zoom In</span> <span data-l10n-id="zoom_in_label">Zoom In</span>
</button> </button>
</div> </div>
<span id="scaleSelectContainer" class="dropdownToolbarButton"> <span id="scaleSelectContainer" class="dropdownToolbarButton">
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom"> <select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option> <option id="pageAutoOption" title="" value="auto"
data-l10n-id="page_scale_auto">Automatic Zoom</option>
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option> <option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option> <option id="pageFitOption" title="" value="page-fit"
data-l10n-id="page_scale_fit">Fit Page</option>
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Full Width</option> <option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Full Width</option>
<option id="customScaleOption" title="" value="custom"></option> <option id="customScaleOption" title="" value="custom"></option>
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option> <option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option> <option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option> <option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'
selected="selected">100%</option>
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option> <option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option> <option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option> <option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
@ -279,53 +334,68 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<input type="password" id="password" class="toolbarField"/> <input type="password" id="password" class="toolbarField"/>
</div> </div>
<div class="buttonRow"> <div class="buttonRow">
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button> <button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span>
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button> </button>
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span>
</button>
</div> </div>
</div> </div>
</div> </div>
<div id="documentPropertiesOverlay" class="container hidden"> <div id="documentPropertiesOverlay" class="container hidden">
<div class="dialog"> <div class="dialog">
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p> <span data-l10n-id="document_properties_file_name">File name:</span>
<p id="fileNameField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p> <span data-l10n-id="document_properties_file_size">File size:</span>
<p id="fileSizeField">-</p>
</div> </div>
<div class="separator"></div> <div class="separator"></div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p> <span data-l10n-id="document_properties_title">Title:</span>
<p id="titleField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p> <span data-l10n-id="document_properties_author">Author:</span>
<p id="authorField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p> <span data-l10n-id="document_properties_subject">Subject:</span>
<p id="subjectField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p> <span data-l10n-id="document_properties_keywords">Keywords:</span>
<p id="keywordsField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p> <span data-l10n-id="document_properties_creation_date">Creation Date:</span>
<p id="creationDateField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p> <span data-l10n-id="document_properties_modification_date">Modification Date:</span>
<p id="modificationDateField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p> <span data-l10n-id="document_properties_creator">Creator:</span>
<p id="creatorField">-</p>
</div> </div>
<div class="separator"></div> <div class="separator"></div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p> <span data-l10n-id="document_properties_producer">PDF Producer:</span>
<p id="producerField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p> <span data-l10n-id="document_properties_version">PDF Version:</span>
<p id="versionField">-</p>
</div> </div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p> <span data-l10n-id="document_properties_page_count">Page Count:</span>
<p id="pageCountField">-</p>
</div> </div>
<div class="buttonRow"> <div class="buttonRow">
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button> <button id="documentPropertiesClose" class="overlayButton"><span
data-l10n-id="document_properties_close">Close</span></button>
</div> </div>
</div> </div>
</div> </div>
@ -355,9 +425,11 @@ http://sourceforge.net/adobe/cmap/wiki/License/
text-align: center; text-align: center;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
} }
#mozPrintCallback-shim[hidden] { #mozPrintCallback-shim[hidden] {
display: none; display: none;
} }
@media print { @media print {
#mozPrintCallback-shim { #mozPrintCallback-shim {
display: none; display: none;
@ -385,23 +457,27 @@ http://sourceforge.net/adobe/cmap/wiki/License/
font-size: 16px; font-size: 16px;
line-height: 20px; line-height: 20px;
} }
#mozPrintCallback-shim .progress-row { #mozPrintCallback-shim .progress-row {
clear: both; clear: both;
padding: 1em 0; padding: 1em 0;
} }
#mozPrintCallback-shim progress { #mozPrintCallback-shim progress {
width: 100%; width: 100%;
} }
#mozPrintCallback-shim .relative-progress { #mozPrintCallback-shim .relative-progress {
clear: both; clear: both;
float: right; float: right;
} }
#mozPrintCallback-shim .progress-actions { #mozPrintCallback-shim .progress-actions {
clear: both; clear: both;
} }
</style> </style>
<div class="mozPrintCallback-dialog-box"> <div class="mozPrintCallback-dialog-box">
<!-- TODO: Localise the following strings --> &lt;!&ndash; TODO: Localise the following strings &ndash;&gt;
Preparing document for printing... Preparing document for printing...
<div class="progress-row"> <div class="progress-row">
<progress value="0" max="100"></progress> <progress value="0" max="100"></progress>
@ -412,9 +488,100 @@ http://sourceforge.net/adobe/cmap/wiki/License/
</div> </div>
</div> </div>
</div> </div>
</body>
<script> <script>
$("#loading").css("background", "url(../../img/load.gif) no-repeat 10px 50%");
var interval = setInterval('loadPdf()', 1000);
function loadPdf() {
if (PDFViewerApplication.pdfDocument == null) {
$('#myModal').modal('show');
} else {
clearInterval(interval);
$('#myModal').remove();
}
}
$(function () {
//获取父页面打印权限显示打印按钮
var print = parent.$("#print").val();
if (print == 1) {
$("#print").show();
}
})
//屏蔽鼠标右键
document.oncontextmenu = function (e) {
var e = e || window.event;
e.returnValue = false;
return false;
}
//禁止快捷键打印
function disabledPrint() {
if (event.keyCode == 80 && event.ctrlKey) {
event.keyCode = 0;
event.returnValue = false;
}
if (event.ctrlKey && event.keyCode == 83) {
event.preventDefault();
event.returnValue = false;
return false;
}
}
var pageNum = 1;
var scrollFunc = function (e) {
//当前页码
var currentPageNum = document.getElementById('pageNumber').value;
if (pageNum != currentPageNum) {
pageNum = currentPageNum;
//获取分类key
var key = getQueryVariable("key");
if(key) {
//获取用户id
var userId = window.opener.$("#userId").val();
//设置页码缓存
var localStorageKey = 'page_' + userId + '_' + key;
//获取页面上
var list = window.opener.table2List;
var page = 0;
for (var i = 0; i < list.length; i++) {
//跳过根节点
if (list[i].id != 0) {
//获取detailsIds集合
var ids = list[i].ids;
//获取页码集合
var pageCounts = list[i].pageCounts;
//遍历ids
var idArr = ids.split(",");
var pageCountArr = pageCounts.split(",");
for (var j = 0; j < idArr.length; j++) {
//计算页码
var pageCount = Number(pageCountArr[j]);
for (var l = 0; l < pageCount; l++) {
//累加页码
page += 1;
if (page == Number(pageNum)) {
//设置缓存
var localStorageValue = idArr[j] + "_" + (l + 1) + "_" + new Date().getTime();
localStorage.setItem(localStorageKey, localStorageValue);
breakFlag = true;
//退出循环
return;
}
}
}
}
}
}
}
}
/*注册事件*/
if (document.addEventListener) {
document.addEventListener('DOMMouseScroll', scrollFunc, false);
}
window.onmousewheel = document.onmousewheel = scrollFunc;
</script> </script>
</body>
</html> </html>

@ -46,7 +46,7 @@ var mozL10n = document.mozL10n || document.webL10n;
var CSS_UNITS = 96.0 / 72.0; var CSS_UNITS = 96.0 / 72.0;
var DEFAULT_SCALE = 'auto'; var DEFAULT_SCALE = '1';
var UNKNOWN_SCALE = 0; var UNKNOWN_SCALE = 0;
var MAX_AUTO_SCALE = 1.25; var MAX_AUTO_SCALE = 1.25;
var SCROLLBAR_PADDING = 40; var SCROLLBAR_PADDING = 40;
@ -927,7 +927,6 @@ var PDFFindBar = (function PDFFindBarClosure() {
throw new Error('PDFFindBar cannot be used without a ' + throw new Error('PDFFindBar cannot be used without a ' +
'PDFFindController instance.'); 'PDFFindController instance.');
} }
// Add event listeners to the DOM elements. // Add event listeners to the DOM elements.
var self = this; var self = this;
this.toggleButton.addEventListener('click', function() { this.toggleButton.addEventListener('click', function() {
@ -5685,7 +5684,7 @@ var PDFViewerApplication = {
initialized: false, initialized: false,
fellback: false, fellback: false,
pdfDocument: null, pdfDocument: null,
sidebarOpen: true, sidebarOpen: false,
printing: false, printing: false,
/** @type {PDFViewer} */ /** @type {PDFViewer} */
pdfViewer: null, pdfViewer: null,
@ -6004,7 +6003,7 @@ var PDFViewerApplication = {
} }
this.close(); this.close();
var parameters = {password: password}; var parameters = {password: password,rangeChunkSize:65536*160};
if (typeof file === 'string') { // URL if (typeof file === 'string') { // URL
this.setTitleUsingUrl(file); this.setTitleUsingUrl(file);
parameters.url = file; parameters.url = file;
@ -6396,7 +6395,6 @@ var PDFViewerApplication = {
storedHash = 'page=1&zoom=' + self.preferenceDefaultZoomValue; storedHash = 'page=1&zoom=' + self.preferenceDefaultZoomValue;
} }
self.setInitialView(storedHash, scale); self.setInitialView(storedHash, scale);
// Make all navigation keys work on document load, // Make all navigation keys work on document load,
// unless the viewer is embedded in a web page. // unless the viewer is embedded in a web page.
if (!self.isViewerEmbedded) { if (!self.isViewerEmbedded) {
@ -6515,9 +6513,13 @@ var PDFViewerApplication = {
// When opening a new file (when one is already loaded in the viewer): // When opening a new file (when one is already loaded in the viewer):
// Reset 'currentPageNumber', since otherwise the page's scale will be wrong // Reset 'currentPageNumber', since otherwise the page's scale will be wrong
// if 'currentPageNumber' is larger than the number of pages in the file. // if 'currentPageNumber' is larger than the number of pages in the file.
//获取url中的page,跳转页数
var page = getQueryVariable("page");
if(!page){
page = 1;
}
document.getElementById('pageNumber').value = document.getElementById('pageNumber').value =
this.pdfViewer.currentPageNumber = 1; this.pdfViewer.currentPageNumber = page;
if (PDFHistory.initialDestination) { if (PDFHistory.initialDestination) {
this.navigateTo(PDFHistory.initialDestination); this.navigateTo(PDFHistory.initialDestination);
PDFHistory.initialDestination = null; PDFHistory.initialDestination = null;
@ -6857,10 +6859,6 @@ function webViewerInitialized() {
var queryString = document.location.search.substring(1); var queryString = document.location.search.substring(1);
var params = PDFViewerApplication.parseQueryString(queryString); var params = PDFViewerApplication.parseQueryString(queryString);
var file = 'file' in params ? params.file : DEFAULT_URL; var file = 'file' in params ? params.file : DEFAULT_URL;
var filePath='fileUrl' in params?params.fileUrl:'';
if(filePath!=''){
file=file+"&fileUrl="+filePath;
}
var fileInput = document.createElement('input'); var fileInput = document.createElement('input');
fileInput.id = 'fileInput'; fileInput.id = 'fileInput';
@ -6947,7 +6945,7 @@ function webViewerInitialized() {
} }
if (!PDFViewerApplication.supportsFullscreen) { if (!PDFViewerApplication.supportsFullscreen) {
document.getElementById('presentationMode').classList.add('hidden'); //document.getElementById('presentationMode').classList.add('hidden');
document.getElementById('secondaryPresentationMode'). document.getElementById('secondaryPresentationMode').
classList.add('hidden'); classList.add('hidden');
} }
@ -7046,11 +7044,11 @@ function webViewerInitialized() {
/**document.getElementById('openFile').addEventListener('click', /**document.getElementById('openFile').addEventListener('click',
SecondaryToolbar.openFileClick.bind(SecondaryToolbar));*/ SecondaryToolbar.openFileClick.bind(SecondaryToolbar));*/
document.getElementById('print').addEventListener('click', /*document.getElementById('print').addEventListener('click',
SecondaryToolbar.printClick.bind(SecondaryToolbar)); SecondaryToolbar.printClick.bind(SecondaryToolbar));
document.getElementById('download').addEventListener('click', document.getElementById('download').addEventListener('click',
SecondaryToolbar.downloadClick.bind(SecondaryToolbar)); SecondaryToolbar.downloadClick.bind(SecondaryToolbar));*/
if (file && file.lastIndexOf('file:', 0) === 0) { if (file && file.lastIndexOf('file:', 0) === 0) {
@ -7148,7 +7146,7 @@ window.addEventListener('updateviewarea', function (evt) {
}); });
}); });
var href = PDFViewerApplication.getAnchorUrl(location.pdfOpenParams); var href = PDFViewerApplication.getAnchorUrl(location.pdfOpenParams);
document.getElementById('viewBookmark').href = href; //document.getElementById('viewBookmark').href = href;
document.getElementById('secondaryViewBookmark').href = href; document.getElementById('secondaryViewBookmark').href = href;
// Update the current bookmark in the browsing history. // Update the current bookmark in the browsing history.
@ -7417,14 +7415,14 @@ window.addEventListener('keydown', function keydown(evt) {
} }
// CTRL or META without shift // CTRL or META without shift
if (cmd === 1 || cmd === 8) { /* if (cmd === 1 || cmd === 8) {
switch (evt.keyCode) { switch (evt.keyCode) {
case 83: // s case 83: // s
PDFViewerApplication.download(); PDFViewerApplication.download();
handled = true; handled = true;
break; break;
} }
} }*/
// CTRL+ALT or Option+Command // CTRL+ALT or Option+Command
if (cmd === 3 || cmd === 10) { if (cmd === 3 || cmd === 10) {
@ -7609,5 +7607,14 @@ window.addEventListener('afterprint', function afterPrint(evt) {
window.requestAnimationFrame(resolve); window.requestAnimationFrame(resolve);
}); });
})(); })();
function getQueryVariable(variable){
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}

Loading…
Cancel
Save