/** * 出入校记录 */ Ext.define('school.view.interaction.access.List', { extend: 'school.view.core.base.BasePanel', xtype: 'interaction-access-list', dataUrl: '/api/school/record/list', initComponent: function () { var me = this; Ext.apply(this, { searchField: [{ xtype: 'textfield', name: 'keyword', fieldLabel: '姓名' }], caller: null, _formXtype: null, _title: null, _deleteUrl: null, _batchOpenUrl: null, _batchCloseUrl: null, _batchDeleteUrl: null, gridConfig: { idField: null, codeField: null, statusCodeField: null, dataUrl: me.dataUrl, caller: null, rootProperty: 'data.list', totalProperty: 'data.total', actionColumn: [], selModel: { type: 'cellmodel' }, hiddenTools: true, disableDetail: true, toolBtns: [], columns: [{ text: 'id', dataIndex: 'record_id', hidden: true }, { text: '类型', dataIndex: 'record_name' }, { text: '学号', dataIndex: 'stu_number' }, { text: '姓名', dataIndex: 'stu_name' }, { text: '年级', dataIndex: 'grade_name' }, { text: '班级', dataIndex: 'clazz_name' }, { text: '时间', dataIndex: 'in_date', xtype: 'datecolumn', format: 'Y-m-d H:i:s', width: 150, renderer: function(v, m, r) { if(r.get('record_name') == '入校记录') { return r.get('in_date'); }else { return r.get('out_date'); } } }] }, }); this.callParent(arguments); } });