Main.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. width: 180,
  28. cls: 'main-logo-wrap',
  29. html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">U企云服</div></div>',
  30. bind: {
  31. width: '{navWidth}'
  32. }
  33. },
  34. {
  35. margin: '0 8 0 8',
  36. padding: '7 0 7 0',
  37. ui: 'header',
  38. iconCls:'x-sa sa-arrows-left',
  39. id: 'main-navigation-toggle-btn',
  40. handler: 'onToggleNavigationSize'
  41. },{
  42. padding: '0 0 0 0',
  43. reference: 'mainprofile',
  44. arrowVisible: false,
  45. cls:'x-main-master',
  46. ui: 'header',
  47. bind: {
  48. text: '{company.name}'
  49. },
  50. arrowVisible: true,
  51. menu: {
  52. items: [{
  53. xtype: 'menuseparator'
  54. }]
  55. }
  56. },
  57. '->',
  58. {
  59. iconCls:'icon-usoftchina',
  60. ui: 'header',
  61. tooltip: '优软云',
  62. handler:function(){
  63. window.open('http://www.usoftchina.com','_blank');
  64. }
  65. },
  66. {
  67. iconCls:'x-sa sa-help',
  68. cls:'sa-nav-button',
  69. ui: 'header',
  70. arrowVisible: false,
  71. tooltip: '帮助',
  72. width:50,
  73. height:45,
  74. menu: {
  75. cls:'x-main-menu sa-nav-menu',
  76. items: [{
  77. text: '新手导航',
  78. //fa-comment-o sa-userGuite
  79. iconCls:'x-fa sa-navicon fa-comment-o',
  80. handler:function(){
  81. saas.util.BaseUtil.openTab('sys-guide-formpanel','新手导航', 'sys-guide-formpanel-nav');
  82. }
  83. },{
  84. text: '用户手册',
  85. //fa-address-book-o sa-userBook
  86. iconCls:'x-fa sa-navicon fa-address-book-o',
  87. handler:function(){
  88. window.open('http://www.usoftchina.com','_blank');
  89. }
  90. },{
  91. text: '常见问题',
  92. iconCls:'x-fa fa-question-circle-o sa-navicon',
  93. handler:function(){
  94. window.open('http://www.usoftchina.com','_blank');
  95. }
  96. },{
  97. text: '客服热线',
  98. iconCls:'x-fa fa-phone sa-navicon',
  99. menu:{
  100. cls:'sa-nav-menu',
  101. items:[{
  102. text:'<span onclick="javascript:window.open(\'http://www.usoftchina.com\');" style="text-decoration:underline;color:blue;">优软科技官网</span>'
  103. },{
  104. text:'<span>电话:400-830-1818</span>'
  105. },{
  106. text:'<span>邮箱:info@usoftchina.com</span>'
  107. }]
  108. }
  109. }]
  110. }
  111. },
  112. {
  113. //margin: '0 0 0 0',
  114. xtype: 'tbtext',
  115. cls:'sa-nav-button nav-realname',
  116. bind: {
  117. html: '{account.realname}'
  118. },
  119. style:{
  120. cursor:'default',
  121. textAlign:'center'
  122. }
  123. },
  124. {
  125. ui: 'header',
  126. arrowVisible: false,
  127. id:"userImage",
  128. cls:' sa-nav-button',
  129. width: 50,
  130. height:50,
  131. bind: {
  132. 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="">'
  133. },
  134. menu: {
  135. cls:'x-main-menu2 sa-nav-menu',
  136. items: [ {
  137. text: '账户中心',
  138. iconCls:'x-fa fa-user-o sa-navicon',
  139. handler:function(){
  140. window.open('http://www.usoftchina.com','_blank');
  141. }
  142. },{
  143. text: '意见反馈',
  144. iconCls:'x-fa fa-comment-o sa-navicon',
  145. handler:'feedbackMsg'
  146. }, {
  147. text: '退出',
  148. iconCls:'x-fa fa-power-off sa-navicon',
  149. handler: 'onLogout'
  150. }]
  151. }
  152. }
  153. ]
  154. },
  155. {
  156. xtype: 'maincontainerwrap'
  157. }
  158. ]
  159. });