增加动态表单自动排版配置界面的保存回显逻辑
This commit is contained in:
parent
3a721854b4
commit
d84dc92055
@ -14,6 +14,7 @@
|
|||||||
<result column="template_all_generate" property="templateAllGenerate"/>
|
<result column="template_all_generate" property="templateAllGenerate"/>
|
||||||
<result column="template_file_type" property="templateFileType"/>
|
<result column="template_file_type" property="templateFileType"/>
|
||||||
<result column="template_mode" property="templateMode"/>
|
<result column="template_mode" property="templateMode"/>
|
||||||
|
<result column="template_project" property="templateProject"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="saveTemplateConfig" parameterType="map">
|
<insert id="saveTemplateConfig" parameterType="map">
|
||||||
@ -29,6 +30,7 @@
|
|||||||
template_all_generate,
|
template_all_generate,
|
||||||
template_file_type,
|
template_file_type,
|
||||||
template_mode,
|
template_mode,
|
||||||
|
template_project,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
modifier,
|
modifier,
|
||||||
@ -46,6 +48,7 @@
|
|||||||
#{templateAllGenerate},
|
#{templateAllGenerate},
|
||||||
#{templateFileType},
|
#{templateFileType},
|
||||||
#{templateMode},
|
#{templateMode},
|
||||||
|
#{templateProject},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{modifier},
|
#{modifier},
|
||||||
@ -114,6 +117,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="templateMode != null and templateMode != ''">
|
<if test="templateMode != null and templateMode != ''">
|
||||||
template_mode = #{templateMode},
|
template_mode = #{templateMode},
|
||||||
|
</if>
|
||||||
|
<if test="templateProject != null and templateProject != ''">
|
||||||
|
template_project = #{templateProject},
|
||||||
</if>
|
</if>
|
||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
gmt_modified = #{gmtModified}
|
gmt_modified = #{gmtModified}
|
||||||
@ -133,7 +139,8 @@
|
|||||||
t1.template_file,
|
t1.template_file,
|
||||||
t1.template_all_generate,
|
t1.template_all_generate,
|
||||||
t1.template_file_type,
|
t1.template_file_type,
|
||||||
t1.template_mode
|
t1.template_mode,
|
||||||
|
t1.template_project
|
||||||
FROM
|
FROM
|
||||||
m_template_config t1
|
m_template_config t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -152,7 +159,8 @@
|
|||||||
t1.template_file,
|
t1.template_file,
|
||||||
t1.template_all_generate,
|
t1.template_all_generate,
|
||||||
t1.template_file_type,
|
t1.template_file_type,
|
||||||
t1.template_mode
|
t1.template_mode,
|
||||||
|
t1.template_project
|
||||||
FROM
|
FROM
|
||||||
m_template_config t1
|
m_template_config t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -175,7 +183,8 @@
|
|||||||
t1.template_file,
|
t1.template_file,
|
||||||
t1.template_all_generate,
|
t1.template_all_generate,
|
||||||
t1.template_file_type,
|
t1.template_file_type,
|
||||||
t1.template_mode
|
t1.template_mode,
|
||||||
|
t1.template_project
|
||||||
FROM
|
FROM
|
||||||
m_template_config t1
|
m_template_config t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -186,6 +195,9 @@
|
|||||||
t1.template_name LIKE CONCAT('%', #{keywords}, '%')
|
t1.template_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="templateProject != null and templateProject != ''">
|
||||||
|
AND t1.template_project = #{templateProject}
|
||||||
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND
|
AND
|
||||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
@ -153,6 +153,9 @@
|
|||||||
t1.template_record_id LIKE CONCAT('%', #{keywords}, '%')
|
t1.template_record_id LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="templateProject != null and templateProject != ''">
|
||||||
|
AND t2.template_project = #{templateProject}
|
||||||
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND
|
AND
|
||||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-inline layui-form search-item-200px" id="templateProjectSelectTemplateBox" lay-filter="templateProjectSelectTemplateBox"></div>
|
||||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
<i class="fa fa-lg fa-search"></i> 搜索
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
</button>
|
</button>
|
||||||
@ -50,6 +51,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script id="templateProjectSelectTemplate" type="text/html">
|
||||||
|
<select id="templateProject" name="templateProject">
|
||||||
|
<option value="">请选择所属项目</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dataId}}">{{item.dataName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
@ -67,6 +76,19 @@
|
|||||||
var resizeTimeout = null;
|
var resizeTimeout = null;
|
||||||
var tableUrl = 'api/templateconfig/listpagetemplateconfig';
|
var tableUrl = 'api/templateconfig/listpagetemplateconfig';
|
||||||
|
|
||||||
|
// 初始化项目
|
||||||
|
function initTemplateProject(templateProject) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/8b321dfb-3bb3-4ec4-8d42-fa764c0a086f', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('templateProjectSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('templateProjectSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', 'templateProjectSelectTemplateBox');
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTemplateProject();
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function initTable() {
|
function initTable() {
|
||||||
table.render({
|
table.render({
|
||||||
@ -166,7 +188,8 @@
|
|||||||
where: {
|
where: {
|
||||||
keywords: $('#keywords').val(),
|
keywords: $('#keywords').val(),
|
||||||
startTime: $('#startTime').val(),
|
startTime: $('#startTime').val(),
|
||||||
endTime: $('#endTime').val()
|
endTime: $('#endTime').val(),
|
||||||
|
templateProject: $('#templateProject').val()
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
curr: currentPage
|
curr: currentPage
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-inline layui-form search-item-200px" id="templateProjectSelectTemplateBox" lay-filter="templateProjectSelectTemplateBox"></div>
|
||||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
<i class="fa fa-lg fa-search"></i> 搜索
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
</button>
|
</button>
|
||||||
@ -50,6 +51,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script id="templateProjectSelectTemplate" type="text/html">
|
||||||
|
<select id="templateProject" name="templateProject">
|
||||||
|
<option value="">请选择所属项目</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dataId}}">{{item.dataName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
@ -67,6 +76,19 @@
|
|||||||
var resizeTimeout = null;
|
var resizeTimeout = null;
|
||||||
var tableUrl = 'api/templaterecord/listpagetemplaterecord';
|
var tableUrl = 'api/templaterecord/listpagetemplaterecord';
|
||||||
|
|
||||||
|
// 初始化项目
|
||||||
|
function initTemplateProject(templateProject) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/8b321dfb-3bb3-4ec4-8d42-fa764c0a086f', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('templateProjectSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('templateProjectSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', 'templateProjectSelectTemplateBox');
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTemplateProject();
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function initTable() {
|
function initTable() {
|
||||||
table.render({
|
table.render({
|
||||||
@ -175,7 +197,8 @@
|
|||||||
where: {
|
where: {
|
||||||
keywords: $('#keywords').val(),
|
keywords: $('#keywords').val(),
|
||||||
startTime: $('#startTime').val(),
|
startTime: $('#startTime').val(),
|
||||||
endTime: $('#endTime').val()
|
endTime: $('#endTime').val(),
|
||||||
|
templateProject: $('#templateProject').val()
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
curr: currentPage
|
curr: currentPage
|
||||||
|
@ -39,6 +39,16 @@ public class TemplateConfigDTO {
|
|||||||
private String templateFileType;
|
private String templateFileType;
|
||||||
@ApiModelProperty(name = "templateMode", value = "访问方式1:Nginx静态访问,2:系统接口访问")
|
@ApiModelProperty(name = "templateMode", value = "访问方式1:Nginx静态访问,2:系统接口访问")
|
||||||
private String templateMode;
|
private String templateMode;
|
||||||
|
@ApiModelProperty(name = "templateProject", value = "模板项目")
|
||||||
|
private String templateProject;
|
||||||
|
|
||||||
|
public String getTemplateProject() {
|
||||||
|
return templateProject == null ? "" : templateProject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateProject(String templateProject) {
|
||||||
|
this.templateProject = templateProject;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTemplateMode() {
|
public String getTemplateMode() {
|
||||||
return templateMode == null ? "" : templateMode;
|
return templateMode == null ? "" : templateMode;
|
||||||
|
@ -41,7 +41,19 @@ public class TemplateConfigVO {
|
|||||||
@CheckEmptyAnnotation(name = "生成文件类型")
|
@CheckEmptyAnnotation(name = "生成文件类型")
|
||||||
private String templateFileType;
|
private String templateFileType;
|
||||||
@ApiModelProperty(name = "templateMode", value = "访问方式1:Nginx静态访问,2:系统接口访问")
|
@ApiModelProperty(name = "templateMode", value = "访问方式1:Nginx静态访问,2:系统接口访问")
|
||||||
|
@CheckEmptyAnnotation(name = "访问方式")
|
||||||
private String templateMode;
|
private String templateMode;
|
||||||
|
@ApiModelProperty(name = "templateMode", value = "模板项目")
|
||||||
|
@CheckEmptyAnnotation(name = "模板类型")
|
||||||
|
private String templateProject;
|
||||||
|
|
||||||
|
public String getTemplateProject() {
|
||||||
|
return templateProject == null ? "" : templateProject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateProject(String templateProject) {
|
||||||
|
this.templateProject = templateProject;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTemplateMode() {
|
public String getTemplateMode() {
|
||||||
return templateMode == null ? "" : templateMode;
|
return templateMode == null ? "" : templateMode;
|
||||||
|
Loading…
Reference in New Issue
Block a user