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 "未上报"; } else { return "已上报"; } } }, { field: 'msStatus', title: '上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) { if (row.rowData.reportStatus == 0) { return "未上报"; } else if (value == 1) { return "正常"; } else { return "异常"; } } }, {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: 'autoLocal', title: '定位地区', maxWidth: 200, align: 'left',}, {field: 'autoAddr', title: '定位地址', maxWidth: 200, align: 'left',}, {field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center',formatter: function (value) { if (value == 0) { return ""; } else { return ""; } } }, {field: 'tripDetDesc', title: '出行详细', align: 'left'} ]], } }, buttons: [ { text: "关闭", iconCls: "fa fa-times", onClick: function () { $dlg.dialog('close'); } } ] } ; }; });