Ext.define('saas.view.main.Main', {
extend: 'Ext.container.Container',
xtype: 'main',
requires: [
'Ext.list.Tree',
'Ext.Img'
],
controller: 'main',
viewModel: 'main',
cls: 'main-ct',
id: 'mainView',
itemId: 'mainView',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
{
xtype: 'toolbar',
cls: 'main-headerbar shadow',
height: 64,
itemId: 'headerBar',
items: [
{
xtype: 'component',
reference: 'mainLogo',
cls: 'main-logo-wrap',
html: '

优企云服
',
bind: {
width: '{navWidth}'
}
},
{
margin: '0 0 0 8',
ui: 'header',
iconCls:'x-fa fa-navicon',
id: 'main-navigation-btn',
handler: 'onToggleNavigationSize'
},{
reference: 'mainprofile',
arrowVisible: false,
ui: 'header',
bind: {
text: '{company.name}'
},
menu: {
items: [{
xtype: 'menuseparator'
}]
}
},
'->',
{
iconCls:'icon-usoftchina',
ui: 'header',
tooltip: '优软云',
handler:function(){
window.open('http://www.usoftchina.com','_blank');
}
},
{
iconCls:'x-fa fa-question',
ui: 'header',
arrowVisible: false,
tooltip: '帮助',
width:50,
menu: {
cls:'x-main-menu',
items: [{
text: '新手导航',
iconCls:'x-fa fa-comment-o',
handler:function(){
openTab('sys-guide-formpanel','新手导航', 'sys-guide-formpanel-nav');
}
},{
text: '用户手册',
iconCls:'x-fa fa-comment-o',
handler:function(){
window.open('http://www.usoftchina.com','_blank');
}
},{
text: '常见问题',
iconCls:'x-fa fa-question-circle-o',
handler:function(){
window.open('http://www.usoftchina.com','_blank');
}
},{
text: '客服热线',
iconCls:'x-fa fa-comment-o',
menu:{
items:[{
text:'优软科技官网'
},{
text:'电话:400-830-1818'
},{
text:'邮箱:info@usoftchina.com'
}]
}
}]
}
},
{
margin: '0 0 0 0',
xtype: 'tbtext',
cls:'nav-realname',
bind: {
//tooltip: '{account.realname}',
html: '{account.realname}'
},
style:{
cursor:'default',
textAlign:'center'
}
},
{
ui: 'header',
arrowVisible: false,
id:"userImage",
width: 50,
height:50,
bind: {
html:''
},
menu: {
cls:'x-main-menu2',
items: [ {
text: '账户中心',
iconCls:'x-fa x-fa fa-user-o',
handler:function(){
window.open('http://www.usoftchina.com','_blank');
}
},{
text: '意见反馈',
iconCls:'x-fa fa-comment-o',
handler:'feedbackMsg'
}, {
text: '退出',
iconCls:'x-fa fa-power-off',
handler: 'onLogout'
}]
} ,
listeners:{
'mouseover':function(btn){
btn.menu ? (btn.menu.isVisible() ? '' : btn.showMenu()) : '';
},
'mouseout':function(btn,e){
window.setTimeout(function(){
var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
var btnLayout = btn.el.dom.getBoundingClientRect();
if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
btn.hideMenu();
}
}, 10);
}
}
}
]
},
{
xtype: 'maincontainerwrap'
}
]
});