noticeAuthorityRoleList.jsp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <t:datagrid name="noticeAuthorityRoleList" checkbox="true" fitColumns="false" title="common.authority.role" actionUrl="noticeAuthorityRoleController.do?datagrid&noticeId=${noticeId}" idField="id" fit="true" queryMode="group">
  4. <t:dgCol title="ID" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
  5. <t:dgCol title="通告ID" field="noticeId" hidden="true" queryMode="group" width="120"></t:dgCol>
  6. <t:dgCol title="common.role.name" field="role.roleName" hidden="false" queryMode="group" width="180"></t:dgCol>
  7. <t:dgCol title="common.operation" field="opt"></t:dgCol>
  8. <!-- //update-begin--Author:zhangjq Date:20160904 for:1332 【系统图标统一调整】讲{系统管理模块}{在线开发}的链接按钮,改成ace风格 -->
  9. <t:dgDelOpt title="common.delete" url="noticeAuthorityRoleController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
  10. <!-- //update-end--Author:zhangjq Date:20160904 for:1332 【系统图标统一调整】讲{系统管理模块}{在线开发}的链接按钮,改成ace风格 -->
  11. <t:dgToolBar title="common.authority.role" icon="icon-add" operationCode="add" url="noticeAuthorityRoleController.do?doSave" funname="addAuthorityRole"></t:dgToolBar>
  12. </t:datagrid>
  13. <input type="hidden" id="pNoticeId" value="${noticeId}" />
  14. <script>
  15. //授权用户
  16. function addAuthorityRole(title,url, id){
  17. $.dialog({
  18. width:600,
  19. height:400,
  20. id: 'LHG1976D',
  21. title: "选择通知公告授权角色",
  22. max: false,
  23. min: false,
  24. resize: false,
  25. content: 'url:noticeAuthorityRoleController.do?selectRole',
  26. lock:true,
  27. ok: function(){
  28. iframe = this.iframe.contentWindow;
  29. var roleId = iframe.getRole();
  30. var noticeId = $("#pNoticeId").val();
  31. if(roleId==""){
  32. return false;
  33. }else{
  34. url += '&role.id='+roleId;
  35. url += '&noticeId='+noticeId;
  36. doAjax(url);
  37. }
  38. },
  39. close: function(){
  40. }
  41. });
  42. }
  43. function doAjax(url) {
  44. $.ajax({
  45. async : false,
  46. cache : false,
  47. type : 'POST',
  48. url : url,// 请求的action路径
  49. error : function() {// 请求失败处理函数
  50. },
  51. success : function(data) {
  52. var d = data; // ------ $.parseJSON(data);
  53. if (d.success) {
  54. tip(d.msg);
  55. $('#noticeAuthorityRoleList').datagrid('reload',{});
  56. }
  57. }
  58. });
  59. }
  60. </script>