dialogDetail.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. define(function (require) {
  2. return function (context) {
  3. var $dlg, $grid;
  4. function queryGrid1() {
  5. $grid.reload({
  6. mtype: 'GET',
  7. url: api('/sweepCode/selectLingyunUserHistory'),
  8. queryParams: {userId: context.userId}
  9. }, true);
  10. }
  11. return {
  12. xtype: 'dialog',
  13. dialogId: 'dialogDetail',
  14. title: '历史上报' + context.linkman,
  15. width: '85%',
  16. height: '60%',
  17. onOpen: function () {
  18. $dlg = $(this);
  19. },
  20. center: {
  21. items: {
  22. onRender: function () {
  23. $grid = $(this);
  24. queryGrid1();
  25. },
  26. xtype: 'grid',
  27. idField: "userId",
  28. pagination: false,
  29. columns: [[
  30. {field: 'reportDate', title: '上报时间', align: 'left', formatter: 'tsymd'},
  31. {field: 'userId', title: '用户ID', hidden: true},
  32. // {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
  33. {
  34. field: 'reportStatus', title: '上报', maxWidth: 100, align: 'center', formatter: function (value) {
  35. if (value == 0) {
  36. return "<span style='color: #ffb717;'>未上报<span>";
  37. } else {
  38. return "<span style='color: green;'>已上报<span>";
  39. }
  40. }
  41. },
  42. {
  43. field: 'msStatus', title: '上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
  44. if (row.rowData.reportStatus == 0) {
  45. return "<span style='color: #ffb717;'>未上报<span>";
  46. } else if (value == 1) {
  47. return "<span style='color: green;'>正常<span>";
  48. } else {
  49. return "<span style='color: red;'>异常<span>";
  50. }
  51. }
  52. },
  53. {field: 'temperature', title: '温度', maxWidth: 100, align: 'right',},
  54. {field: 'bingqingDesc', title: '病情表述', maxWidth: 300, align: 'left',},
  55. {field: 'workLoalDesc', title: '工作驻地', maxWidth: 100, align: 'left',},
  56. {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 100, align: 'left',},
  57. {field: 'autoLocal', title: '定位地区', maxWidth: 200, align: 'left',},
  58. {field: 'autoAddr', title: '定位地址', maxWidth: 200, align: 'left',},
  59. {field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center',formatter: function (value) {
  60. if (value == 0) {
  61. return "<span style='color: green;'>否<span>";
  62. } else {
  63. return "<span style='color: #ff6d02;'>是<span>";
  64. }
  65. }
  66. },
  67. {field: 'tripDetDesc', title: '出行详细', align: 'left'},
  68. {field: 'isContactDesc', title: '家人确诊或接触', align: 'left',formatter: function (value) {
  69. if (value == "否") {
  70. return "<span style='color: green;'>否<span>";
  71. } else {
  72. return "<span style='color: red;'>是<span>";
  73. }
  74. }
  75. },
  76. ]],
  77. }
  78. },
  79. buttons: [
  80. {
  81. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  82. $dlg.dialog('close');
  83. }
  84. }
  85. ]
  86. }
  87. ;
  88. };
  89. });