define(function (require) { return function (context) { var $dlgLog, $gridLog; function queryGrid1() { $gridLog.reload({ mtype: 'GET', url: api('/sweepCode/selectLogAddrHistory'), queryParams: {userId: context.userId, reportDate: context.reportDate} }, true); } return { xtype: 'dialog', dialogId: 'dialogDetailLog', title: '出行轨迹' + context.linkman + "-" + context.reportDate, width: '45%', height: '50%', onOpen: function () { $dlgLog = $(this); }, center: { items: { onRender: function () { $gridLog = $(this); queryGrid1(); }, xtype: 'grid', idField: "userId", pagination: true, columns: [[ // {field: 'reportDate', title: '上报时间', align: 'left', formatter: 'tsymd'}, {field: 'userId', title: '用户ID', hidden: true}, {field: 'city', title: '上报城市', maxWidth: 100, align: 'left',}, {field: 'addr', title: '详细地址', align: 'left',}, {field: 'timeCreate', title: '上报时间', align: 'left', formatter: 'tsymds'}, ]], } }, buttons: [ { text: "关闭", iconCls: "fa fa-times", onClick: function () { $dlgLog.dialog('close'); // $dlgLog.window('close'); } } ] }; }; });