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.
 
 
 
 
 
 

99 regels
4.2 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. {
  54. label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center',
  55. formatterAsync: function (callback, value, row, op, $cell) {
  56. learun.clientdata.getAsync('custmerData', {
  57. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  58. key: value,
  59. keyId: 'id',
  60. callback: function (_data) {
  61. callback(_data['name'] || value);
  62. }
  63. });
  64. }
  65. },
  66. { label: '阅读次数', name: 'F_PV', index: 'F_PV', width: 80, align: 'center' },
  67. {
  68. label: "发布状态", name: "F_EnabledMark", index: "F_EnabledMark", width: 80, align: "center", autowidth: false,
  69. formatter: function (cellvalue) {
  70. if (cellvalue == 1) {
  71. return "<span class=\"label label-success\">已发布</span>";
  72. } else {
  73. return "<span class=\"label label-danger\">未发布</span>";
  74. }
  75. }
  76. },
  77. { label: "创建时间", name: "F_CreateDate", index: "F_CreateDate", width: 130, align: "center" }
  78. ],
  79. mainId: 'F_NewsId',
  80. isMultiselect: true,
  81. isPage: true,
  82. sidx: 'F_CreateDate',
  83. sord: 'desc'
  84. });
  85. page.search();
  86. },
  87. search: function (param) {
  88. $('#gridtable').jfGridSet('reload', param);
  89. }
  90. };
  91. // 保存数据后回调刷新
  92. refreshGirdData = function () {
  93. page.search();
  94. }
  95. page.init();
  96. }