123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- 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 "<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: 'isContactDesc', title: '家人确诊或接触', align: 'left',formatter: function (value) {
- if (value == "否") {
- return "<span style='color: green;'>否<span>";
- } else {
- return "<span style='color: red;'>是<span>";
- }
- }
- },
- {field: 'isSuspectedDesc', title: '家人健康异常', align: 'left',formatter: function (value) {
- if (value == "否") {
- return "<span style='color: green;'>否<span>";
- } else {
- return "<span style='color: red;'>是<span>";
- }
- }
- },
- {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 "<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');
- }
- }
- ]
- }
- ;
- };
- });
|