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: '85%', 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: 'living', title: '居家2公里', maxWidth: 100, align: 'center', formatter: function (value) { if (value == 1) { return ""; } else if (value == 2) { 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: 'isContactDesc', title: '密切接触人员', align: 'left',formatter: function (value) { if (value == "正常") { return "正常"; } else { return "异常"; } } }, {field: 'isSuspectedDesc', title: '家人健康异常', align: 'left',formatter: function (value) { if (value == "否") { return ""; } else { return ""; } } }, {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 ""; } else { return ""; } } }, {field: 'tripDetDesc', title: '出行详细', align: 'left'}, ]], } }, buttons: [ { text: "关闭", iconCls: "fa fa-times", onClick: function () { $dlg.dialog('close'); } } ] } ; }; });