dialogDetail2.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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: '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: 'msStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
  55. if (row.rowData.reportStatus == 0) {
  56. return "<span style='color: #ffb717;'>未上报<span>";
  57. } else if (value == 1) {
  58. return "<span style='color: green;'>正常<span>";
  59. } else {
  60. return "<span style='color: red;'>异常<span>";
  61. }
  62. }
  63. },
  64. {field: 'temperature', title: '温度', maxWidth: 100, align: 'right',},
  65. {field: 'bingqingDesc', title: '病情表述', maxWidth: 300, align: 'left',},
  66. {field: 'isContactDesc', title: '密切接触人员', align: 'left',formatter: function (value) {
  67. if (value == "正常") {
  68. return "<span style='color: green;'>正常<span>";
  69. } else {
  70. return "<span style='color: red;'>异常<span>";
  71. }
  72. }
  73. },
  74. {field: 'isSuspectedDesc', title: '家人健康异常', align: 'left',formatter: function (value) {
  75. if (value == "否") {
  76. return "<span style='color: green;'>否<span>";
  77. } else {
  78. return "<span style='color: red;'>是<span>";
  79. }
  80. }
  81. },
  82. {field: 'workLoalDesc', title: '工作驻地', maxWidth: 100, align: 'left',},
  83. {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 100, align: 'left',},
  84. {field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center',formatter: function (value) {
  85. if (value == 0) {
  86. return "<span style='color: green;'>否<span>";
  87. } else {
  88. return "<span style='color: #ff6d02;'>是<span>";
  89. }
  90. }
  91. },
  92. {field: 'tripDetDesc', title: '出行详细', align: 'left'},
  93. ]],
  94. }
  95. },
  96. buttons: [
  97. {
  98. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  99. $dlg.dialog('close');
  100. }
  101. }
  102. ]
  103. }
  104. ;
  105. };
  106. });