|
@@ -2,6 +2,80 @@ export default {
|
|
title: '${menuName!"默认名称4"}',
|
|
title: '${menuName!"默认名称4"}',
|
|
layout: 'fit',
|
|
layout: 'fit',
|
|
referenceHolder: true,
|
|
referenceHolder: true,
|
|
|
|
+ tbar: {
|
|
|
|
+ xtype: 'toolbar',
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ xtype: 'button',
|
|
|
|
+ text: '刷新',
|
|
|
|
+ iconCls: 'x-fa fa-plus',
|
|
|
|
+ listeners: {
|
|
|
|
+ click: 'scope.refresh'
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ <#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>
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
items: [
|
|
items: [
|
|
{
|
|
{
|
|
layout: 'border',
|
|
layout: 'border',
|
|
@@ -36,72 +110,6 @@ export default {
|
|
selectionchange: 'scope.grid1Select'
|
|
selectionchange: 'scope.grid1Select'
|
|
},
|
|
},
|
|
</#if>
|
|
</#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: [
|
|
columns: [
|
|
{
|
|
{
|
|
xtype: "rownumberer",
|
|
xtype: "rownumberer",
|