noticeList.jsp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <t:base type="jquery,easyui,tools"></t:base>
  4. <div class="easyui-layout" fit="true">
  5. <div region="center" style="padding:1px;">
  6. <t:datagrid name="noticeList" title="common.notice" actionUrl="noticeController.do?datagrid" idField="id" fit="true" sortName="createTime" sortOrder="desc">
  7. <t:dgCol title="编号" field="id" hidden="true"></t:dgCol>
  8. <t:dgCol title="状态" field="isRead" width="40" replace="已读_1,未读_0"></t:dgCol>
  9. <t:dgCol title="标题" field="noticeTitle" width="120"></t:dgCol>
  10. <!-- update-begin Author:xugj Date:20160330 for:#1012 【平台bug】系统公告列表时间格式不对 -->
  11. <t:dgCol title="时间" field="createTime" formatter="yyyy-MM-dd hh:mm" width="80"></t:dgCol>
  12. <!-- update-end Author:xugj Date:20160330 for:#1012 【平台bug】系统公告列表时间格式不对 -->
  13. <t:dgCol title="common.operation" field="opt"></t:dgCol>
  14. <!-- //update-begin--Author:zhangjq Date:20160904 for:1332 【系统图标统一调整】讲{系统管理模块}{在线开发}的链接按钮,改成ace风格 -->
  15. <t:dgFunOpt funname="doRead(id,isRead)" title="common.read" urlclass="ace_button" urlfont="fa-trash-o"></t:dgFunOpt>
  16. <!-- //update-end--Author:zhangjq Date:20160904 for:1332 【系统图标统一调整】讲{系统管理模块}{在线开发}的链接按钮,改成ace风格 -->
  17. </t:datagrid>
  18. </div>
  19. </div>
  20. <script type="text/javascript" charset="utf-8">
  21. $('#noticeList').datagrid({
  22. rowStyler:function(index,row){
  23. if (row.isRead!=1){
  24. return 'font-weight:bold !important;';
  25. }
  26. }
  27. });
  28. function doRead(id,isRead){
  29. if(isRead!=1){
  30. var url = "noticeController.do?updateNoticeRead";
  31. $.ajax({
  32. url:url,
  33. type:"GET",
  34. dataType:"JSON",
  35. data:{
  36. noticeId:id
  37. },
  38. success:function(data){
  39. if(data.success){
  40. $('#noticeList').datagrid({
  41. rowStyler:function(index,row){
  42. if (row.isRead!=1){
  43. return 'font-weight:bold !important;';
  44. }else{
  45. return 'font-weight:normal;';
  46. }
  47. }
  48. });
  49. }
  50. }
  51. });
  52. }
  53. var addurl = "noticeController.do?goNotice&id="+id;
  54. createdetailwindow("通知公告详情", addurl, 750, 600);
  55. }
  56. </script>