123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- export default {
- title: '{{ pageTitle }}',
- layout: 'fit',
- referenceHolder: true,
- tbar: {
- xtype: 'toolbar',
- items: [
- {
- xtype: 'button',
- text: '刷新',
- iconCls: 'fa fa-refresh',
- listeners: {
- click: 'scope.refresh',
- },
- },
- {{#if addButton}}
- {
- xtype: 'button',
- text: '添加',
- iconCls: 'x-fa fa-plus',
- listeners: {
- click: 'scope.add',
- },
- },
- {{/if}}
- {{#if deleteButton}}
- {
- xtype: 'button',
- text: '删除',
- iconCls: 'x-fa fa-remove',
- bind: {
- disabled: '{grid1.selection === null}',
- },
- listeners: {
- click: 'scope.remove',
- },
- },
- {{/if}}
- {{#if saveButton}}
- {
- xtype: 'button',
- text: '保存',
- iconCls: 'x-fa fa-save',
- bind: {
- disabled: '{!grid1.ischanged}',
- },
- listeners: {
- click: 'scope.save',
- },
- },
- {{/if}}
- ]
- },
- items: [
- {
- layout: 'border',
- items: [
- {
- region: 'center',
- xtype: 'yvgrid',
- layout: 'fit',
- reference: 'grid1',
- pagination: {{ pagination }},
- selModel: {
- selType: 'rowmodel',
- mode: 'SINGLE',
- },
- dataSource: {
- method: 'invoke',
- url: '{{{ invokeUrlPrefix }}}@{{#if pagination }}queryByPage{{else}}query{{/if}}',
- params: {},
- },
- listeners: {
- selectionchange: 'scope.grid1Select',
- },
- columns: [
- {
- xtype: "rownumberer",
- header: "序号",
- width: 50,
- },
- {{#each gridColumns}}
- {
- dataIndex: "{{ dataIndex }}",
- header: "{{ header }}",
- {{#with fix}}{{#if dictName}}fix: ['system.getDict("{{dictName}}")'],{{/if}}{{/with}}
- {{#with editor}}
- editor: {
- {{#if xtype}}xtype: '{{xtype}}',{{/if}}
- {{#with fix}}{{#if dictName}}fix: ['system.getDict("{{dictName}}")'],{{/if}}{{/with}}
- },
- {{/with}}
- },
- {{/each}}
- ],
- },
- ],
- },
- ],
- }
|