ZeYanG
2018-08-24 d6404ab72e2e0fa8a8c68b7ce14c2f2a6352bfae
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cmn-Hans" class="no-js">
  <head>
    <!-- 声明文档使用的字符编码-->
    <meta charset="utf-8">
    <!-- 优先使用 IE 最新版本和 Chrome-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!-- 添加 favicon icon-->
    <title></title>
    <link rel="stylesheet" href="../css/vender/font-awesome.css">
    <link rel="stylesheet" href="../css/custom_bootstrap.css">
    <link rel="stylesheet" href="../css/app.css">
    <link rel="stylesheet" href="../css/theme.css">  
    <link rel="stylesheet" href="../css/toastr.min.css">
    <link rel="stylesheet" href="../css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="../css/flatpickr.min.css">
    <link rel="stylesheet" href="../css/webuploader.css"> 
    <link rel="stylesheet" href="../css/select2.min.css">
    <link rel="stylesheet" href="../css/uploaderStyle.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_mevnji990bkgwrk9.css">
    <link href="../css/vender/material_blue.css" type="text/css" rel="stylesheet">
    <link rel="stylesheet" href="../css/customForm.css">    
    <link rel="stylesheet" href="../css/customShow.css">
    <link rel="stylesheet" href="../js/ueditor/themes/default/css/ueditor.css">
    <link rel="stylesheet" href="../css/show.css">
    <link rel="stylesheet" href="../css/xhSelect.css">    
    <link rel="stylesheet" href="../css/vender/viewer.min.css">
  </head>
  <body  class="sa-body sa-need-show-import-btn theme-blue">
    <div class="fui-form">
        <div class="header">
           <h4 class="modal-title" id="myModalLabel">&nbsp</h4>
           <hr>
        </div>
        
        <!-- <div id="customViewUEditorCom" class="fui-form"></div> -->
        <!-- <hr class="footerhr" width="100%"> -->
        <div class="footer" style="display: none">            
            <!--<div class="btn-pane middle float">                -->
                <!--<div class="btns" style="position: relative;float: left;"><span class="btn btn-first buttonCss x-btn style-green fromSaveCss" style="width: 120px">保存</span></div>-->
                <!--<div class="btns" style="position: relative;float: left;"><span class="btn btn-first buttonCss x-btn style-green cancelCss" style="width: 120px">取消</span></div>-->
            <!--</div>-->
        </div>
    </div>
    <div class="preview-edit-pane" style="display: none"><div class="edit-pane">
