| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- 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: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">优企云服</div></div>',
- 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:'<span onclick="javascript:window.open(\'http://www.usoftchina.com\');" style="text-decoration:underline;color:blue;">优软科技官网</span>'
- },{
- text:'<span>电话:400-830-1818</span>'
- },{
- text:'<span>邮箱:info@usoftchina.com</span>'
- }]
- }
- }]
- }
- },
- {
- 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:'<img class="x-img x-box-item x-toolbar-item x-img-header" style="height:35px;width:35px;margin-top: 6px;margin-left: 14px;" src="{avatarUrl}" alt="">'
- },
- 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'
- }
- ]
- });
|