DataListPanel.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*
  2. * @Description: 数据列表
  3. * @Author: hy
  4. * @Date: 2019-08-12 18:33:04
  5. * @LastEditTime: 2019-08-16 18:18:07
  6. */
  7. Ext.define('uas.view.grid.dataList.DataListPanel', {
  8. extend: 'Ext.grid.Panel',
  9. xtype: 'dataListPanel',
  10. plugins: {
  11. gridHeaderFilter: true
  12. },
  13. emptyText: '无数据',
  14. loadMask: true,
  15. viewModel:{
  16. stores: {
  17. dataListGridStore:{
  18. type: 'dataListGridStore',
  19. autoLoad: true,
  20. autoDestroy: true
  21. }
  22. },
  23. },
  24. bind:'{dataListGridStore}',
  25. // Dispatch named listener and handler methods to this instance
  26. defaultListenerScope: true,
  27. tbar: {
  28. name:'filterToolbar',
  29. height:46,
  30. items:['->']
  31. },
  32. columns: [{
  33. dataIndex: 'id',
  34. text: 'Id',
  35. width:50,
  36. locked: true
  37. // Specify that this column has an associated Filter. This is
  38. // processed by the gridfilters plugin. If this is a string,
  39. // this is the type of filter to apply.
  40. // filter: 'number'
  41. }, {
  42. dataIndex: 'company',
  43. text: 'Company',
  44. width:150,
  45. flex: 1,
  46. locked: true,
  47. // As an object, the type property indicates the type of filter to
  48. // apply. All other properties configure that filter instance.
  49. filter: {
  50. type:'string'
  51. }
  52. }, {
  53. dataIndex: 'price',
  54. text: 'Price',
  55. formatter: 'usMoney',
  56. flex: 1,
  57. filter: {
  58. type:'number'
  59. }
  60. }, {
  61. dataIndex: 'size',
  62. text: 'Size',
  63. flex: 1,
  64. filter: {
  65. type:'combo',
  66. combo:[
  67. ["small", "小"],
  68. ["medium", "中"],
  69. ["large", "大"],
  70. ["extra large", "最大"]
  71. ]
  72. }
  73. }, {
  74. xtype: 'datecolumn',
  75. dataIndex: 'date',
  76. text: 'Date',
  77. flex: 1,
  78. filter: {
  79. type:'date'
  80. }
  81. }, {
  82. dataIndex: 'visible',
  83. text: 'Visible',
  84. flex: 1,
  85. filter: {
  86. type:'combo',
  87. combo:[
  88. ["true", "是"],
  89. ["false", "否"]
  90. ]
  91. }
  92. }]
  93. });