<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.lightinit.hsdataplatform.dictionary.DicNotificationState" %>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String basePath = request.getContextPath();
%>
<div class="table-responsive">
    <table class="table table-striped table-bordered table-hover " id="tablesOrder"  >
        <thead id="themeTr">
        <tr>
            <th>序号</th>
            <th>主题</th>
            <th>数据</th>
            <th>数据API</th>
            <th>工具API</th>
            <th>模型API</th>
            <th>微应用</th>
        </tr>
        </thead>
        <tbody>
        <c:set var="shuju_total" value="0"/>
        <c:set var="shujuAPI_total" value="0"/>
        <c:set var="gongjuAPI_total" value="0"/>
        <c:set var="moxingAPI_total" value="0"/>
        <c:set var="weiyingyong_total" value="0"/>
        <c:choose>
            <c:when test="${list!=null}">
                <c:forEach items="${list}" var="item" varStatus="status">
                <tr>
                    <td>${status.count}</td>
                    <td>${item}</td>
                    <td>
                        <c:set var="str" value="${item}-数据"></c:set>
                       ${map[str]!=null?map[str]:0}
                        <c:set var="shuju_total" value="${shuju_total +(map[str])}" />
                    </td>
                    <td>
                        <c:set var="str" value="${item}-数据API"></c:set>
                        ${map[str]!=null?map[str]:0}
                        <c:set var="shujuAPI_total" value="${shujuAPI_total +(map[str]) }" />
                    </td>
                    <td>
                        <c:set var="str" value="${item}-工具API"></c:set>
                        ${map[str]!=null?map[str]:0}
                        <c:set var="gongjuAPI_total" value="${gongjuAPI_total +(map[str]) }" />
                    </td>
                    <td>
                        <c:set var="str" value="${item}-模型API"></c:set>
                        ${map[str]!=null?map[str]:0}
                        <c:set var="moxingAPI_total" value="${moxingAPI_total +(map[str]) }" />
                    </td>
                    <td>
                        <c:set var="str" value="${item}-微应用"></c:set>
                        ${map[str]!=null?map[str]:0}
                        <c:set var="weiyingyong_total" value="${weiyingyong_total +(map[str]) }" />
                    </td>
                </tr>
                </c:forEach>
                <td>${list.size()+1}</td><td>统计</td><td>${shuju_total}</td><td>${shujuAPI_total}</td><td>${gongjuAPI_total}</td><td>${moxingAPI_total}</td><td>${weiyingyong_total}</td>
            </c:when>
            <c:otherwise>
                <tr>
                    <td colspan="4">无数据</td>
                </tr>
            </c:otherwise>
        </c:choose>
        </tbody>
    </table>
</div>
<%--<script type="text/javascript">
   var v1= $('#themeTr').children('tr:eq(0)').html();
   alert(v1);
   console.info(v1);
</script>--%>
