You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
3.7 KiB

  1. /*
  2. * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  3. * Copyright (c) 2013-2018 北京泉江科技有限公司
  4. * 创建人:陈彬彬
  5. * 日 期:2017.07.11
  6. * 描 述:公告通知
  7. */
  8. var refreshGirdData; // 更新数据
  9. var category = request('F_CategoryId');
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. page.initGrid();
  15. page.bind();
  16. },
  17. bind: function () {
  18. // 查询
  19. $('#btn_Search').on('click', function () {
  20. var keyword = $('#txt_Keyword').val();
  21. page.search({ keyword: keyword });
  22. });
  23. // 刷新
  24. $('#lr_refresh').on('click', function () {
  25. location.reload();
  26. });
  27. // 查看
  28. $('#lr_view').on('click', function () {
  29. var keyValue = $('#gridtable').jfGridValue('F_NewsId');
  30. if (learun.checkrow(keyValue)) {
  31. learun.layerForm({
  32. id: 'formview',
  33. title: '查看公告',
  34. url: top.$.rootUrl + '/Utility/ListContentIndex?id=' + keyValue,
  35. width: 1000,
  36. height: 650,
  37. maxmin: true,
  38. btn: null
  39. });
  40. }
  41. });
  42. },
  43. initGrid: function () {
  44. $('#gridtable').jfGrid({
  45. url: top.$.rootUrl + '/LR_OAModule/Notice/GetListOfSelf',
  46. headData: [
  47. { label: '公告标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' },
  48. { label: '公告类别', name: 'F_Category', index: 'F_Category', width: 100, align: 'center' },
  49. {
  50. label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "center",
  51. formatter: function (cellvalue) {
  52. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm');
  53. }
  54. },
  55. { label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center' },
  56. {
  57. label: "阅读状态", name: "RNewsId", index: "RNewsId", width: 80, align: "center", autowidth: false,
  58. formatter: function (cellvalue) {
  59. if (cellvalue != null && cellvalue != "") {
  60. return "<span class=\"label label-success\">已阅读</span>";
  61. } else {
  62. return "<span class=\"label label-danger\">未阅读</span>";
  63. }
  64. }
  65. },
  66. {
  67. label: "阅读时间", name: "RTime", index: "RTime", width: 130, align: "center",
  68. formatter: function (cellvalue) {
  69. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  70. }
  71. }
  72. ],
  73. mainId: 'F_NewsId',
  74. isPage: false,
  75. sidx: 'F_CreateDate',
  76. sord: 'desc'
  77. });
  78. page.search();
  79. },
  80. search: function (param) {
  81. param = param || {};
  82. if (category) {
  83. param.categoryId = category;
  84. }
  85. $('#gridtable').jfGridSet('reload', param);
  86. }
  87. };
  88. // 保存数据后回调刷新
  89. refreshGirdData = function () {
  90. page.search();
  91. }
  92. page.init();
  93. }