<%@ page import="com.lightinit.hsdataportal.dictionary.*" %>
<%@ page language="java" pageEncoding="UTF-8"
         contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String basePath = request.getContextPath();
    String resourcePath = basePath + "/resource";
%>
<!doctype html>
<html>
<head>
    <title>数据视图</title>
    <jsp:include page="../common/head.jsp"></jsp:include>
    <link rel="stylesheet" href="<%=resourcePath%>/css/open/dataview.css" type="text/css">
</head>
<body>
<jsp:include page="../common/body_header.jsp"></jsp:include>
    <div class="clearfix"></div>
    <div class="liutongbanner1"></div>
    <div class="mid50">
        <div class="line"></div>
        <div class="box">
            <div class="box00">
                <div class="xuanxiang1" >
                    <a href="##" class="xuanxiangfont" onclick="fnThemeView()" id="themeId">主题数据视图</a>
                </div>
                <div class="xuanxiang2">
                    <a href="##" class="xuanxiangfont" onclick="fnstructureView()" id="structureId">机构数据视图</a>
                </div>
                <div class="zhutishuju" id="themeView">
                    <div class="xiangshu">(共${dataViewList.size()}项)</div>
                    <div class="clearfix"></div>
                    <div class="shuju50">
                        <c:if test="${dataViewList !=null}">
                            <c:forEach items="${dataViewList}" var="item" varStatus="status">
                                <c:if test="${status.index %5==0}"><div class="shuju1"></c:if>
                                <%--<a href="<%=basePath%>/open/data/index.htm/?catelogThemeCode=${item.catelogCode}">--%>
                                    <div class="shuju01" onclick="fnToList('${item.catelogCode}')">
                                        <img src="${item.catelogImg}" alt="暂无图片" class="img-icon">
                                        <span class="shuju01-font">${item.catelogName}</span>
                                    </div>
                               <%-- </a>--%>
                                <c:if test="${status.index %5==4}"></div></c:if>
                                <c:if test="${status.last}"></div><%--</a>--%></c:if>
                            </c:forEach>
                        </c:if>
                        <div class="chakan0">
                      <%--  <span class="chakan"></span>
                        &nbsp&nbsp <a class="chakanfont">查看更多</a> &nbsp&nbsp
                        <span class="chakan"></span>--%>
                        </div>
                    </div>
            </div>
            <div class="zhutishuju" id="structureView">
                    <div class="xiangshu">共接入${sectorTotal}家机构，开放${sectorDataTotal}项数据</div>
                    <div class="clearfix"></div>
                    <div class="shuju50">
                        <table>
                            <tr bgcolor="#f2f2f2">
                                <td>机构名称</td>
                                <td>资源数量</td>
                            </tr>
                            <c:if test="${dataStructModel !=null}">
                                <c:forEach items="${dataStructModel}" var="item">
                                    <tr>
                                        <td><a class="qxbm" href="<%=basePath%>/open/data/index.htm?sectorCode=${item.sectorCode}">${item.sectorName}</a></td>
                                        <td>${item.perTotal}</td>
                                    </tr>
                                </c:forEach>
                            </c:if>
                        </table>
                        <div class="yeshu">
                            <%--<a href="##"><img src="<%=resourcePath%>/images/icon_left.png" class="yeshuimg"></a>
                            <a href="##" class="yeshu0">1</a>
                            <a href="##" class="yeshu0">2</a>
                            <a href="##" class="yeshu0">3</a>
                            <a href="##" class="yeshu0">4</a>
                            <a href="##" class="yeshu0">5</a>
                            <a href="##" class="yeshu0"><img src="<%=resourcePath%>/images/icon_right.png" ></a>--%>
                        </div>
                    </div>
            </div>
        </div>
    </div>
<jsp:include page="../common/body_footer.jsp"></jsp:include>
</body>
<script type="text/javascript">

    fnThemeView();
    function fnThemeView(){
        $('#themeView').show();
        $('#structureView').hide();
        $('#themeId').addClass("xuanxiangfont-active");
        $('#structureId').removeClass("xuanxiangfont-active");
    }
    function fnstructureView(){
        $('#themeView').hide();
        $('#structureView').show();
        $('#themeId').removeClass("xuanxiangfont-active");
        $('#structureId').addClass("xuanxiangfont-active");
    }

    function fnToList(param) {
        window.location.href="<%=basePath%>/open/data/index.htm?catelogThemeCode="+param;
    }
</script>
</html>