/* * 版 本 PIT-ADMS V7.0.3 敏捷开发框架
 * Copyright (c) 2013-2018 Hexagon PPM
 * 创建人：超级管理员
 * 日  期：2022-06-15 10:00
 * 描  述：报表文件
 */
var acceptClick;
var folderId = request('folderId');//文件夹ID
var ProjectId = request('ProjectId');
var reportFileName = request('reportFileName');
var bootstrap = function ($, learun) {
    "use strict";
    var page = {
        init: function () {
            $('.lr-form-wrap').lrscroll();
            page.bind();
            page.initData();
        },
        bind: function () {
            //对象类型
            $('#ObjectTypeID').lrselect({
                url: top.$.rootUrl + '/ZZDT_EC/ec_objecttype/GetTreeData',
                param: { ProjectId: ProjectId, isShowCheck: true },
                type: 'treemultiple',
                allowSearch: true,
                maxHeight: 225,
                select: function (item) {
                   
                }
            });
            //属性
            $('#PropertyID').lrselect({
                url: top.$.rootUrl + '/ZZDT_EC/ec_property/GetPropTreeData',
                param: { ProjectId: ProjectId, isShowCheck: true },
                type: 'treemultiple',
                allowSearch: true,
                maxHeight: 225,
                select: function (item) {

                }
            });
            //关联类型
            $('#RelTypeID').lrselect({
                url: top.$.rootUrl + '/ZZDT_EC/ec_reltype/GetTreeData',
                param: { ProjectId: ProjectId, isShowCheck: true },
                type: 'treemultiple',
                allowSearch: true,
                maxHeight: 225,
                select: function (item) {

                }
            });
        },
        initData: function () {
           
        }
    };
    // 保存数据
    acceptClick = function (callBack) {
        if (!$('#form').lrValidform()) {
            return false;
        }

        // 保存成功后才回调
        if (!!callBack) {
            callBack(folderId, escape(reportFileName), $('#ObjectTypeID').lrselectGet(), $("#PropertyID").lrselectGet(), $("#RelTypeID").lrselectGet());
        }
        learun.layerClose(window.name);
    };
    page.init();
}
