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.
 
 
 
 
 
 

74 lines
2.6 KiB

  1. /*
  2. * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  3. * Copyright (c) 2013-2018 北京泉江科技有限公司
  4. * 创建人:陈彬彬
  5. * 日 期:2018.06.01
  6. * 描 述:聊天记录查询
  7. */
  8. var userId = request('userId');
  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. initGrid: function () {
  28. $('#gridtable').jfGrid({
  29. url: top.$.rootUrl + '/LR_IM/IMMsg/GetMsgPageList?userId=' + userId,
  30. headData: [
  31. {
  32. label: '发送人', name: 'F_SendUserId', width: 80, align: 'left',
  33. formatterAsync(callback,cellvalue) {
  34. var loginInfo = learun.clientdata.get(['userinfo']);
  35. if (loginInfo.userId == cellvalue) {
  36. callback('我');
  37. }
  38. else {
  39. // 获取人员数据
  40. learun.clientdata.getAsync('user', {
  41. key: cellvalue,
  42. callback: function (data, op) {
  43. callback(data.name);
  44. }
  45. });
  46. }
  47. }
  48. },
  49. {
  50. label: '创建时间', name: 'F_CreateDate', width: 130, align: 'left',
  51. formatter: function (cellvalue) {
  52. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  53. }
  54. },
  55. { label: '消息内容', name: 'F_Content', width: 200, align: 'left' }
  56. ],
  57. mainId: 'F_MsgId',
  58. sidx: 'F_CreateDate',
  59. sord: 'DESC',
  60. isPage: true
  61. });
  62. page.search();
  63. },
  64. search: function (param) {
  65. $('#gridtable').jfGridSet('reload', param);
  66. }
  67. };
  68. page.init();
  69. }