Ext.define('erp.view.ma.SysUpdate', {
extend : 'Ext.Viewport',
layout : 'anchor',
hideBorders : true,
initComponent : function() {
var me = this;
Ext.apply(me, {
items : [ {
xtype : 'grid',
id : 'update-grid',
anchor : '100% 100%',
tbar : [ '->', {
cls : 'x-btn-blue',
id : 'check',
text : '一键安装',
width : 80,
margin : '0 0 0 50'
}, {
cls : 'x-btn-blue',
id : 'close',
text : $I18N.common.button.erpCloseButton,
width : 80,
margin : '0 0 0 5'
}, '->' ],
columns : [ {
text : '系统版本',
dataIndex : 'version',
flex : 1
}, {
text : '补丁版本',
dataIndex : 'name',
flex : 1
}, {
text : '类型',
dataIndex : 'type',
flex : 1
}, {
text : '描述',
dataIndex : 'desc',
flex : 4
}, {
text : '发布日期',
dataIndex : 'date',
xtype : 'datecolumn',
flex : 1.5
}, {
hidden: true,
dataIndex: 'files'
},{
dataIndex : 'installed',
flex : 1,
renderer : function(val, meta, record, x, y, store, view) {
var index = store.indexOf(record);
if (val) {
return '卸载';
}
return '安装';
}
} ],
columnLines : true,
store : Ext.create('Ext.data.Store', {
fields : [ {
name : 'version',
type : 'string'
}, {
name : 'name',
type : 'string'
}, {
name : 'type',
type : 'string'
}, {
name : 'desc',
type : 'string'
}, {
name : 'date',
type : 'string'
}, {
name: 'files',
type: 'string'
}, {
name : 'installed',
type : 'bool'
} ],
data : [],
groupField : 'installed',
sorters : [ {
property : 'date',
direction : 'DESC'
}, {
property : 'name',
direction : 'DESC'
} ]
}),
selModel : new Ext.selection.CellModel()
} ],
features : [ Ext.create('Ext.grid.feature.Grouping', {
startCollapsed : false,
groupHeaderTpl : '{name} ({rows.length})'
}) ]
});
me.callParent(arguments);
}
});