|
@@ -0,0 +1,83 @@
|
|
|
+define(function (require) {
|
|
|
+ return function (context) {
|
|
|
+
|
|
|
+ var $dlg, $grid;
|
|
|
+
|
|
|
+ function queryGrid1() {
|
|
|
+ $grid.reload({
|
|
|
+ mtype: 'GET',
|
|
|
+ url: api('/sweepCode/selectLingyunUserHistory'),
|
|
|
+ queryParams: {userId: context.userId}
|
|
|
+ }, true);
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ xtype: 'dialog',
|
|
|
+ dialogId: 'dialogDetail',
|
|
|
+ title: '历史上报' + context.linkman,
|
|
|
+ width: '80%',
|
|
|
+ height: '60%',
|
|
|
+ onOpen: function () {
|
|
|
+ $dlg = $(this);
|
|
|
+ },
|
|
|
+ center: {
|
|
|
+ items: {
|
|
|
+ onRender: function () {
|
|
|
+ $grid = $(this);
|
|
|
+ queryGrid1();
|
|
|
+ },
|
|
|
+ xtype: 'grid',
|
|
|
+ idField: "userId",
|
|
|
+ pagination: false,
|
|
|
+ columns: [[
|
|
|
+ {field: 'reportDate', title: '上报时间', align: 'left', formatter: 'tsymd'},
|
|
|
+ {field: 'userId', title: '用户ID', hidden: true},
|
|
|
+ // {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
|
|
|
+ {
|
|
|
+ field: 'reportStatus', title: '上报', maxWidth: 100, align: 'center', formatter: function (value) {
|
|
|
+ if (value == 0) {
|
|
|
+ return "<span style='color: #ffb717;'>未上报<span>";
|
|
|
+ } else {
|
|
|
+ return "<span style='color: green;'>已上报<span>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'msStatus', title: '上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
|
|
|
+ if (row.rowData.reportStatus == 0) {
|
|
|
+ return "<span style='color: #ffb717;'>未上报<span>";
|
|
|
+ } else if (value == 1) {
|
|
|
+ return "<span style='color: green;'>正常<span>";
|
|
|
+ } else {
|
|
|
+ return "<span style='color: red;'>异常<span>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {field: 'temperature', title: '温度', maxWidth: 100, align: 'right',},
|
|
|
+ {field: 'bingqingDesc', title: '病情表述', maxWidth: 300, align: 'left',},
|
|
|
+ {field: 'workLoalDesc', title: '工作驻地', maxWidth: 100, align: 'left',},
|
|
|
+ {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 100, align: 'left',},
|
|
|
+ {field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center',formatter: function (value) {
|
|
|
+ if (value == 0) {
|
|
|
+ return "<span style='color: green;'>否<span>";
|
|
|
+ } else {
|
|
|
+ return "<span style='color: #ff6d02;'>是<span>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {field: 'tripDetDesc', title: '出行详细', align: 'left'}
|
|
|
+
|
|
|
+ ]],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: "关闭", iconCls: "fa fa-times", onClick: function () {
|
|
|
+ $dlg.dialog('close');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ;
|
|
|
+ };
|
|
|
+});
|