<%@ page import="com.lightinit.hsdataplatform.dictionary.DicResourceCatelogType" %>
<%@ 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" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="归类"/></jsp:include>
<form id="formAdd" action="<%=basePath%>/admin/classificationAndAggregation/toAggregation.action" method="post" role="form" class="form-horizontal">
    <input type="hidden" name="id" value="${resource.id}"/>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">资源名称：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static"> ${resource.resourceName}</p>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">资源类型：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static"> ${resource.resourceType}</p>
        </div>
    </div>
    <div class="form-group">
        <label for="catelogBasic" class="col-md-3 col-sm-3 control-label text-right">基础分类：</label>
        <div class="col-md-7 col-sm-7">
            <input type="hidden" id="catelogBasic" name="catelogBasic" />
            <button type="button" class="btn btn-default dropdown-toggle" style="min-width: 120px; text-align: right;">
                <span class="caret" style="margin-left: 10px;"></span>
            </button>
            <div id="divCatelogBasic"></div>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="catelogSector" class="col-md-3 col-sm-3 control-label">部门分类：</label>
        <div class="col-md-7 col-sm-7">
            <input type="hidden" id="catelogSector" name="catelogSector" />
            <button type="button" class="btn btn-default dropdown-toggle" style="min-width: 120px; text-align: right;">
                <span class="caret" style="margin-left: 10px;"></span>
            </button>
            <div id="divCatelogSector"></div>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="catelogTheme" class="col-md-3 col-sm-3 control-label">主题分类：</label>
        <div class="col-md-7 col-sm-7">
            <input type="hidden" id="catelogTheme" name="catelogTheme" />
            <button type="button" class="btn btn-default dropdown-toggle" style="min-width: 120px; text-align: right;">
                <span class="caret" style="margin-left: 10px;"></span>
            </button>
            <div id="divCatelogTheme"></div>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="catelogCustom" class="col-md-3 col-sm-3 control-label">自定义分类：</label>
        <div class="col-md-7 col-sm-7">
            <input type="hidden" id="catelogCustom" name="catelogCustom" />
            <button type="button" class="btn btn-default dropdown-toggle" style="min-width: 120px; text-align: right;">
                <span class="caret" style="margin-left: 10px;"></span>
            </button>
            <div id="divCatelogCustom"></div>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i>取消</button>
<button type="button" id="btnSave" class="btn btn-primary"><i class="fa fa-check"></i>保存</button>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>
<script type="text/javascript">
    $("#btnSave").click(function() {
        $('#formAdd').ajaxSubmitCloseRefresh();
    });

    $(".input-group.date").datetimepicker({
        format: "YYYY-MM-DD",
        locale: "zh-cn"
    });
    $("#divCatelogBasic").selectTree({url: "<%=basePath%>/admin/common/resource_catelog_tree_data.action?resourceCatelogType=<%=DicResourceCatelogType.BASIC%>${busiModel.catelogBasic == null ? "" : "&selectedId="}${busiModel.catelogBasic}"});
    $("#divCatelogSector").selectTree({url: "<%=basePath%>/admin/common/resource_catelog_tree_data.action?resourceCatelogType=<%=DicResourceCatelogType.SECTOR%>${busiModel.catelogSector == null ? "" : "&selectedId="}${busiModel.catelogSector}"});
    $("#divCatelogTheme").selectTree({url: "<%=basePath%>/admin/common/resource_catelog_tree_data.action?resourceCatelogType=<%=DicResourceCatelogType.THEME%>${busiModel.catelogTheme == null ? "" : "&selectedId="}${busiModel.catelogTheme}"});
    $("#divCatelogCustom").selectTree({url: "<%=basePath%>/admin/common/resource_catelog_tree_data.action?resourceCatelogType=<%=DicResourceCatelogType.CUSTOM%>${busiModel.catelogCustom == null ? "" : "&selectedId="}${busiModel.catelogCustom}"});

</script>
