Browse Source

导航工具栏

rainco 7 years ago
parent
commit
076e141129

+ 0 - 29
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -48,35 +48,6 @@ Ext.define('saas.view.core.form.FormPanel', {
         unAuditBtnText: '反审核',
         messageLogText:'操作日志'
     },
-    /* buttons:[{
-        text:'操作日志',
-        bind: {
-            hidden: 'isNewPanle'
-        },
-        handler:function(btn){
-            var form = btn.up('form'),
-            mlKeyvalue = form.viewModel.get(form._idField)||0,
-            win = Ext.getCmp(form.xtype+mlKeyvalue);
-            if (!win&&mlKeyvalue!=0) {
-                var win = form.add(Ext.create('Ext.window.Window', {
-                    modal: true,
-                    id:form.xtype+mlKeyvalue,
-                    height: '60%',
-                    width: '80%',
-                    title: '操作日志('+form.viewModel.get(form._codeField)+')',
-                    scrollable: true,
-                    constrain: true,
-                    closable: true,
-                    layout: 'fit',
-                    items: [{
-                        xtype: 'core-form-mseeageLog',
-                        mlKeyvalue:mlKeyvalue
-                    }]
-                }));
-            };
-            win.show();
-        }
-    }], */
     initComponent: function () {
         var me = this,
         auditTexts = me.auditTexts;

+ 5 - 4
frontend/saas-web/app/view/core/form/MseeageLog.js

@@ -71,15 +71,15 @@ Ext.define('saas.view.core.form.MseeageLog', {
         width : 120.0, 
         flex:1
     }],
-
+    condition:[],
     initComponent: function() {
         var me = this;
-        me.condition = [{
+        me.defualtCondition = {
             type: 'number',
             field: 'ml_keyvalue',
             operation: '=',
             value: me.mlKeyvalue
-        }];
+        };
         if(me.columns){
             var fields = me.columns.map(column => column.dataIndex);
             me.store = Ext.create('Ext.data.Store',{
@@ -104,7 +104,7 @@ Ext.define('saas.view.core.form.MseeageLog', {
                     beforeload: function (store, op) {
                         var condition = me.condition;
                         if (Ext.isEmpty(condition)) {
-                            condition = "";
+                            condition = [me.defualtCondition];
                         }
                         
                         Ext.apply(store.proxy.extraParams, {
@@ -134,6 +134,7 @@ Ext.define('saas.view.core.form.MseeageLog', {
     getCondition: function(items) {
         var me = this,
         conditions = [];
+        conditions.push(this.defualtCondition);
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,

+ 39 - 33
frontend/saas-web/app/view/main/Main.js

@@ -45,7 +45,6 @@ Ext.define('saas.view.main.Main', {
                     reference: 'mainprofile',
                     arrowVisible: false,
                     ui: 'header',
-                    tooltip: '所属公司',
                     bind: {
                         text: '{company.name}'
                     },
@@ -68,7 +67,6 @@ Ext.define('saas.view.main.Main', {
                     iconCls:'x-fa fa-question',
                     ui: 'header',
                     arrowVisible: false,
-                    //tooltip: '帮助',
                     width:50, 
                     listeners:{
                         'mouseover':function(){
@@ -80,32 +78,31 @@ Ext.define('saas.view.main.Main', {
                             if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
                                 btn.hideMenu();
                             }
-                        },'mouseleave':function(enu){
-                            this.hide();
                         } 
                     },
                     menu: {
+                        cls:'nav-menu',
                         items: [{
                             text: '新手导航',
-                            iconCls:'x-fa icon-userGuite',
+                            iconCls:'x-fa fa-comment-o',
                             handler:function(){
                                console.log("新手导航");
                             }
                         },{
                             text: '用户手册',
-                            iconCls:'x-fa icon-userBook',
+                            iconCls:'x-fa fa-comment-o',
                             handler:function(){
                                 console.log("用户手册");
                             }
                         },{
                             text: '常见问题',
-                            iconCls:'x-fa icon-commonQuestion',
+                            iconCls:'x-fa fa-question-circle-o',
                             handler:function(){
                                 console.log("常见问题");
                             }
                         },{
                             text: '客服热线',
-                            iconCls:'x-fa icon-serviceOnline',
+                            iconCls:'x-fa fa-comment-o',
                             handler:function(){
                                 console.log("客服热线");
                             }
@@ -113,54 +110,63 @@ Ext.define('saas.view.main.Main', {
                     }
                 },
                 {
-                    ui: 'header',
+                    margin: '0 0 0 8',
+                    xtype: 'tbtext',
+                    cls:'nav-realname',
                     bind: {
-                        tooltip: '{account.realname}',
-                        text: '{account.realname}'
+                        //tooltip: '{account.realname}',
+                        html: '{account.realname}'
+                    },
+                    style:{
+                        cursor:'default',
+                        textAlign:'center'
                     }
                 },
                 {
                     ui: 'header',
-                    arrowVisible: false,
-                    cls: 'header-right-profile-image',
-                    height: 70,
-                    width: 70,
-                   /*  bind: {
-                        src: '{avatarUrl}'
-                    }, */
+                    id:"userImage",
+                    height: 35,
+                    width: 35,
+                     bind: {
+                        html:'<img class="x-img x-box-item x-toolbar-item x-img-header" style="width: 35px; height: 35px; margin: 0px;" src="{avatarUrl}" alt="">'
+                    }, 
                     menu: {
+                        cls:'nav-menu',
                         items: [ {  
                             text: '账户中心',
-                            iconCls:'x-fa icon-accountCenter',
+                            iconCls:'x-fa x-fa fa-user-o',
                             handler:function(){
                             console.log("账户中心");
                             }
                         },{  
                             text: '意见反馈',
-                            iconCls:'x-fa icon-feedback',
+                            iconCls:'x-fa fa-comment-o',
                             handler:function(){
                             console.log("意见反馈");
                             }
                         }, {
                             text: '退出',
+                            iconCls:'x-fa fa-power-off',
                             handler: 'onLogout'
                         }]
                     } ,
-                    listeners:{
-                        'mouseover':function(){
-                            this.showMenu(); 
+                     listeners:{
+                        'mouseover':function(btn){
+                            console.log("btn:",btn);
+                            btn.menu ? (btn.menu.isVisible() ? '' : btn.showMenu()) : '';
                         },
                         'mouseout':function(btn,e){
-                            var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
-                            var btnLayout = btn.el.dom.getBoundingClientRect();
-                            if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
-                                btn.hideMenu();
-                            }
-                        },'mouseleave':function(enu){
-                            this.hide();
-                        } 
-                    }
-                    
+                            console.log("btn:",btn);
+                            window.setTimeout(function(){
+                                var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
+                                console.log(btn.el.dom);
+                                var btnLayout = btn.el.dom.getBoundingClientRect();
+                                if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
+                                    btn.hideMenu();
+                                }
+                            }, 10); 
+                        }
+                    } 
                 }
             ]
         },

+ 9 - 37
frontend/saas-web/app/view/main/Main.scss

@@ -91,11 +91,15 @@ $treelist-nav-ui: (
     border: none;
 
     .header-right-profile-image {
-        border-radius: 20px;
         background: url(../../../../resources/images/default/user-profile-default.png) 0 0 no-repeat;
         background-position: center;
     }
 }
+.x-btn.header-right-profile-image.x-btn-menu-active.x-btn-header-small,
+.x-btn.header-right-profile-image.x-btn-pressed.x-btn-header-small {
+    background: url(../../../../resources/images/default/user-profile-default.png) 0 0 no-repeat !important;
+    background-position: center;
+}
 .top-english-button {
     .x-btn-icon-el {
         width: 21px;
@@ -164,39 +168,7 @@ body > .x-mask {
     background: url(../../../../resources/images/nav/usoftchina.png) 0 0 no-repeat; 
    
 }
-.icon-userGuite{
-    margin-top: 0px;
-    background: url(../../../../resources/images/nav/userGuite.png) 0 0 no-repeat;
-    background-size: 16px 16px;
-    background-position: center;
-}
-.icon-userBook{
-    margin-top: 0px;
-    background: url(../../../../resources/images/nav/userBook.png) 0 0 no-repeat; 
-    background-size: 16px 16px;
-    background-position: center;
-}
-.icon-commonQuestion{
-    margin-top: 0px;
-    background: url(../../../../resources/images/nav/commonQuestion.png) 0 0 no-repeat; 
-    background-size: 16px 16px;
-    background-position: center;
-}
-.icon-serviceOnline{
-    margin-top: 0px;
-    background: url(../../../../resources/images/nav/serviceOnline.png) 0 0 no-repeat; 
-    background-size: 16px 16px;
-    background-position: center;
-}
-.icon-accountCenter{
-    margin-top: 0px;
-    background: url(../../../../resources/images/nav/accountCenter.png) 0 0 no-repeat; 
-    background-size: 16px 16px;
-    background-position: center;
-}
-.icon-feedback{
-    margin-top: 0px;
-    background: url(../../../../resources/images/nav/feedback.png) 0 0 no-repeat; 
-    background-size: 16px 16px;
-    background-position: center;
-} 
+.nav-menu{
+    color: #48C1F8 !important;
+    border:5px red;
+}

+ 8 - 0
frontend/saas-web/app/view/main/MainController.js

@@ -111,5 +111,13 @@ Ext.define('saas.view.main.MainController', {
 
     onLogout: function() {
         this.fireEvent('logout');
+    },
+
+    accountCenterClick:function(e, t, eOpts){
+        console.log("!!!");
+    },
+    accountCenterMouseover:function(e, t, eOpts){
+        console.log("userImage???");
+        var userImage = Ext.getCmp('userImage');
     }
 });

BIN
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.eot


File diff suppressed because it is too large
+ 0 - 0
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.js


File diff suppressed because it is too large
+ 0 - 0
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.svg


BIN
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.ttf


BIN
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.woff


+ 15 - 1
frontend/saas-web/packages/font-saas/sass/etc/icons.scss

@@ -1,8 +1,13 @@
-
 .sa-purchase:before { content: "\e613"; }
 
+.sa-xiu:before { content: "\e605"; }
+
 .sa-weibiaoti1:before { content: "\ef04"; }
 
+.sa-tuichu:before { content: "\e6b7"; }
+
+.sa-feedback:before { content: "\e672"; }
+
 .sa-document:before { content: "\e654"; }
 
 .sa-switch-on:before { content: "\e622"; }
@@ -11,8 +16,14 @@
 
 .sa-sale:before { content: "\e638"; }
 
+.sa-userBook:before { content: "\e600"; }
+
 .sa-arrows-left:before { content: "\ef02"; }
 
+.sa-serviceOnline:before { content: "\e60f"; }
+
+.sa-accountCenter:before { content: "\e61a"; }
+
 .sa-warehouse:before { content: "\e63c"; }
 
 .sa-setting:before { content: "\e64b"; }
@@ -21,5 +32,8 @@
 
 .sa-money:before { content: "\e6fa"; }
 
+.sa-commonQuestion:before { content: "\e673"; }
+
 .sa-arrows-right:before { content: "\ef01"; }
 
+.sa-userGuite:before { content: "\e656"; }

Some files were not shown because too many files changed in this diff