LoginLog.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * 登录日志
  3. */
  4. Ext.define('saas.view.statistical.LoginLog', {
  5. extend: 'saas.view.core.base.BasePanel',
  6. xtype: 'statistical-loginlog',
  7. initComponent: function () {
  8. Ext.apply(this, {
  9. searchField: [{
  10. xtype: "textfield",
  11. name: "username",
  12. emptyText: '用户名/手机号',
  13. getCondition: function (v) {
  14. return "(upper(CONCAT(username, '#', mobile) like '%" + v.toUpperCase() + "%' ))";
  15. },
  16. }],
  17. gridConfig: {
  18. dataUrl: '/api/operation/data/getLogin',
  19. // dataUrl: 'http://10.1.80.35:9040/data/getLogin',
  20. columns: [{
  21. text: 'id',
  22. dataIndex: 'account_id',
  23. hidden: true
  24. }, {
  25. text: '用户名',
  26. dataIndex: 'username',
  27. width: 120
  28. }, {
  29. text: '手机号',
  30. dataIndex: 'mobile',
  31. width: 120
  32. }, {
  33. text: '近三月登录次数',
  34. dataIndex: 'login_num',
  35. width: 120
  36. }, {
  37. text: '最后登录时间',
  38. dataIndex: 'lastesttime',
  39. width: 180,
  40. xtype: 'datecolumn',
  41. renderer: function(v, m, r) {
  42. return Ext.Date.format(new Date(v), 'Y-m-d H:i:s');
  43. }
  44. }]
  45. },
  46. });
  47. this.callParent(arguments);
  48. }
  49. });