Main.js 5.7 KB

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