<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>预览pdfIframe页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv=X-UA-Compatible IE=EmulateIE7>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
    <script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
    <![endif]-->
    <script>
        var path = "${path}";
    </script>
    <style type="text/css">
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            background-color: #F2F2F2;
        }

        .content-left {
            height: 100%;
            width: 23%;
            float: left;
            background-color: #FFFFFF;
        }

        .content-right {
            height: 100%;
            width: 76%;
            float: right;
            padding-left: 1%;
            background-color: #FFFFFF;
        }
    </style>
</head>
<body style="scroll:auto" onkeydown="disabledPrint()">
<div id="myModal" class="modal fade" data-keyboard="false"
     data-backdrop="static" data-role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div id="loading1" class="loading">加载中。。。</div>
</div>
<input type="hidden" id="patientId" value="${patientId}">
<!--初始化及树复选框勾选的文件名称集合-->
<input type="hidden" id="assortIds">
<!--初始化及树复选框勾选的文件来源集合-->
<input type="hidden" id="sources">
<!--树节点点击选中的文件名称-->
<input type="hidden" id="assortIdByClick">
<!--树节点点击选中的文件来源-->
<input type="hidden" id="sourceByClick">
<input type="hidden" id="flag" value="${flag}">
<!--是否有打印权限-->
<input type="hidden" id="print" value="${printFlag}">
<!--文件路径-->
<input type="hidden" id="filePath">
<!--定义iframe1加载完成标识-->
<input type="hidden" id="iframeLoad">
<!--定义打印预览的图片加载完成标识-->
<input type="hidden" id="printPicLoaded">
<!--定义打印预览的图片加载进度-->
<input type="hidden" id="loading">

<div class="content-left">
    <div class="form-group" style="margin-top: 2%">
        <div class="col-sm-5" style="padding-right: 0">
            <c:if test="${fn:length(emrTypes) != 0}">
                <select class="form-control input input-sm" id="typeId">
                    <c:forEach items="${emrTypes}" var="type">
                        <option value="${type.id}">${type.typeName}</option>
                    </c:forEach>
                </select>
            </c:if>
        </div>
        <div class="col-sm-2">
            <button type="button" class="btn btn-sm btn-primary" onclick="onloadPdfMethod()">加载PDF</button>
        </div>
        <c:if test="${CURRENT_USER.userEmail == '1' || isDownload == '1'}">
            <div class="col-sm-2">
                <button type="button" class="btn btn-sm btn-primary" onclick="onloadJpgForPdf()">下载PDF</button>
            </div>
        </c:if>
        <c:if test="${moveFlag == '1'}">
            <div class="col-sm-2">
                <button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal1">移动PDF
                </button>
            </div>
        </c:if>
        <div class="zTreeDemo">
            <ul id="ztree" class="ztree"></ul>
        </div>
    </div>
</div>
<div class="content-right">
    <shiro:hasPermission name="/commom/delScanAssort">
        <button type="button" class="btn btn-sm btn-danger" style="float:left;" onclick="delPic()">删除</button>
    </shiro:hasPermission>
    <shiro:hasPermission name="/commom/updateScanAssort">
        <div class="form-group" style="margin-left: 6%">
            <label class="control-label" style="float:left;margin-top:1%;">重新归页：</label>
            <select class="form-control" style="float:left;width:30%;" id="newAssortId">
                <option value="">选择重新归页</option>
                <c:forEach items="${zdAssorts}" var="assort">
                    <option value="${assort.assortId}">${assort.assortName}</option>
                </c:forEach>
            </select>
            <button type="button" class="btn btn-sm btn-default" style="float:left;margin-left:2%;" onclick="sure()">
                确定
            </button>
        </div>
    </shiro:hasPermission>
    <iframe width="100%" height="100%" src="" id="iframe1" name="iframe1" frameborder="0" scrolling="yes" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" oallowfullscreen="true" msallowfullscreen="true"></iframe>
</div>

<!-- 模态框1（Modal）移动PDFtable信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg" style="width:1600px">
        <div class="modal-content modal1Content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    移动PDF
                </h4>
            </div>
            <div class="modal-body code-body">
                <div class="row">
                    <div></div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            <div class="col-sm-4 labelDiv">
                                <label class="control-label">病案号：</label>
                            </div>
                            <div class="col-sm-8 inputDiv">
                                <input type="text" class="form-control input-sm inputValue" id="inpatientNo"
                                       maxlength="16">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            <div class="col-sm-4 labelDiv">
                                <label class="control-label">住院次数：</label>
                            </div>
                            <div class="col-sm-8 inputDiv">
                                <input type="text" class="form-control input-sm inputValue" id="admissTimes"
                                       maxlength="16">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            <div class="col-sm-4 labelDiv">
                                <label class="control-label">姓名：</label>
                            </div>
                            <div class="col-sm-8 inputDiv">
                                <input type="text" class="form-control input-sm inputValue" id="name"
                                       maxlength="16">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="btns">
                    <div class="btn" style="margin-left: 90%; margin-top: 1%">
                        <button type="button" class="btn btn-sm btn-primary" onclick="search()">开始搜索</button>
                    </div>
                </div>
                <!--数据表格-->
                <div id="tableDiv" class="table-responsive tableDiv table-hover" style="overflow:scroll;">
                    <table id="mytab" class="table text-nowrap table-bordered" data-toggle="table" data-height="200">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 模态框1（Moda2）移动PDF分段信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg" style="width:400px">
        <div class="modal-content modal1Content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    选择分段
                </h4>
            </div>
            <div class="modal-body code-body">
                <input type="hidden" id="patientIdInfo">
                <div class="row" style="margin-top: 2%">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">病案号：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control input" id="inpatientNoInfo" maxlength="16" readonly>
                        </div>
                        <div class="col-sm-1"></div>
                    </div>
                </div>
                <div class="row" style="margin-top: 2%">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">住院次数：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control input" id="admissTimesInfo" maxlength="16" readonly>
                        </div>
                        <div class="col-sm-1"></div>
                    </div>
                </div>
                <div class="row" style="margin-top: 2%">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">姓名：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control input" id="nameInfo" maxlength="16" readonly>
                        </div>
                        <div class="col-sm-1"></div>
                    </div>
                </div>
                <div class="row" style="margin-top: 2%">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">重新归页：</label>
                        <div class="col-sm-7">
                            <select class="form-control" style="float:left;width:100%;" id="moveAssortId">
                                <option value="">选择重新归页</option>
                                <c:forEach items="${zdAssorts}" var="assort">
                                    <option value="${assort.assortId}">${assort.assortName}</option>
                                </c:forEach>
                            </select>
                        </div>
                        <div class="col-sm-1"></div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" class="btn btn-primary" onclick="movePdf()">
                        提交
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript"
        src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodFont.js?t=2021-08-24"></script>
<script type="text/javascript"
        src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodCommom.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>
</body>
</html>
