页面加载回调事件

/**
 * _pageParams.action == "add"页面初始化时调用
 * @param data object: 表单数据
 */
function addFillForms(data) {}

/**
 * 表单数据加载后调用
 */
function fillForms(res) {}

/**
 * 表单组件初始化后调用
 * function _blockIdWidgetPage_initEventCallback(blockId){}
 * @param blockId string: 表单组件id
 */
window.onload = function () {
    var blockId = $("[name='buiBlock']").attr("id");
    var blockInitFunName = "_" + blockId + "WidgetPage_initEventCallback";
    if (typeof blockInitFunName === "function") {
        eval(blockInitFunName + "(blockId)");
    }
}

/**
 * 表单按钮提交前回调
 * @param formData object: 表单数据
 */
function _submit(params, onSuccess, onFail) {
    var formData = _getForm(params.form);//获取表单内容值
    var controlData = {};
    if (Global.controls) {
        for (var i in Global.controls) {
            if (Global.controls[i].value && typeof Global.controls[i].value === "string") {
                controlData[Global.controls[i].name] = Global.controls[i].value;
            }
        }
        formData = Object.assign(controlData, formData);
    }

    //提交前验证表单数据
    buiValidator.validate(formData).then(function (validateResult) {
        //console.log(validateResult);
        if (typeof beforeSubmitCB === "function") {
            beforeSubmitCB(formData);
        }
    })
    ...
}