田源
2024-04-07 2ac55ce0edf4870a29691b56bfad59f4830a11a2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
 *
 * ER图
 * @author wangting
 */
layui.define(['layer','element'],function(exports){
    var Class = function(){
        this.MODULENAME = "platform/objectService/er/erContent";
        this.moduleKey = "erContent";
        this.id='erContent';
        this.sourceData={};
        this.columns = [];
        this.backPath = configData.compatibility?path:configData.objectServicePath;
        this.getContent=function(oid){
            var that = this;
            var html = "";
            html = [
                '<div class="layui-layout-border" id="view_',oid,'">',
                '</div>'
            ].join("");
            return html;
        };
        this.init=function(oid,options){//基础的html被添加后,再执行初始化
            var that = this;
            $webUtil.copyConfig(that,that.moduleKey);
            $webUtil.ajax('get', options.url, {id: options.id}, function (res) {
                if (res.success) {
                    that.tabViewList = res.obj.tabViewList;
                    that.tabRelViewList = res.obj.tabRelViewList;
                    top.erData = {
                        tabViewList: that.tabViewList,
                        tabRelViewList: that.tabRelViewList
                    };
                    $('#view_' + oid  ).html('');
                    $('#view_' + oid  ).append('<iframe src="jslib/layui-2.2.5-debug/lay/platform/objectService/er/erContent.html" width="'+($(document).width()-60)+'" height="'+($(document).height()-105)+'" frameborder="0"></iframe>');
                } else {
                    $webUtil.showErrorMsg(res.msg);
                }
            }, function (xhr, error) {
                $webUtil.showErrorMsg("请求出现了错误,可能是服务没有启动");
            }, that.backPath);
 
        };
        this.refresh = function () {
 
        };
    };
    var cs = new Class();
    exports(cs.MODULENAME, cs);
});