Main.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. Ext.define('saas.view.main.Main', {
  2. extend: 'Ext.container.Container',
  3. xtype: 'main',
  4. requires: [
  5. 'Ext.list.Tree',
  6. 'Ext.Img'
  7. ],
  8. controller: 'main',
  9. viewModel: 'main',
  10. cls: 'main-ct',
  11. id: 'mainView',
  12. itemId: 'mainView',
  13. layout: {
  14. type: 'vbox',
  15. align: 'stretch'
  16. },
  17. items: [
  18. {
  19. xtype: 'toolbar',
  20. cls: 'main-headerbar shadow',
  21. height: 64,
  22. itemId: 'headerBar',
  23. items: [
  24. {
  25. xtype: 'component',
  26. reference: 'mainLogo',
  27. cls: 'main-logo-wrap',
  28. html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">优企云服</div></div>',
  29. bind: {
  30. width: '{navWidth}'
  31. }
  32. },
  33. {
  34. margin: '0 0 0 8',
  35. ui: 'header',
  36. iconCls:'x-fa fa-navicon',
  37. id: 'main-navigation-btn',
  38. handler: 'onToggleNavigationSize'
  39. },{
  40. reference: 'mainprofile',
  41. arrowVisible: false,
  42. ui: 'header',
  43. bind: {
  44. text: '{company.name}'
  45. },
  46. menu: {
  47. items: [{
  48. xtype: 'menuseparator'
  49. }]
  50. }
  51. },
  52. '->',
  53. {
  54. iconCls:'icon-usoftchina',
  55. ui: 'header',
  56. tooltip: '优软云',
  57. handler:function(){
  58. window.open('http://www.usoftchina.com','_blank');
  59. }
  60. },
  61. {
  62. iconCls:'x-fa fa-question',
  63. ui: 'header',
  64. arrowVisible: false,
  65. tooltip: '帮助',
  66. width:50,
  67. menu: {
  68. cls:'x-main-menu',
  69. items: [{
  70. text: '新手导航',
  71. iconCls:'x-fa fa-comment-o',
  72. handler:function(){
  73. openTab('sys-guide-formpanel','新手导航', 'sys-guide-formpanel-nav');
  74. }
  75. },{
  76. text: '用户手册',
  77. iconCls:'x-fa fa-comment-o',
  78. handler:function(){
  79. window.open('http://www.usoftchina.com','_blank');
  80. }
  81. },{
  82. text: '常见问题',
  83. iconCls:'x-fa fa-question-circle-o',
  84. handler:function(){
  85. window.open('http://www.usoftchina.com','_blank');
  86. }
  87. },{
  88. text: '客服热线',
  89. iconCls:'x-fa fa-comment-o',
  90. menu:{
  91. items:[{
  92. text:'<span onclick="javascript:window.open(\'http://www.usoftchina.com\');" style="text-decoration:underline;color:blue;">优软科技官网</span>'
  93. },{
  94. text:'<span>电话:400-830-1818</span>'
  95. },{
  96. text:'<span>邮箱:info@usoftchina.com</span>'
  97. }]
  98. }
  99. }]
  100. }
  101. },
  102. {
  103. //margin: '0 0 0 0',
  104. xtype: 'tbtext',
  105. cls:'nav-realname',
  106. bind: {
  107. html: '{account.realname}'
  108. },
  109. style:{
  110. cursor:'default',
  111. textAlign:'center'
  112. }
  113. },
  114. {
  115. ui: 'header',
  116. arrowVisible: false,
  117. id:"userImage",
  118. width: 50,
  119. height:50,
  120. bind: {
  121. 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="">'
  122. },
  123. menu: {
  124. cls:'x-main-menu2',
  125. items: [ {
  126. text: '账户中心',
  127. iconCls:'x-fa x-fa fa-user-o',
  128. handler:function(){
  129. window.open('http://www.usoftchina.com','_blank');
  130. }
  131. },{
  132. text: '意见反馈',
  133. iconCls:'x-fa fa-comment-o',
  134. handler:'feedbackMsg'
  135. }, {
  136. text: '退出',
  137. iconCls:'x-fa fa-power-off',
  138. handler: 'onLogout'
  139. }]
  140. }
  141. }
  142. ]
  143. },
  144. {
  145. xtype: 'maincontainerwrap'
  146. }
  147. ]
  148. });