Summary1.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Ext.define('uas.view.grid.summary.Summary1', {
  2. extend: 'uas.view.grid.basic.Panel',
  3. xtype: 'summary1',
  4. features: [{
  5. ftype: 'summary',
  6. dock: 'bottom'
  7. }],
  8. columns: [{
  9. text: 'Company',
  10. width: 600,
  11. dataIndex: 'name',
  12. summaryType: 'count',
  13. summaryRenderer: function(value, summaryData, dataIndex) {
  14. return Ext.String.format('共有{0}条数据', value);
  15. }
  16. }, {
  17. text: 'Price',
  18. width: 150,
  19. formatter: 'usMoney',
  20. dataIndex: 'price',
  21. summaryType: 'average',
  22. summaryRenderer: function(value, summaryData, dataIndex) {
  23. return Ext.String.format('平均价格:{0}', Ext.util.Format.usMoney(value));
  24. }
  25. }, {
  26. text: 'Change',
  27. width: 80,
  28. renderer: 'renderChange',
  29. dataIndex: 'priceChange'
  30. }, {
  31. text: '% Change',
  32. width: 100,
  33. renderer: 'renderPercent',
  34. dataIndex: 'priceChangePct'
  35. }, {
  36. text: 'Last Updated',
  37. width: 115,
  38. formatter: 'date("m/d/Y")',
  39. dataIndex: 'priceLastChange'
  40. }, {
  41. xtype: 'actioncolumn',
  42. width: 50,
  43. menuDisabled: true,
  44. sortable: false,
  45. items: [{
  46. iconCls: 'x-fa fa-check green',
  47. handler: 'onApprove'
  48. }, {
  49. iconCls: 'x-fa fa-ban red',
  50. handler: 'onDecline'
  51. }]
  52. }]
  53. });