wuxw
2019-11-11 989910c2cb43e863473fb2a377a7a565cd06949f
WebService/src/main/resources/static/js/core.js
@@ -91,7 +91,18 @@
                    errorCallback(error.bodyText,error);
                    vc.loading('close');
                });
        }
        },
        upload:function(componentCode,componentMethod,param,options,successCallback,errorCallback){
                vc.loading('open');
                Vue.http.post('/callComponent/upload/'+componentCode +"/"+componentMethod, param, options)
                .then(function(res){
                    successCallback(res.bodyText,res);
                    vc.loading('close');
                }, function(error){
                    errorCallback(error.bodyText,error);
                    vc.loading('close');
                });
        },
    };
@@ -157,6 +168,15 @@
    //获取用户菜单
    vc.getMenus = function(){
        return JSON.parse(window.localStorage.getItem('hc_menus'));
    };
    //保存菜单状态
    vc.setMenuState = function(_menuState){
        window.localStorage.setItem('hc_menu_state',_menuState);
    };
    //获取菜单状态
    vc.getMenuState = function(){
        return window.localStorage.getItem('hc_menu_state');
    };
    //保存用户菜单
@@ -250,7 +270,7 @@
    }
    //空判断 true 为非空 false 为空
    vc.notNull = function(_paramObj){
        if(_paramObj == null || _paramObj == undefined || _paramObj == ''){
        if(_paramObj == null || _paramObj == undefined || _paramObj.trim() == ''){
            return false;
        }
        return true;
@@ -298,6 +318,7 @@
      var s = time.getSeconds();
      return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s);
    }
})(window.vc);