Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

109 rindas
4.3 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/GetListOfSelfJY',
  46. headData: [
  47. { label: '公告标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' },
  48. { label: '发布人员', name: 'F_CreateUserName', index: 'F_CreateUserName', width: 100, align: 'left' },
  49. { label: '公告类别', name: 'F_Category', index: 'F_Category', width: 100, align: 'center' },
  50. {
  51. label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "center",
  52. formatter: function (cellvalue) {
  53. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm');
  54. }
  55. },
  56. { label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center' },
  57. {
  58. label: "阅读状态", name: "RNewsId", index: "RNewsId", width: 80, align: "center", autowidth: false,
  59. formatter: function (cellvalue) {
  60. if (cellvalue != null && cellvalue != "") {
  61. return "<span class=\"label label-success\">已阅读</span>";
  62. } else {
  63. return "<span class=\"label label-danger\">未阅读</span>";
  64. }
  65. }
  66. },
  67. {
  68. label: "阅读时间", name: "RTime", index: "RTime", width: 130, align: "center",
  69. formatter: function (cellvalue) {
  70. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  71. }
  72. }
  73. ],
  74. mainId: 'F_NewsId',
  75. isPage: false,
  76. sidx: 'F_CreateDate',
  77. sord: 'desc',
  78. dblclick:function(val) {
  79. learun.layerForm({
  80. id: 'formview',
  81. title: '查看公告',
  82. url: top.$.rootUrl + '/Utility/ListContentIndex?id=' + val.F_NewsId,
  83. width: 1000,
  84. height: 650,
  85. maxmin: true,
  86. btn: null
  87. });
  88. }
  89. });
  90. page.search();
  91. },
  92. search: function (param) {
  93. param = param || {};
  94. if (category) {
  95. param.categoryId = category;
  96. }
  97. $('#gridtable').jfGridSet('reload', param);
  98. }
  99. };
  100. // 保存数据后回调刷新
  101. refreshGirdData = function () {
  102. page.search();
  103. }
  104. page.init();
  105. }