List.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /**
  2. * 出入校记录
  3. */
  4. Ext.define('school.view.interaction.access.List', {
  5. extend: 'school.view.core.base.BasePanel',
  6. xtype: 'interaction-access-list',
  7. dataUrl: '/api/school/record/list',
  8. initComponent: function () {
  9. var me = this;
  10. Ext.apply(this, {
  11. searchField: [{
  12. xtype: 'textfield',
  13. name: 'keyword',
  14. fieldLabel: '姓名'
  15. }],
  16. caller: null,
  17. _formXtype: null,
  18. _title: null,
  19. _deleteUrl: null,
  20. _batchOpenUrl: null,
  21. _batchCloseUrl: null,
  22. _batchDeleteUrl: null,
  23. gridConfig: {
  24. idField: null,
  25. codeField: null,
  26. statusCodeField: null,
  27. dataUrl: me.dataUrl,
  28. caller: null,
  29. rootProperty: 'data.list',
  30. totalProperty: 'data.total',
  31. actionColumn: [],
  32. selModel: {
  33. type: 'cellmodel'
  34. },
  35. hiddenTools: true,
  36. disableDetail: true,
  37. toolBtns: [],
  38. columns: [{
  39. text: 'id',
  40. dataIndex: 'record_id',
  41. hidden: true
  42. }, {
  43. text: '类型',
  44. dataIndex: 'record_name'
  45. }, {
  46. text: '学号',
  47. dataIndex: 'stu_number'
  48. }, {
  49. text: '姓名',
  50. dataIndex: 'stu_name'
  51. }, {
  52. text: '年级',
  53. dataIndex: 'grade_name'
  54. }, {
  55. text: '班级',
  56. dataIndex: 'clazz_name'
  57. }, {
  58. text: '时间',
  59. dataIndex: 'in_date',
  60. xtype: 'datecolumn',
  61. format: 'Y-m-d H:i:s',
  62. width: 150,
  63. renderer: function(v, m, r) {
  64. if(r.get('record_name') == '入校记录') {
  65. return r.get('in_date');
  66. }else {
  67. return r.get('out_date');
  68. }
  69. }
  70. }]
  71. },
  72. });
  73. this.callParent(arguments);
  74. }
  75. });