123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- export default {
- title: '${title}',
- layout: 'fit',
- referenceHolder: true,
- items: [
- {
- layout: 'border',
- items: [
- {
- region: 'center',
- xtype: 'yvgrid',
- layout: 'fit',
- reference: 'grid1',
- <#if pagination?? && pagination>
- pagination: true,
- <#else>
- pagination: false,
- </#if>
- selModel: {
- selType: 'rowmodel',
- mode: 'SINGLE',
- },
- dataSource: {
- method: 'invoke',
- url: '${invokeUrl}',
- params: {
- <#if queryList??>
- <#list queryList as query>
- ${query.columnName} : '{queryGrid1.${query.columnName}}',
- </#list>
- </#if>
- },
- },
- listeners: {
- selectionchange: 'scope.grid1Select'
- },
- tbar: {
- xtype: 'toolbar',
- items: [
- <#if editType?? && editType != 1>
- {
- xtype: 'button',
- text: '添加',
- iconCls: 'x-fa fa-plus',
- listeners: {
- click: 'scope.add'
- },
- },
- {
- xtype: 'button',
- text: '编辑',
- iconCls: 'x-fa fa-edit',
- bind: {
- disabled: '{grid1.selection === null}'
- },
- listeners: {
- click: 'scope.edit'
- }
- },
- </#if>
- <#if delete?? && delete>
- {
- xtype: 'button',
- text: '删除',
- iconCls: 'x-fa fa-remove',
- bind: {
- disabled: '{grid1.selection === null}'
- },
- listeners: {
- click: 'scope.remove'
- },
- },
- </#if>
- {
- xtype: 'button',
- text: '保存',
- iconCls: 'x-fa fa-save',
- bind: {
- disabled: '{grid1.selection === null}'
- },
- listeners: {
- click: 'scope.save'
- },
- },
- ]
- },
- columns: [
- {
- xtype: "rownumberer",
- header: "序号"
- },
- <#if columnList??>
- <#list columnList as column>
- <#switch column.componentType>
- <#case 1>
- {
- dataIndex: "dict_type",
- header: "字典类别",
- fix: ['system.getDict("DICT_TYPE")']
- },
- <#break>
- <#case 2>
- { dataIndex: ${column.columnName}, header: ${column.chineseName}, },
- <#break>
- <#default>
- { dataIndex: ${column.columnName}, header: ${column.chineseName}, },
- </#switch>
- </#list>
- </#if>
- ]
- }
- ]
- }
- ]
- }
|