<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>知识分类</title>
|
<!--(start) public flies-->
|
|
</head>
|
|
<body class="select_tree_body">
|
[#include "/business/pages/include/static.html" /]
|
<div class="select_tree">
|
<table class="st_title">
|
<tr>
|
<th width="14%">当前已选择:</th>
|
<td id="treeLabel">
|
|
[#if checkSl?? && checkSl?size>0]
|
[#list checkSl as sl]
|
<a><span class='removeSelect' sl='${sl.checkId}'>${sl.checkName}</span></a>
|
[/#list]
|
[/#if]
|
</td>
|
</tr>
|
</table>
|
[#if trees?? && trees?size>0]
|
[#list trees as tree]
|
<div class="first_level">
|
<div class="fl_title">
|
<h3>${tree.TITLE}</h3>
|
<a class="fl_morebtn"></a>
|
</div>
|
<table class="second_level">
|
[#if tree.ejTree?? && tree.ejTree?size>0]
|
[#list tree.ejTree as ej]
|
<tr><th width="14%">${ej.TITLE}:</th><td><div class="thrid_level">
|
<div class="thrid_level_con clearfix">
|
[#if ej.sjTree?? && ej.sjTree?size>0]
|
[#list ej.sjTree as sj]
|
<div class="tl_item">
|
<input class="pos tree" name="treeValue" type="checkbox" id="${sj.ID}" [#if sj.check==1]checked="checked"[/#if] value="${sj.ID}" labelName="${sj.TITLE}"/>
|
<span>${sj.TITLE}</span>
|
</div>
|
[/#list]
|
[/#if]
|
</div>
|
</div></td><th class="tl_morebtn_wrap"><a class="tl_morebtn">更多</a></th></tr>
|
[/#list]
|
[/#if]
|
</table>
|
</div>
|
[/#list]
|
[/#if]
|
</div>
|
|
<script type="text/javascript">
|
$(function() {
|
niceform(".tree").on("click",function() {
|
var checkTree = $(".tree:checked");
|
var alreadySelect = "";
|
checkTree.each(function() {
|
var slId = $(this).attr("id");
|
alreadySelect += "<a><span class='removeSelect' sl='"+slId+"'>"+$(this).parent().find('span').text()+"</span></a>";
|
});
|
|
$("#treeLabel").empty().append(alreadySelect);
|
});
|
|
$(".removeSelect").live("click",function() {
|
var slId = $(this).attr("sl");
|
niceform("#"+slId).prop("checked",false);
|
$(this).parent().remove();
|
})
|
})
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var labelId = new Array();
|
var labelName = new Array();
|
var checkTree = $(".tree:checked");
|
var alreadySelect = "";
|
checkTree.each(function() {
|
labelId.push($(this).val());
|
labelName.push($(this).attr("labelName"));
|
});
|
|
var labelIds = labelId.join(",");
|
var labelNames = labelName.join(",");
|
|
if(labelIds.length==0) {
|
popupTips("请选择知识分类");
|
return;
|
}
|
|
window.parent.showCaName(labelIds,labelNames);
|
|
window.top.hideDialog(dialogID);
|
}
|
}
|
</script>
|
</body>
|
</html>
|