/* * @Description: 数据列表 * @Author: hy * @Date: 2019-08-12 18:33:04 * @LastEditTime: 2019-08-13 09:04:44 */ Ext.define('uas.view.grid.dataList.DataListPanel', { extend: 'Ext.grid.Panel', xtype: 'dataListPanel', requires: [ 'uas.view.plugins.gridHeaderFilter.GridHeaderFilter', 'uas.store.DataListGridStore' ], plugins: { gridHeaderFilter: true }, emptyText: '无数据', loadMask: true, stateful: true, // Set a stateId so that this grid's state is persisted. stateId: 'stateful-filter-grid', store: { type: 'dataListGridStore', url: 'data/grid/grid-filter.json', autoLoad: true, autoDestroy: true }, // Dispatch named listener and handler methods to this instance defaultListenerScope: true, tbar: { name:'filterToolbar', height:46, items:['->'] }, columns: [{ dataIndex: 'id', text: 'Id', flex:1, // Specify that this column has an associated Filter. This is // processed by the gridfilters plugin. If this is a string, // this is the type of filter to apply. // filter: 'number' }, { dataIndex: 'company', text: 'Company', flex: 1, // As an object, the type property indicates the type of filter to // apply. All other properties configure that filter instance. filter: { type:'string' } }, { dataIndex: 'price', text: 'Price', formatter: 'usMoney', flex: 1, filter: { type:'number' } }, { dataIndex: 'size', text: 'Size', flex: 1, filter: { type:'combo', combo:[ ["small", "小"], ["medium", "中"], ["large", "大"], ["extra large", "最大"] ] } }, { xtype: 'datecolumn', dataIndex: 'date', text: 'Date', flex: 1, filter: { type:'date' } }, { dataIndex: 'visible', text: 'Visible', flex: 1, }] });