1
0

rock_admin_txl.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. var at = $('#optionview_{rand}').bootstree({
  5. url:false,autoLoad:false,
  6. columns:[{
  7. text:'部门',dataIndex:'name',align:'left',xtype:'treecolumn'
  8. }],
  9. itemdblclick:function(d){
  10. a.setparams({'deptid':d.id}, true);
  11. }
  12. });
  13. var a = $('#admin_{rand}').bootstable({
  14. modenum:'user',sort:'sort',dir:'asc',fanye:true,params:{atype:'txlmy'},url:publicmodeurl('user'),
  15. storeafteraction:'storeafter',storebeforeaction:'storebefore',checked:false,
  16. columns:[{
  17. text:'头像',dataIndex:'face',notexcel:true,renderer:function(v,d){
  18. if(isempt(v))v='images/noface.png';
  19. return '<img onclick="$.imgview({url:this.src})" src="'+v+'" height="24" width="24">';
  20. }
  21. },{
  22. text:'姓名',dataIndex:'name',sortable:true
  23. },{
  24. text:'部门',dataIndex:'deptallname',align:'left'
  25. },{
  26. text:'职位',dataIndex:'ranking',sortable:true
  27. },{
  28. text:'办公电话',dataIndex:'tel'
  29. },{
  30. text:'手机号',dataIndex:'mobile'
  31. },{
  32. text:'邮箱',dataIndex:'email'
  33. },{
  34. text:'排序号',dataIndex:'sort',sortable:true
  35. }],
  36. load:function(d){
  37. if(d.deptdata){
  38. at.loadData(d.deptdata);
  39. }
  40. }
  41. });
  42. var c = {
  43. search:function(){
  44. var s=get('key_{rand}').value;
  45. a.setparams({key:s},true);
  46. },
  47. daochu:function(){
  48. a.exceldown();
  49. },
  50. changlx:function(o1,lx){
  51. $("button[id^='state{rand}']").removeClass('active');
  52. $('#state{rand}_'+lx+'').addClass('active');
  53. var atype = 'txlmy';
  54. if(lx=='0')atype = 'txldown';
  55. if(lx=='1')atype = 'txldownall';
  56. get('key_{rand}').value='';
  57. a.setparams({atype:atype,deptid:'0',key:''},true);
  58. }
  59. };
  60. js.initbtn(c);
  61. $('#optionview_{rand}').css('height',''+(viewheight-25)+'px');
  62. });
  63. </script>
  64. <div>
  65. <table width="100%">
  66. <tr valign="top">
  67. <td>
  68. <div style="border:1px #cccccc solid;width:220px">
  69. <div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
  70. </div>
  71. </td>
  72. <td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
  73. <td width="95%">
  74. <table width="100%"><tr>
  75. <!--
  76. <td nowrap>
  77. <button class="btn btn-info" onclick="reim.creategroup()" type="button"><i class="icon-comments-alt"></i> 创建会话</button>
  78. </td>-->
  79. <td>
  80. <div class="input-group" style="width:250px">
  81. <input class="form-control" id="key_{rand}" placeholder="姓名/部门/职位">
  82. <span class="input-group-btn">
  83. <button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
  84. </span>
  85. </div>
  86. </td>
  87. <td style="padding-left:10px">
  88. </td>
  89. <td width="80%">
  90. <div class="btn-group" id="btngroup{rand}">
  91. <button class="btn btn-default active" id="state{rand}_" click="changlx," type="button">全部</button>
  92. <button class="btn btn-default" id="state{rand}_0" click="changlx,0" type="button">我直属下属</button>
  93. <button class="btn btn-default" id="state{rand}_1" click="changlx,1" type="button">全部下属</button>
  94. </div>
  95. </td>
  96. <td align="right" nowrap>
  97. <!-- <button class="btn btn-default" click="daochu,1" type="button">导出</button>-->
  98. </td>
  99. </tr>
  100. </table>
  101. </div>
  102. <div class="blank10"></div>
  103. <div id="admin_{rand}"></div>
  104. </td>
  105. </tr>
  106. </table>
粤ICP备19079148号