123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- export default {
- title: '${menuName!"默认名称4"}',
- 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!""}@query',
- params: {
- <#if queryList??>
- <#list queryList as query>
- ${query.columnName} : '{queryGrid1.${query.columnName}}',
- </#list>
- </#if>
- },
- },
- <#if editType != 1 || delete>
- listeners: {
- selectionchange: 'scope.grid1Select'
- },
- </#if>
- tbar: {
- xtype: 'toolbar',
- items: [
- <#switch editType>
- <#case 1>
- <#break>
- <#case 2>
- {
- xtype: 'button',
- text: '添加',
- iconCls: 'x-fa fa-plus',
- listeners: {
- click: 'scope.add'
- },
- },
- <#break>
- <#case 3>
- {
- 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'
- }
- },
- <#break>
- <#default>
- </#switch>
- <#if delete?? && delete>
- {
- xtype: 'button',
- text: '删除',
- iconCls: 'x-fa fa-remove',
- bind: {
- disabled: '{grid1.selection === null}'
- },
- listeners: {
- click: 'scope.remove'
- },
- },
- </#if>
- <#if editType != 1 || delete>
- {
- xtype: 'button',
- text: '保存',
- iconCls: 'x-fa fa-save',
- bind: {
- },
- listeners: {
- click: 'scope.save'
- },
- },
- </#if>
- ]
- },
- columns: [
- {
- xtype: "rownumberer",
- header: "序号"
- },
- <#if columnList??>
- <#list columnList as column>
- <#switch column.componentType>
- <#case 1>
- { dataIndex: "${column.columnName}", header: "${column.chineseName}", fix: ['system.getDict("${column.dictKey}")'],
- <#break>
- <#case 2>
- { dataIndex: "${column.columnName}", header: "${column.chineseName}",
- <#break>
- <#default>
- { dataIndex: "${column.columnName}", header: "${column.chineseName}",
- </#switch>
- <#if editorList?seq_contains(column.columnName)>
- editor: {
- <#if column.componentType == 1>
- xtype : 'combo',
- fix: ['system.getDict("DICT_TYPE")']
- <#elseif column.componentType == 2>
- xtype : 'textfield',
- </#if>
- }
- </#if>
- },
- </#list>
- </#if>
- ]
- }
- ]
- }
- ]
- }
|