| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- 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 '<a href="javascript:Ext.getCmp(\'update-grid\').uninstall(' + index + ');">卸载</a>';
- }
- return '<a href="javascript:Ext.getCmp(\'update-grid\').install(' + index + ');">安装</a>';
- }
- } ],
- 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);
- }
- });
|