| | |
| | | var _html = $('<div style="height:100%;width:100%;"></div>'); |
| | | var _script = $('<div style="height:100%;width:100%;"></div>');; |
| | | that.generateHtml(options.data, _html,_script); |
| | | console.log(_html.html()); |
| | | var _htmlCode = staticField.htmlCode.format(_html.html(),_script.html()); |
| | | document.getElementById('generate-code-view').value = style_html(_htmlCode, 4, ' ', 400); |
| | | layer.open({ |
| | |
| | | }); |
| | | |
| | | }); |
| | | |
| | | $('.generateHtml').on('click', function () { |
| | | var _html = $('<div style="height:100%;width:100%;"></div>'); |
| | | var _script = $('<div style="height:100%;width:100%;"></div>'); |
| | | that.generateHtml(options.data, _html,_script); |
| | | console.log(_html.html()); |
| | | return _html.html(); |
| | | }); |
| | | |
| | | that.renderForm(); |
| | | } |
| | | |
| | |
| | | <div style="height: 90%; width: 100%;" id="formDesigner"></div> |
| | | <hr> |
| | | <div class="layui-form-item text-right" style="padding-right: 25px"> |
| | | <button class="layui-btn" lay-filter="forEditSubmit" lay-submit>保存</button> |
| | | <button class="layui-btn generateHtml" lay-filter="forEditSubmit" lay-submit>保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </script> |
| | |
| | | elem:'#formDesigner' |
| | | }); |
| | | form.on('submit(forEditSubmit)', function () { |
| | | var loadIndex = layer.load(2); |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/planType/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |