 
var acceptClick;
var folderId = request('folderId');//文件夹ID 
var reportFileName = request('reportFileName');
var bootstrap = function ($, learun) {
    "use strict";
    var page = {
        init: function () {
            $('.lr-form-wrap').lrscroll();
            page.bind();
            page.initData();
        },
        bind: function () {
            //抽取范围
            $('#ExtractRange').lrselect({
                data: [
                    {
                        id: 0, text: '未抽取的'
                    },
                    {
                        id: 1, text: '已抽取的'
                    }
                ],
                allowSearch: true,
                value: 'id',
                text: 'text',
            }); 
        },
        initData: function () {

        }
    };
    // 保存数据
    acceptClick = function (callBack) {
        if (!$('#form').lrValidform()) {
            return false;
        }
        if (!verify()) {
            return false;
        }
        // 保存成功后才回调
        if (!!callBack) { 
          
            var param = param || {}; 
            param.model = $('#ExtractRange').lrselectGet();;

            callBack(folderId, escape(reportFileName), JSON.stringify(param));//会去index.Js的203行
        }
        learun.layerClose(window.name);
    };
    page.init();
}
function verify() {
    var extractType = $('#ExtractRange').lrselectGet();
    //if (extractType == 1) {
    //    if ($('#DataItemDetailID').lrselectGet() == '') {
    //        $.lrValidformMessage($("#DataItemDetailID"), "不能为空");
    //        $('#DataItemDetailID').click();
    //        return false;
    //    }
    //}
    //if (extractType == 2) {
    //    if ($('#DrawingCatalogueID').lrselectGet() == '') {
    //        $.lrValidformMessage($("#DrawingCatalogueID"), "不能为空");
    //        $('#DrawingCatalogueID').click();
    //        return false;
    //    }
    //}
    return true;
}