From 1586933eb56265e06a4af721ed7ad65e1ba7aa6c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 17 十一月 2022 21:41:32 +0800
Subject: [PATCH] #
---
src/main/webapp/views/planType/planType.html | 4 ++--
src/main/webapp/static/layui/lay/modules/formDesigner.js | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/static/layui/lay/modules/formDesigner.js b/src/main/webapp/static/layui/lay/modules/formDesigner.js
index 37b4292..a25bcb7 100644
--- a/src/main/webapp/static/layui/lay/modules/formDesigner.js
+++ b/src/main/webapp/static/layui/lay/modules/formDesigner.js
@@ -4671,6 +4671,7 @@
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({
@@ -4692,6 +4693,15 @@
});
});
+
+ $('.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();
}
diff --git a/src/main/webapp/views/planType/planType.html b/src/main/webapp/views/planType/planType.html
index aa86ebb..35f6504 100644
--- a/src/main/webapp/views/planType/planType.html
+++ b/src/main/webapp/views/planType/planType.html
@@ -122,7 +122,7 @@
<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>
@@ -219,7 +219,7 @@
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')},
--
Gitblit v1.9.1