<!--    <a href="javascript:void(0);" onclick="customform.leipiFormDesign.exec('text');"><span class="btn btn-secondBorder btnI"><i class="icon iconfont icon-kongjian_danhangwenben" style="text-align: left;"></i><span class="boxSpan">单行文本</span></span></a> -->
        <!-- <a href="javascript:void(0);" class="delete-btn"><i class="icon-trasho"></i><span>删除</span></a> -->
        <!--<a id="editableBtn" href="javascript:void(0);" class="edit-btn cfg_contentNone" onclick="customShow.onEditor();"><i class="icon-flow-edit"></i><span><i class="icon iconfont icon-bianji" style="text-align: left;"></i>编辑</span></a>
        <a id="disposableBtn" href="javascript:void(0);"class="cfg_contentNone" ><i class="icon-print"></i><span><i class="icon iconfont icon-dayin1" style="text-align: left;"></i>取消</span></a>
        <a id="auditableBtn" href="javascript:void(0);"class="cfg_contentNone" ><i class="icon-print"></i><span><i class="icon iconfont icon-dayin1" style="text-align: left;"></i>审批</span></a>
        <a id="printableBtn" href="javascript:void(0);"class="print-btn cfg_contentNone" onclick="customShow.onPrint();"><i class="icon-print"></i><span><i class="icon iconfont icon-dayin1" style="text-align: left;"></i>打印</span></a>
       -->
        </div><div class="switch-pane"><div class="switch-btn prev disabled"><i class="icon-angleleft"></i></div>
        <div class="switch-btn next disabled"><i class="icon-angleright"></i></div></div></div>
    <div id="customViewUEditor" class="customViewUEditorCss fui-form"></div>
    <div id="customShow" class="customShow fui-form" ></div>
    <div id="CursorLayerCanvas" style="display: none;"></div> 
    </div>
    <div class="sure_box">
        <button class="btn btn-info btn-action closeBtn s_savebtn" onclick="customShow.onclickSave2()" style="display:none">保存</button> 
    </div>
    <!-- des -->
    <script type="text/javascript" charset="utf-8" src="../js/tripledes.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/mode-ecb.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/desutil.js"></script>
    <!-- 表单相关设置 -->
    <script type="text/javascript">
        var datasource = ${formdatabase};
        var showFormInterface = ${forminterface};
        var showFormEvent = ${formevent};
        var showFormApi = ${formapi};
        
        var preview = ${preview};
        // $(".sure_box").append('<button class="btn btn-info btn-action closeBtn s_savebtn" onclick="customShow.onclickSave2()">保存</button>')
        // var formbaseInfo = ${formbaseInfo};
        
        var formID = "${formID}";
        var tenantID = "${tenantID}";
        var obj = {"tenantID":"${tenantID}"};
        var token = {"accessToken":"${accessToken}"};
        var username = {"userName":"${userName}"};
        
        
        setDeclocal("datasource",datasource);
 
        setDeclocal("newFormID",formID);
        setDeclocal("tenantID",obj);
        setDeclocal("token",token);
        
        setDeclocal("customShowFlag",preview);
        
        // 发布模式选择
        if(getEnclocal("customShowFlag") == undefined) {
            setDeclocal("customShowFlag","3");
        } else {
            customShowFlag = getEnclocal("customShowFlag");
        }
        //window.localStorage.setItem("userName",JSON.stringify(username));
    </script>
    
    <div id="CursorLayerCanvas" style="display: none;"></div>
     <script type="text/javascript" charset="utf-8" src="../js/vender/jquery-2.2.3.min.js"></script>
     <script type="text/javascript" charset="utf-8" src="../js/vender/jquery-ui.js"></script>  
      <!-- <script type="text/javascript" charset="utf-8" src="../js/vender/all.js"></script>  -->
    <script type="text/javascript" charset="utf-8" src="../js/vender/select2.full.min.js"></script> 
    <script type="text/javascript" charset="utf-8" src="../js/vender/flatpickr.min.js"></script>
     <script type="text/javascript" src="../js/vender/zh.js"></script>  
    <script type="text/javascript" charset="utf-8" src="../js/vender/jquery.qrcode.min.js"></script> 
    <script type="text/javascript" charset="utf-8" src="../js/vender/jquery-barcode.js"></script>  
    <script type="text/javascript" charset="utf-8" src="../js/vender/webuploader.nolog.min.js"></script>  
     <script type="text/javascript" charset="utf-8" src="../js/vender/jquery.ztree.all.min.js"></script>  
    <script type="text/javascript" charset="utf-8" src="../js/vender/lodash.js"></script>  
    <script type="text/javascript" charset="utf-8" src="../js/vender/jQuery.print.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/vender/jquery.PrintArea.js"></script>    
    
    <script type="text/javascript" charset="utf-8" src="../js/ueditor/ueditor.config.js?2023"></script>
    <script type="text/javascript" charset="utf-8" src="../js/ueditor/ueditor.all.js?2023"> </script>
    <script type="text/javascript" charset="utf-8" src="../js/vender/toastr.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/vender/Math.uuid.js"></script>      
    <script type="text/javascript" charset="utf-8" src="../js/vender/bootstrap-tooltip.js"></script>  
    <script type="text/javascript" charset="utf-8" src="../js/vender/bootstrap-popover.js"></script> 
 
 
    <script type="text/javascript" src="../js/ajax.js"></script>  
      <script type="text/javascript" src="../js/customMin/formula_min.js"></script>  
    <script type="text/javascript" src="../js/customMin/formula.extend_min.js"></script>    
    <script type="text/javascript" charset="utf-8" src="../js/customMin/customS_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/vender/html2canvas_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/vender/viewer.min.js"></script>
    <script src="../js/system_custom.js"></script>
    <script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.min.js"></script>
    <!-- 客户自定义js文件 -->
    <script type="text/javascript" charset="utf-8" src="${formresource}"></script>
 
    <!-- endbuild-->
    <!-- 密码验证 -->
    <script type="text/javascript">
    $(function(){
        var url = window.location.href;
        var key = GetQueryString(url,"publishShowflag");
        if(key==1){
            return ;
        }
        // 发布模式选择
        if(getEnclocal("customShowFlag") == undefined) {
            setDeclocal("customShowFlag","3");
        } else {
            customShowFlag = getEnclocal("customShowFlag");
        }
            //window.localStorage.setItem("userName",JSON.stringify(username));
        
        var psw = ${requirepassword};
        if(psw == 1 && customShowFlag == 3) {
            popupDiv('showPassword');
        };
        $("#auth").click(function(){
            var param = {};
            param.accesspassword = encryptByDES($("#password").val(),"");
            param.ver = encryptByDES($("#ver").val().toLocaleLowerCase(),"");
            // param.openId = getCookie("openId");
            // param.formId = getEnclocal("customForm").newFormID;
            if (!param.accesspassword) {
                customBase.alert("E", "密码不能为空!");
                return;
            }
            if(!param.ver){
                customBase.alert("E", "验证码不能为空!");
                return;
            }
            $.ajax({
                type : "POST",
                dataType : "text",
                // headers : {"Content-Type":"application/json"},
                url : "/publish/auth",
                data : param,
                success : function(data){
                        if(data == "success") {
                            hideDiv('showPassword');
                        } else if(data == "error"){
                            customBase.alert("E", "验证码错误!");
                            reloadPic();
                        }else {
                            customBase.alert("E", "密码错误!");
                            reloadPic();
                            // alert("密码错误");
                            
                        }
                        }
            });
        });
    });
    </script>
    
    <script type="text/javascript">
        customShow.initEvent.interfaceBind = showFormInterface;
        customShow.initEvent.eventBind=showFormEvent;
        
        $(document).ready(function(){
            customDataBound.formsetting(formID,function(rs){
                customShow.options.formsetting = rs.data;
                customShow.Init();
            })
            });  
        
    </script>
    
    <script language=javascript type="text/javascript">
    function popupDiv(div_id) {   
        var div_obj = $("#"+div_id);  
        var windowWidth = window.innerWidth;       
        var windowHeight = window.innerHeight;  
        var popupHeight = div_obj.height();       
        var popupWidth = div_obj.width();    
        //添加并显示遮罩层   
        $("<div id='mask'></div>").addClass("mask")
                                  .width(windowWidth)
                                  .height(windowHeight)
                                  // .click(function() {hideDiv(div_id); })
                                  .appendTo("body")
                                  .fadeIn(200);
        div_obj.css({"position": "absolute"})
               .animate({left: windowWidth/2-popupWidth/2,
                         top: windowHeight/2-popupHeight/2, opacity: "show" }, "slow");             
    }
    
    function hideDiv(div_id) {
        $("#mask").remove();   
        $("#" + div_id).animate({left: 0, top: 0, opacity: "hide" }, "slow");   
    }
   </script>
    
 
    <div id="showPassword" class="pop-box">
    <div class="x-dialog" style="height: 260px;">
        <div class="dialog-header">
            <span style="font-size:16">密码登录</span>
            <!--<span class="fa fa-remove x-close"></span>    -->
        </div>
        <div class="dialog-body">
            <div class="x-layout-table">
                <div class="x-layout-table-row" style="left: 33px;top: 26px;height: 30px;">
                    <div class="x-layout-table-item fui_text" id = "a">
                        <div class="x-lock"><img class="lockImg"  src="../img/lock.png" alt="" /></div>
                        <input id="password" type="password" placeholder="请输入密码" class="x-input" style="" >
                        <input id = "ver" class="x-input" style="width: 60%;margin-top: 15px;padding-left: 20px;" placeholder="请输入验证码">
                        <img src="${ctx }/publish/generate?t=1" id="checkCode" align="middle" onclick="reloadPic()" style=" margin-top: 15px;width: 23%; height: 32px;border-radius: 4px;">
 
                    </div>
                </div>
                   <div class="x-layout-table-row" style="left: -50px;top: 125px;">
                    <div class="x-layout-table-item fui_text x-login ">
                        <button  class="loginBtn" style="" id="auth">登录</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
  </body>
    <script>
        //if (window.frames.length != parent.frames.length) {  
        //       $('#showPassword').css('z-index','0');
        //       console.log($('#showPassword'));
        
        //}else{
        //   $('#showPassword').css('z-index','99');
        //       console.log($('#showPassword'))
        
        //}
            function reloadPic() {
                document.getElementById("checkCode").src = document.getElementById("checkCode").src + "1";
            }
    </script>
</html>