Ext.define('erp.view.ma.Optimize',{
extend: 'Ext.Viewport',
layout: 'anchor',
hideBorders: true,
initComponent : function(){
var me = this;
Ext.apply(me, {
items: [{
xtype: 'grid',
id: 'check-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: 'value',
flex: 10
},{
text: '',
dataIndex: 'check',
flex: 1,
renderer: function(val, meta, record) {
meta.tdCls = val;
return '';
}
},{
text: '',
dataIndex: 'link',
flex: 1,
renderer: function(val, meta, record, x, y, store) {
var idx = store.indexOf(record);
meta.style = 'color:blue;text-decoration: underline;cursor: pointer;';
return '优化';
}
}],
columnLines: true,
store: Ext.create('Ext.data.Store',{
fields: [{name: 'action', type: 'string'}, {name: 'value', type: 'string'}, {name: 'detail', type: 'string'}],
data: [{
action: 'ma/kill_sys.action',
value: '修复系统跨资源死锁'
},{
action: 'ma/kill_dblock.action',
value: '清除数据库锁定进程'
},{
action: 'ma/kill_cache.action',
value: '清除系统缓存'
},{
action: 'ma/kill_dbnouse.action',
value: '清除无效数据',
detail: '1.明细无主表数据
2.临时表数据'
},{
action: 'ma/update_seq.action',
value: '更新数据库序列LAST_NUMBER'
},{
type: 'turn_icq',
action: 'oa/info/turnHistory.action',
value: '已查阅寻呼转入寻呼历史表,加速检索'
}]
}),
plugins: [{
ptype: 'rowexpander',
rowBodyTpl : [
'