showRy.jsp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <%@ page contentType="text/html;charset=UTF-8"%>
  2. <script>
  3. function savery(){
  4. var treeObj = $.fn.zTree.getZTreeObj("usertree");
  5. var nodes = treeObj.getCheckedNodes(true);
  6. var user=new Array();
  7. for(var i=0;i<nodes.length;i++) {
  8. var node = nodes[i];
  9. if(node.type=="user"){
  10. user.push(node.id);
  11. }
  12. }
  13. if(user.length >0){
  14. $('#userids').val(user);
  15. guanbiry();
  16. }else{
  17. $.alert({
  18. title: '提示',
  19. content: "请选择会签人员!",
  20. confirm: function(){
  21. }
  22. });
  23. }
  24. }
  25. function guanbiry(){
  26. $('.theme-popover-mask').fadeOut(100);
  27. $('.theme-popover').slideUp(0);
  28. }
  29. var setting = {
  30. async: {
  31. enable: true,
  32. url:$.app+"/getUserTreeData?roleCode="+'${roleCode}',
  33. contentType : "application/x-www-form-urlencoded", //已form的形式提交参数
  34. autoParam: ["id","name"]
  35. },
  36. check: {
  37. enable: true //表示是否显示节点前的checkbox选择框
  38. },
  39. data: {
  40. simpleData: {
  41. enable: true
  42. }
  43. },
  44. view:{
  45. showLine:false//去掉虚线
  46. },
  47. callback: {
  48. }
  49. };
  50. $(document).ready(function () {
  51. $.fn.zTree.init($("#usertree"), setting);
  52. });
  53. </script>
  54. <div class="theme-popover" id="selectrydiv" style="width: 350px;">
  55. <div class="theme-poptit">
  56. <div class="popTitle">
  57. <h4>选择${currName }人员</h4>
  58. </div>
  59. <div class="close">
  60. <a href="###" title="关闭" onclick="guanbiry()" >×</a>
  61. </div>
  62. </div>
  63. <!-- 列表 -->
  64. <div style="background-color:#f4f4f4;">
  65. <ul id="usertree" class="ztree" style="width:100%; "></ul>
  66. </div>
  67. <div align="center">
  68. <a class="btn btn-default btn-sm" href="###" onclick="savery()">
  69. <i class="glyphicon glyphicon-ok-sign"></i>
  70. 确认</a>
  71. <a class="btn btn-default btn-sm" href="###" onclick="guanbiry()">
  72. <i class="glyphicon glyphicon-arrow-left"></i>
  73. 关闭</a>
  74. </div>
  75. </div>
  76. <div class="theme-popover-mask" id="selectry2div"></div>