您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

121 行
4.9 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. {
  57. label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center',
  58. formatterAsync: function (callback, value, row, op, $cell) {
  59. learun.clientdata.getAsync('custmerData', {
  60. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  61. key: value,
  62. keyId: 'id',
  63. callback: function (_data) {
  64. callback(_data['name'] || value);
  65. }
  66. });
  67. }
  68. },
  69. {
  70. label: "阅读状态", name: "RNewsId", index: "RNewsId", width: 80, align: "center", autowidth: false,
  71. formatter: function (cellvalue) {
  72. if (cellvalue != null && cellvalue != "") {
  73. return "<span class=\"label label-success\">已阅读</span>";
  74. } else {
  75. return "<span class=\"label label-danger\">未阅读</span>";
  76. }
  77. }
  78. },
  79. {
  80. label: "阅读时间", name: "RTime", index: "RTime", width: 130, align: "center",
  81. formatter: function (cellvalue) {
  82. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  83. }
  84. }
  85. ],
  86. mainId: 'F_NewsId',
  87. isPage: false,
  88. sidx: 'F_CreateDate',
  89. sord: 'desc',
  90. dblclick:function(val) {
  91. learun.layerForm({
  92. id: 'formview',
  93. title: '查看公告',
  94. url: top.$.rootUrl + '/Utility/ListContentIndex?id=' + val.F_NewsId,
  95. width: 1000,
  96. height: 650,
  97. maxmin: true,
  98. btn: null
  99. });
  100. }
  101. });
  102. page.search();
  103. },
  104. search: function (param) {
  105. param = param || {};
  106. if (category) {
  107. param.categoryId = category;
  108. }
  109. $('#gridtable').jfGridSet('reload', param);
  110. }
  111. };
  112. // 保存数据后回调刷新
  113. refreshGirdData = function () {
  114. page.search();
  115. }
  116. page.init();
  117. }