dialogDetail.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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: 'isContactDesc', title: '家人确诊或接触', align: 'left',formatter: function (value) {
  56. if (value == "否") {
  57. return "<span style='color: green;'>否<span>";
  58. } else {
  59. return "<span style='color: red;'>是<span>";
  60. }
  61. }
  62. },
  63. {field: 'isSuspectedDesc', title: '家人健康异常', align: 'left',formatter: function (value) {
  64. if (value == "否") {
  65. return "<span style='color: green;'>否<span>";
  66. } else {
  67. return "<span style='color: red;'>是<span>";
  68. }
  69. }
  70. },
  71. {field: 'workLoalDesc', title: '工作驻地', maxWidth: 100, align: 'left',},
  72. {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 100, align: 'left',},
  73. {field: 'autoLocal', title: '定位地区', maxWidth: 200, align: 'left',},
  74. {field: 'autoAddr', title: '定位地址', maxWidth: 200, align: 'left',},
  75. {field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center',formatter: function (value) {
  76. if (value == 0) {
  77. return "<span style='color: green;'>否<span>";
  78. } else {
  79. return "<span style='color: #ff6d02;'>是<span>";
  80. }
  81. }
  82. },
  83. {field: 'tripDetDesc', title: '出行详细', align: 'left'},
  84. ]],
  85. }
  86. },
  87. buttons: [
  88. {
  89. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  90. $dlg.dialog('close');
  91. }
  92. }
  93. ]
  94. }
  95. ;
  96. };
  97. });