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, selModel: { selType: 'rowmodel', mode: 'SINGLE', }, dataSource: { method: 'invoke', url: '${invokeUrl}', params: { <#if queryList??> <#list queryList as query> ${query.columnName} : '{queryGrid1.${query.columnName}}', }, }, 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 delete?? && delete> { xtype: 'button', text: '删除', iconCls: 'x-fa fa-remove', bind: { disabled: '{grid1.selection === null}' }, listeners: { click: 'scope.remove' }, }, { 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}, }, ] } ] } ] }