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.
 
 
 
 
 
 

87 lines
3.6 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 bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGrid();
  14. page.bind();
  15. },
  16. bind: function () {
  17. // 查询
  18. $('#btn_Search').on('click', function () {
  19. var keyword = $('#txt_Keyword').val();
  20. page.search({ keyword: keyword });
  21. });
  22. // 刷新
  23. $('#lr_refresh').on('click', function () {
  24. location.reload();
  25. });
  26. //还原
  27. $('#lr_revert').on('click', function () {
  28. var keyValue = $('#gridtable').jfGridValue('F_NewsId');
  29. if (learun.checkrow(keyValue)) {
  30. learun.layerConfirm('是否确认还原该项!', function (res) {
  31. if (res) {
  32. learun.deleteForm(top.$.rootUrl + '/LR_OAModule/Notice/RevertForm', { keyValue: keyValue }, function () {
  33. refreshGirdData();
  34. });
  35. }
  36. });
  37. }
  38. });
  39. },
  40. initGrid: function () {
  41. $('#gridtable').jfGrid({
  42. url: top.$.rootUrl + '/LR_OAModule/Notice/GetPageListRevert',
  43. headData: [
  44. { label: '公告标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' },
  45. { label: '发布人员', name: 'F_CreateUserName', index: 'F_CreateUserName', width: 100, align: 'left' },
  46. { label: '公告类别', name: 'F_Category', index: 'F_Category', width: 100, align: 'center' },
  47. {
  48. label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "center",
  49. formatter: function (cellvalue) {
  50. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm');
  51. }
  52. },
  53. { label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center' },
  54. { label: '阅读次数', name: 'F_PV', index: 'F_PV', width: 80, align: 'center' },
  55. {
  56. label: "发布状态", name: "F_EnabledMark", index: "F_EnabledMark", width: 80, align: "center", autowidth: false,
  57. formatter: function (cellvalue) {
  58. if (cellvalue == 1) {
  59. return "<span class=\"label label-success\">已发布</span>";
  60. } else {
  61. return "<span class=\"label label-danger\">未发布</span>";
  62. }
  63. }
  64. },
  65. { label: "创建时间", name: "F_CreateDate", index: "F_CreateDate", width: 130, align: "center" }
  66. ],
  67. mainId: 'F_NewsId',
  68. isMultiselect: true,
  69. isPage: true,
  70. sidx: 'F_CreateDate',
  71. sord: 'desc'
  72. });
  73. page.search();
  74. },
  75. search: function (param) {
  76. $('#gridtable').jfGridSet('reload', param);
  77. }
  78. };
  79. // 保存数据后回调刷新
  80. refreshGirdData = function () {
  81. page.search();
  82. }
  83. page.init();
  84. }