| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- /*
- * @Description: 数据列表
- * @Author: hy
- * @Date: 2019-08-12 18:33:04
- * @LastEditTime: 2019-08-13 14:19:02
- */
- 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',
- width:50,
- // 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,
- filter: {
- type:'combo',
- combo:[
- ["true", "是"],
- ["false", "否"]
- ]
- }
- }]
- });
|