<%@ 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";
%>
<html>
<head>
    <title>数据-视图</title>
    <jsp:include page="../common/head.jsp"></jsp:include>
</head>
<body>
<jsp:include page="../common/body_header.jsp"></jsp:include>
    <div class="mid">
        <div class="line"></div>
        <div class="box">
            <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>
        <div class="nr">
            <div class="nr0" id="themeView">
                <div class="xiangshu">(共${dataViewList.size()}项)</div>
                <div class="shuju5">
                    <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>
                                <div class="shuju011">
                                    <a href="<%=basePath%>/share/data/index.htm/?catelogThemeCode=${item.catelogCode}"><img src="${item.catelogImg}" alt="暂无图片" class="div_icon1"></a>
                                    <span class="shuju01-font"><a href="<%=basePath%>/share/data/index.htm/?catelogThemeCode=${item.catelogCode}">${item.catelogName}</a></span>
                                </div>
                            <c:if test="${status.index %5==4}"></div></c:if>
                            <c:if test="${status.last}"></div></c:if>
                        </c:forEach>
                    </c:if>
                </div>
        </div>
        <div class="nr0" id="structureView">
            <div class="xiangshu">共接入<span class="sl">${sectorTotal}</span>家机构，开放<span class="sl">${sectorDataTotal}</span>项数据</div>
            <div class="jigoushuju">
                <table class="jg">
                    <tr class="jgtop">
                        <td class="jgmc">机构名称</td>
                        <td>资源数量</td>
                    </tr>
                    <c:if test="${dataStructModel !=null}">
                        <c:forEach items="${dataStructModel}" var="item">
                            <tr>
                                <td><a class="qxbm" href="<%=basePath%>/share/data/index.htm/?sectorCode=${item.sectorCode}">${item.sectorName}</a></td>
                                <td>${item.perTotal}</td>
                            </tr>
                        </c:forEach>
                    </c:if>
                </table>
            </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");
    }
</script>
</html>