Main.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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>',
  29. width: 160
  30. },
  31. {
  32. margin: '0 0 0 8',
  33. ui: 'header',
  34. iconCls:'x-fa fa-navicon',
  35. id: 'main-navigation-btn',
  36. handler: 'onToggleNavigationSize'
  37. },
  38. {
  39. margin: '0 0 0 8',
  40. xtype: 'tbtext',
  41. bind: {
  42. html: '{company.name}'
  43. }
  44. },
  45. '->',
  46. {
  47. iconCls:'x-fa fa-search',
  48. ui: 'header',
  49. tooltip: '搜索'
  50. },
  51. {
  52. iconCls:'x-fa fa-bell',
  53. ui: 'header',
  54. tooltip: '消息'
  55. },
  56. {
  57. iconCls:'x-fa fa-question',
  58. ui: 'header',
  59. tooltip: '帮助'
  60. },
  61. {
  62. reference: 'mainprofile',
  63. iconCls:'x-fa fa-th-large',
  64. arrowVisible: false,
  65. ui: 'header',
  66. tooltip: '账户',
  67. bind: {
  68. text: '{account.realname}'
  69. },
  70. menu: {
  71. items: [{
  72. xtype: 'menuseparator'
  73. }, {
  74. text: '退出',
  75. handler: 'onLogout'
  76. }]
  77. }
  78. },
  79. {
  80. xtype: 'image',
  81. cls: 'header-right-profile-image',
  82. height: 35,
  83. width: 35,
  84. bind: {
  85. src: '{avatarUrl}'
  86. }
  87. }
  88. ]
  89. },
  90. {
  91. xtype: 'maincontainerwrap'
  92. }
  93. ]
  94. });