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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>修改角色</title>
 
[#include "/business/pages/include/static.html" /]
</head>
<body class="edit_txt_body" style="padding:5px 10px 5px 10px;">
 
<script type="text/javascript">
        function _onFormSubmit(){
            if(!window.top.openConfirm('确定要重新分配人员吗?')) return;
            document.getElementById("myform").target = window.top.openDialog("1","操作",
                         {},
                         {"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
            $("#myform").submit();
        }
        
        function onUserClick(userid){
            window.top.openDialog(2,40,40,'人员角色',$.http.getAbsoluteUrl('userInRole.html?userid='+userid),{
                        buttons:[{text:"提交",iconCls:'icon-add',_handler:"_onFormSubmit()"},{text:"关闭",_handler:"closeWin(2)"}]
                        });
        }
    </script>
 
     <form name="myform" action="" method="post" id="myform">
         <table class="edit_layout" width="99%">
                 [#list ROLE_LIST as d]
                    <tr><td colspan="2" ><input type="checkbox" name="roleid" id="${d.ID}" value="${d.ID}" [#if info[d.ID]??]checked[/#if] /><label style="margin-left:5px;">${d.ROLENAME}</label></td>
                    </tr>
                    [#if d.groupList ?? && d.groupList?size > 0]
                    [#list d.groupList as group]
                    <tr><td >&nbsp;</td><td ><input type="checkbox" name="groupid" class="${d.ID}" value="${group.ID}" [#if group.check??]checked[/#if] /><label style="margin-left:5px;">${group.GROUPNAME}</label></td>
                    </tr>
                    [/#list]
                    [/#if]
                 [/#list]
            </table>
     </form>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            _onFormSubmit();
        }
    }
$(function(){
    $("input[name=roleid]").click(function(){
       if(!$(this).is(":checked")){
          var roleid = $(this).val();
          $("."+roleid).attr("checked",false);
       }
    });
    $("input[name=groupid]").click(function(){
       if($(this).is(":checked")){
          var roleid = $(this).attr("class");
          $("#"+roleid).attr("checked",true);
       }
    });
});
 
</script>
 
 
</body>
</html>