<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String basePath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="../../../common/admin/head.jsp"></jsp:include>
    <script  src="<%=basePath%>/resource/plugins/echarts/echarts.min.js"></script>
</head>
<body>
<jsp:include page="../../../common/admin/body_pre.jsp"></jsp:include>
<div class="row hidden-print">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h2>资源排名统计</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:void(0);">运营管理</a>
                    </li>
                    <li class="active">
                        <strong>资源排名统计</strong>
                    </li>
                </ol>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../../../common/admin/search_pre.jsp"></jsp:include>
<input type="hidden" name="formSerialize"/>
<input type="hidden" name="pageNo" value="1"/>
<form id="formSearch" action="<%=basePath%>/admin/data_register/list.action" method="get" class="form-inline">
    <div class="form-group">
        <label for="classify">分类</label>
        <select id="classify" name="classify" class="form-control ">
            <c:forEach items="${dicResourceRankClassify}" var="item" >
                <option value="${item.key}">${item.value}</option>
            </c:forEach>
        </select>
    </div>
    <div class="form-group">
        <label for="category">类别项</label>
        <select id="category" name="category" class="form-control">
            <c:forEach items="${dicResourceRankCategory}" var="item" >
                <option value="${item.key}">${item.value}</option>
            </c:forEach>
        </select>
    </div>
    <div class="form-group">
        <label for="dateFrom">起止时间</label>
        <div class="input-group date ">
            <input type="text" id="dateFrom" name="dateFrom" class="form-control " />
            <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
        </div>
        至
        <div class="input-group date">
            <input type="text" id="dateTo" name="dateTo" class="form-control " />
            <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar "></span>
                </span>
        </div>
    </div>
    <div class="form-group">
        <button id="btnSearch" type="button" class="btn btn-sm btn-primary"><i class="fa fa-search"></i>查询
        </button>
        <button id="btnReset" type="button" class="btn btn-sm btn-default"><i class="fa fa-reply"></i>重置
        </button>
    </div>
</form>
<jsp:include page="../../../common/admin/search_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/grid_pre.jsp"></jsp:include>
<jsp:include page="../../../common/admin/grid_middle.jsp"></jsp:include>
<div id="divGrid">
    <%--<div id="divChart1" style="width: 100%;height: 500px;"></div>
    <jsp:include page="../../../common/admin/pager.jsp">
        <jsp:param name="pageNo" value="${pager.pageNo}"/>
        <jsp:param name="pageSize" value="${pager.pageSize}"/>
        <jsp:param name="total" value="${pager.total}"/>
    </jsp:include>--%>
</div>
<jsp:include page="../../../common/admin/grid_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/body_post.jsp"></jsp:include>

<script type="text/javascript">

    /*var myChart1 = echarts.init(document.getElementById('divChart1'));
    option = {
        title: {
            text: '',
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01]
        },
        yAxis: {
            type: 'category',
            data: ['aa','bb']
        },
        series: [
            {
                name: '',
                type: 'bar',
                data: [11,22]
            }
        ]
    };
    myChart1.setOption(option);*/

    /*/////////////////*/
    $(".input-group.date").datetimepicker({
        format: "YYYY-MM-DD",
        locale: "zh-cn"
    });

    function search() {
        var formSerialize = $("input[type='hidden'][name='formSerialize']").val();
        var pageNo = $("input[type='hidden'][name='pageNo']").val();
        var formData =null;
       if(formSerialize==''){
            formData =$('#formSearch').serialize()+"&pageNo=" + pageNo;
       }else{
            formData =formSerialize + "&pageNo=" + pageNo;
       }
        $("#divGrid").renderPartial({url: "<%=basePath%>/admin/resource_rank/list.action", data: formData});
        <%--$.get("<%=basePath%>/admin/resource_rank/list.action",formData,function(result){--%>
            <%--$("#divGrid").innerHTML=result;--%>
        <%--})--%>
        <%--var formSerialize = $("input[type='hidden'][name='formSerialize']").val();--%>
        <%--var pageNo = $("input[type='hidden'][name='pageNo']").val();--%>
        <%--var formData = formSerialize + "&pageNo=" + pageNo;--%>
        <%--$("#divGrid").renderPartial({url: "<%=basePath%>/admin/data_supply/list.action", data: formData});--%>
    }

    $("#btnSearch").click(function () {
        $("input[type='hidden'][name='pageNo']").val(1);
        $("input[type='hidden'][name='formSerialize']").val($("#formSearch").serialize());
        search();
    });

    $("#btnReset").click(function () {
        $('#formSearch').resetForm();
    });
    search();
</script>
</body>
</html>