zhangyanpeng
2024-05-29 1f227a1cf627526701c652ba84bae3e430bba8d3
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <title>DMS2.1</title>
    <link href="../css/main.css" rel="stylesheet">
    <link href="../../../css/control.css" rel="stylesheet">
    <link href="../../../css/page.css" rel="stylesheet">
    <link href="../../../css/iconfont.css" rel="stylesheet">
    <link href="../../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet">
    <link href="../../../img/logo.png" rel="shortcut icon" type="image/x-icon">
    
    <script src="../../../js/jquery-3.5.1.min.js"></script>
    <script src="../../../js/vue/vue.js"></script>
    
    <script src="../../../js/config.js"></script>
    <script src="../../../data/data.js"></script>
    <script src="../../../js/vue/elementDefault.js"></script>
    <script src="../../../js/vue/element-ui/lib/index.js"></script>
    <script src="../../../js/Sortable.js"></script>
    <script src="../../../js/vuedraggable.umd.min.js"></script>
    <script src="../../../js/vue/page.js"></script>
    <script src="../../../js/foundation.js"></script>
    <script src="../../../js/control.js"></script>
    <script src="../../../js/loadJsCss.js"></script>
    
</head>
    
<body style="margin: 0px; width: 100%; height: 100vh;">
    <div v-cloak id="app" style="margin: 0px; width: 100%; height: 100%;">
        <div style="margin: 0px; width: 100%; height: 100%;">
            <iframe style="width: 100%; height: 100%;" frameborder="0" :src="editor_url"></iframe>
        </div>
    </div>
</body>
 
<style>
    [v-cloak] {
        display: none !important;
    }
</style>
 
    <script type="text/javascript">
        var    pnl_message;    
        var toolbar, treeMenu, tab;
        var alertnum_ = 3;
    </script>
    
    <script type="text/javascript">
        vue = new Vue({
            el: "#app",
            data: {
                editor_url: "./page_editor/page_editor.html",
                urlParam: {},
                userId: "",
                userinfo: {},
                user: {},
                
                pagecode: {},
                pageobj: {},
                
            },
            created() {
                window.top.config = config;
                window.top.util = util;
                window.top.initJsCss = function(win, pageurls, callback) {
                    initJsCss(win, pageurls, callback)
                }
            },
            
            mounted() {
                var url = window.location.href;
                this.urlParam = getGetParamsByUrl(url);
                this.pagecode = this.urlParam.pagecode;
                //打开的菜单导航及容器定义
                tab = new Tab({
                    element: "content"
                });
                
                //未找到声明的变量Root
                Root = new RootClass({
                    userInfo: {
                        token: this.urlParam.token
                    },
                    "tab": tab
                });
                
                //加载字典数据
                Server.call("root/client/getDictionarys", {isClientMode: false}, function(result) {
                    console.log(result);
                    dataRoot.database.dictList = result.data.dictionarys;
                    var data_ = [];
                    if (result.data.dictionarys) {
                        data_ = result.data.dictionarys;
                    }
                    Dictionary.load(data_);
                });
                
                this.ready_();
                // this.getUserById(this.urlParam.token);
            },
            
            methods:{
                //获取用户信息
                getUserById(userId) {
                    var me = this;
                    var url = "root/client/getUser";
                    
                    var param = {}
                    Server.call(url, param, function(result) {
                        me.userinfo = result.data.user || {};
                        if (!me.userinfo.token) {
                            me.userinfo.token = me.urlParam.token;
                        }
                        
                        if (me.userinfo.employee && me.userinfo.employee.positions.length && me.userinfo.employee.positions[0].department) {
                            me.userinfo.department_name = me.userinfo.employee.positions[0].department.name;
                        }
                        
                        Root.setUserInfo(me.userinfo);
                    });
                },
                
                ready_() {
                    //加载菜单
                    this.getMenu();
                    
                    //定义弹出的提示框
                    // Root.init_vue();
                    
                },
                
                //接口定义菜单
                getMenu() {
                    var me = this;
                    var params = {
                        dataname: "sys_page",
                        filter: "code='" + me.pagecode + "'"
                    }
                    
                    Server.call("root/data/getEntitySet", params, function(result) {
                        console.log(result);
                        me.pageobj = result.data.entityset[0];
                        me.editor_url = config.url_page + me.pageobj.url;
                    });
                },
                
            }
        });    
    </script>
</html>