dialogDetail7.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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: '80%',
  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: 'living', title: '居家2公里', maxWidth: 100, align: 'center', formatter: function (value) {
  44. if (value == 1) {
  45. return "<span style='color: green;'>是<span>";
  46. } else if (value == 2) {
  47. return "<span style='color: red;'>否<span>";
  48. } else {
  49. return "";
  50. }
  51. }
  52. },
  53. {
  54. field: 'travelRecords', title: '出行轨迹', maxWidth: 100, align: 'center', formatter: function (value) {
  55. if (value == 1) {
  56. return "<span style='color: green;'>是<span>";
  57. } else if (value == 2) {
  58. return "<span style='color: red;'>否<span>";
  59. } else {
  60. return "";
  61. }
  62. }
  63. },
  64. {
  65. field: 'msStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
  66. if (row.rowData.reportStatus == 0) {
  67. return "<span style='color: #ffb717;'>未上报<span>";
  68. } else if (value == 1) {
  69. return "<span style='color: green;'>正常<span>";
  70. } else {
  71. return "<span style='color: red;'>异常<span>";
  72. }
  73. }
  74. },
  75. {field: 'temperature', title: '温度', maxWidth: 100, align: 'right',},
  76. {field: 'bingqingDesc', title: '病情表述', maxWidth: 300, align: 'left',},
  77. {
  78. field: 'isContactDesc', title: '密切接触人员', align: 'left', formatter: function (value) {
  79. if (value == "正常") {
  80. return "<span style='color: green;'>正常<span>";
  81. } else {
  82. return "<span style='color: red;'>异常<span>";
  83. }
  84. }
  85. },
  86. {
  87. field: 'isSuspectedDesc', title: '家人健康异常', align: 'left', formatter: function (value) {
  88. if (value == "否") {
  89. return "<span style='color: green;'>否<span>";
  90. } else {
  91. return "<span style='color: red;'>是<span>";
  92. }
  93. }
  94. },
  95. {field: 'workLoalDesc', title: '工作驻地', maxWidth: 100, align: 'left',},
  96. {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 100, align: 'left',},
  97. {field: 'autoLocal', title: '定位地区', maxWidth: 200, align: 'left',},
  98. {field: 'autoAddr', title: '定位地址', maxWidth: 200, align: 'left',},
  99. {
  100. field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center', formatter: function (value) {
  101. if (value == 0) {
  102. return "<span style='color: green;'>否<span>";
  103. } else {
  104. return "<span style='color: #ff6d02;'>是<span>";
  105. }
  106. }
  107. },
  108. {field: 'tripDetDesc', title: '出行详细', align: 'left'},
  109. ]],
  110. }
  111. },
  112. buttons: [
  113. {
  114. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  115. $dlg.dialog('close');
  116. }
  117. }
  118. ]
  119. }
  120. ;
  121. };
  122. });