我封装的JavaScript方法库-第四篇

 这是我的封装JS库的代码笔记

;$(function (global, factory) {

    var _factoryObj = new factory();
    console.dir(global);

    global.retroactionUtil = _factoryObj;

}(this, function () {
    _thatObj = this;
    this.currentUser = '';
    this.init = function () {
        //获取当前登录人信息
        $.ajax({
            url: docBaseB + 'dmsCommonFuncController.do?getMyUser',
            type: 'post',
            async: false,
            data: {},
            cache: false,
            success: function (result) {
                var data = stringutils.parseJSONObject(result);
                _thatObj.currentUser = data;
            },
            error: function (e) { // 请求失败处理函数
            }
        });
    }
    //-------------------------------------------------------
    this.isDccCheck = function (curroles) {
        var roles = curroles.toLowerCase();
        if (roles.indexOf("dcc") >= 0) {
            //是DCC
            return true;
        } else {
            //非DCC
            return false;
        }
    }
    this.hideRemove = function (idname) {
        $('#' + idname).remove();
    }
    this.showBtn = function (idname) {
        $('#' + idname).show();
    }
    //参数判断
    this.curroles= $('#curroles').val();//角色

    //-------------------------------------------------------

    /*
    * 重发按钮权限:
    * 1、DCC人员
    * 2、反馈单的申请人
    *
    * */
    this.btnArr = ['resend'];




}));

var MaterialGrid = (function () {
    var instance;

    function Grid() {
        this.init();
        this.DataEdit = false;//是否可编辑
    }

    Grid.prototype = {
        init: function () {
            
        },
        _editOption:{}
    };

    return {
        getInstance: function () {
            if (!instance) {
                instance = new Grid();
            }
            return instance;
        }
    };
})();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值