<%@ 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" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>自定义查询</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>
        .main-content{
            height:calc(100% - 43px);
            background-color:#fff;
        }
        .iframeDiv{
            height:calc(100% - 32px);
        }
        .selectDiv{
            width:250px;
        }
        .spanDiv{
            height:32px;
            background-color: #ECF0F5;
        }
        .selectSpan{
            height:100%;
            padding:7px 15px;
        }
    </style>
</head>
<body>
<div class="main">
    <div class="headDiv">
        <div class="headSpanDiv">
            <span class="headspan">
                自定义查询
            </span>
        </div>
    </div>
    <div class="main-content">
        <div class="spanDiv">
            <div class="selectSpan">自定义模板：
                <select id="selectDiv" class="selectDiv">
                    <c:forEach items="${modles}" var="modle">
                        <option value="${modle.id}">${modle.modleName}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="iframeDiv">
            <iframe width="100%" height="100%" src="${path}/template/customSearchIframeqf?selectFlagId=${modles[0].id}" id="iframe" frameborder="0" scrolling="yes"></iframe>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#selectDiv").change(function(){
        var modleId = $(this).val();
        $("#iframe").prop("src","${path}/template/customSearchIframeqf?selectFlagId="+modleId);
    })
    function hideSelectDiv(){
        $(".spanDiv").hide();
        $(".headDiv").hide();
        $(".iframeDiv").css("margin-top","0%");
    }
</script>
</body>
</html>
