Main.js 5.9 KB

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