cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!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.CATEGORY_NAME}</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.CATEGORY_NAME}:</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" id="${sj.ID}" type="checkbox" [#if sj.check==1]checked="checked"[/#if] value="${sj.ID}" labelName="${sj.CATEGORY_NAME}"/>
                                                <span>${sj.CATEGORY_NAME}</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.showName(labelIds,labelNames);
                     
                     window.top.hideDialog(dialogID);
                }
            }
         </script>
</body>
</html>