Header.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Ext.define('erp.view.opensys.default.Header', {
  2. extend: 'Ext.Toolbar',
  3. alias: 'widget.headerpanel',
  4. region:'north',
  5. layout: 'hbox',
  6. layoutConfig: {
  7. padding: '5',
  8. align: 'middle'
  9. },
  10. border: false,
  11. bodyBorder:false,
  12. height:40,
  13. padding:'0 0 2 0',
  14. cls:'cus-topbg',
  15. defaults: {margins:'3 5 0 0'},
  16. initComponent: function() {
  17. var me = this;
  18. Ext.applyIf(this, {
  19. items:[{
  20. xtype: 'image',
  21. width: 85,
  22. height: 30,
  23. margins: '0 5 0 0',
  24. src : basePath + 'resource/images/uas.png'
  25. },{
  26. xtype: 'tbtext',
  27. align: 'stretch',
  28. text: '<font style="font-weight:bold;font-size:15px;">客户服务</font>'
  29. // text: '<font style="font-weight:bold;font-size:15px; color:white">客户服务</font>'
  30. /*text: '<font size="4" color="#0763A7">客户服务</font>'*/
  31. },{
  32. xtype: 'tbtext',
  33. flex: 10,
  34. text: ''
  35. },{
  36. xtype: 'button',
  37. height: 24,
  38. align: 'end',
  39. text:'退出系统',
  40. cls:'header-btn',
  41. /*text: '<font color=white>退出</font>',*/
  42. handler: function(b){
  43. Ext.Msg.confirm('温馨提示',"确定退出吗?",ok);
  44. function ok(btn){
  45. if(btn == 'yes'){
  46. Ext.Ajax.request({
  47. url: basePath + "common/logout.action",
  48. method: 'GET',
  49. callback: function(opt, s, r) {
  50. window.location.href="about:blank";
  51. window.opener = null;
  52. //window.open(' ', '_self');
  53. window.close();
  54. }
  55. });
  56. } else {
  57. return;
  58. }
  59. };
  60. }
  61. }],
  62. height: 35,
  63. padding:'0 0 5 0'
  64. });
  65. this.callParent(arguments);
  66. }
  67. });