dialogDetailLog.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. define(function (require) {
  2. return function (context) {
  3. var $dlgLog, $gridLog;
  4. function queryGrid1() {
  5. $gridLog.reload({
  6. mtype: 'GET',
  7. url: api('/sweepCode/selectLogAddrHistory'),
  8. queryParams: {userId: context.userId, reportDate: context.reportDate}
  9. }, true);
  10. }
  11. return {
  12. xtype: 'dialog',
  13. dialogId: 'dialogDetailLog',
  14. title: '出行轨迹' + context.linkman + "-" + context.reportDate,
  15. width: '45%',
  16. height: '50%',
  17. onOpen: function () {
  18. $dlgLog = $(this);
  19. },
  20. center: {
  21. items: {
  22. onRender: function () {
  23. $gridLog = $(this);
  24. queryGrid1();
  25. },
  26. xtype: 'grid',
  27. idField: "userId",
  28. pagination: true,
  29. columns: [[
  30. // {field: 'reportDate', title: '上报时间', align: 'left', formatter: 'tsymd'},
  31. {field: 'userId', title: '用户ID', hidden: true},
  32. {field: 'city', title: '上报城市', maxWidth: 100, align: 'left',},
  33. {field: 'addr', title: '详细地址', align: 'left',},
  34. {field: 'timeCreate', title: '上报时间', align: 'left', formatter: 'tsymds'},
  35. ]],
  36. }
  37. },
  38. buttons: [
  39. {
  40. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  41. $dlgLog.dialog('close');
  42. // $dlgLog.window('close');
  43. }
  44. }
  45. ]
  46. };
  47. };
  48. });