| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- /*
- * @Description:
- * @Author: hy
- * @Date: 2019-08-13 11:39:00
- * @LastEditTime: 2019-08-16 15:14:40
- */
- Ext.define('uas.view.grid.basic.Panel', {
- extend: 'Ext.grid.Panel',
- xtype: 'basic-grid',
- controller: 'basic-grid',
- stateful: true,
- multiSelect: true,
- stateId: 'stateGrid',
- headerBorders: false,
- viewModel: {
- stores: {
- companies: {
- type: 'companies',
- autoLoad: true,
- }
- }
- },
- viewConfig: {
- enableTextSelection: true
- },
- bind: '{companies}',
- columns: [{
- text: 'Company',
- flex: 1,
- dataIndex: 'name'
- }, {
- text: 'Price',
- width: 95,
- formatter: 'usMoney',
- dataIndex: 'price'
- }, {
- text: 'Change',
- width: 80,
- renderer: 'renderChange',
- dataIndex: 'priceChange'
- }, {
- text: '% Change',
- width: 100,
- renderer: 'renderPercent',
- dataIndex: 'priceChangePct'
- }, {
- text: 'Last Updated',
- width: 115,
- formatter: 'date("m/d/Y")',
- dataIndex: 'priceLastChange'
- }, {
- xtype: 'actioncolumn',
- width: 50,
- menuDisabled: true,
- sortable: false,
- items: [{
- iconCls: 'x-fa fa-check green',
- handler: 'onApprove'
- }, {
- iconCls: 'x-fa fa-ban red',
- handler: 'onDecline'
- }]
- }],
- signTpl: '<span style="' +
- 'color:{value:sign(\'"#cf4c35"\',\'"#73b51e"\')}"' +
- '>{text}</span>'
- });
|