export default { title: '${menuName!"默认名称1"}', layout: 'fit', referenceHolder: true, items: [ { layout: 'border', items: [ { region: 'center', xtype: 'yvgrid', layout: 'fit', reference: 'grid1', <#if pagination?? && pagination> pagination: true, <#else> pagination: false, selModel: { selType: 'rowmodel', mode: 'SINGLE', }, dataSource: { method: 'invoke', url: '${invokeUrl!""}@query', params: { <#if queryList??> <#list queryList as query> ${query.columnName} : '{queryGrid1.${query.columnName}}', }, }, <#if editType != 1 || delete> listeners: { selectionchange: 'scope.grid1Select' }, 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> <#if delete?? && delete> { xtype: 'button', text: '删除', iconCls: 'x-fa fa-remove', bind: { disabled: '{grid1.selection === null}' }, listeners: { click: 'scope.remove' }, }, <#if editType != 1 || delete> { xtype: 'button', text: '保存', iconCls: 'x-fa fa-save', bind: { }, listeners: { click: 'scope.save' }, }, ] }, 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}", <#if editorList?seq_contains(column.columnName)> editor: { <#if column.componentType == 1> xtype : 'combo', fix: ['system.getDict("DICT_TYPE")'] <#elseif column.componentType == 2> xtype : 'textfield', } }, ] } ] } ] }