Pre Merge pull request !178 from 谢祥瑞/generator
This commit is contained in:
commit
a75f95b667
|
|
@ -1228,6 +1228,26 @@ var table = {
|
||||||
$.modal.alertError(result.msg);
|
$.modal.alertError(result.msg);
|
||||||
}
|
}
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
|
},
|
||||||
|
// 显示富文本详细内容
|
||||||
|
seeSummernoteDetail: function(index,fild) {
|
||||||
|
table.set();
|
||||||
|
var row = $("#" + table.options.id).bootstrapTable('getData')[index];
|
||||||
|
console.log(row)
|
||||||
|
var content =window.atob(row[fild]);
|
||||||
|
var htmlcontent = [
|
||||||
|
"<div style='padding:20px;'>",
|
||||||
|
content,
|
||||||
|
"</div>"
|
||||||
|
].join('');
|
||||||
|
layer.open({
|
||||||
|
title: false,
|
||||||
|
type: 1,
|
||||||
|
closeBtn: true,
|
||||||
|
shadeClose: true,
|
||||||
|
area: ['800px', ($(window).height() - 50)+ 'px'],
|
||||||
|
content: htmlcontent
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 校验封装处理
|
// 校验封装处理
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class GenTableColumn extends BaseEntity
|
||||||
/** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */
|
/** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */
|
||||||
private String queryType;
|
private String queryType;
|
||||||
|
|
||||||
/** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件) */
|
/** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、upload附件上传、summernote 富文本) */
|
||||||
private String htmlType;
|
private String htmlType;
|
||||||
|
|
||||||
/** 字典类型 */
|
/** 字典类型 */
|
||||||
|
|
|
||||||
|
|
@ -520,6 +520,8 @@
|
||||||
<option value="radio" {{if htmlType==="radio"}}selected{{/if}}>单选框</option>
|
<option value="radio" {{if htmlType==="radio"}}selected{{/if}}>单选框</option>
|
||||||
<option value="checkbox" {{if htmlType==="checkbox"}}selected{{/if}}>复选框</option>
|
<option value="checkbox" {{if htmlType==="checkbox"}}selected{{/if}}>复选框</option>
|
||||||
<option value="datetime" {{if htmlType==="datetime"}}selected{{/if}}>日期控件</option>
|
<option value="datetime" {{if htmlType==="datetime"}}selected{{/if}}>日期控件</option>
|
||||||
|
<option value="upload" {{if htmlType==="upload"}}selected{{/if}}>文件上传</option>
|
||||||
|
<option value="summernote" {{if htmlType==="summernote"}}selected{{/if}}>富文本</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,34 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('新增${functionName}')" />
|
<th:block th:include="include :: header('新增${functionName}')"/>
|
||||||
|
#set($isUpload = false)
|
||||||
|
#set($isSummernote = false)
|
||||||
|
#set($isDateTime = false)
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
<th:block th:include="include :: datetimepicker-css" />
|
#set($isDateTime = true)
|
||||||
|
<th:block th:include="include :: datetimepicker-css"/>
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "upload" )
|
||||||
|
#set($isUpload = true)
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "summernote")
|
||||||
|
#set($isSummernote = true)
|
||||||
|
<th:block th:include="include :: summernote-css"/>
|
||||||
#break
|
#break
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-${businessName}-add">
|
<form class="form-horizontal m" id="form-${businessName}-add">
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
<h4 class="form-header h4">${functionName}信息</h4>
|
<h4 class="form-header h4">${functionName}信息</h4>
|
||||||
|
|
@ -34,24 +52,31 @@
|
||||||
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
||||||
#set($treeId = "${className}?.${treeCode}")
|
#set($treeId = "${className}?.${treeCode}")
|
||||||
<input id="treeId" name="${treeParentCode}" type="hidden" th:value="${${treeId}}"/>
|
<input id="treeId" name="${treeParentCode}" type="hidden" th:value="${${treeId}}"/>
|
||||||
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" readonly="true" th:value="${${treeName}}"#if($column.required) required#end>
|
<input class="form-control" type="text" onclick="select${BusinessName}Tree()"
|
||||||
|
id="treeName" readonly="true" th:value="${${treeName}}"#if($column.required)
|
||||||
|
required#end>
|
||||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#elseif($column.htmlType == "input")
|
#elseif($column.htmlType == "input")
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}
|
||||||
|
:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="${field}" class="form-control" type="text"#if($column.required) required#end>
|
<input name="${field}" class="form-control" type="text"#if($column.required)
|
||||||
|
required#end>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end>
|
<select name="${field}" class="form-control m-b"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
th:with="type=${@dict.getType('${dictType}')}"#if($column.required)
|
||||||
|
required#end>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -70,7 +95,8 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
|
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
|
||||||
<label th:each="dict : ${type}" class="check-box">
|
<label th:each="dict : ${type}" class="check-box">
|
||||||
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"#if($column.required) required#end>
|
<input name="${field}" type="checkbox" th:value="${dict.dictValue}"
|
||||||
|
th:text="${dict.dictLabel}"#if($column.required) required#end>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -89,7 +115,9 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
|
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
|
||||||
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:checked="${dict.default}"#if($column.required) required#end>
|
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}"
|
||||||
|
th:value="${dict.dictValue}"
|
||||||
|
th:checked="${dict.default}"#if($column.required) required#end>
|
||||||
<label th:for="${'${field}_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
<label th:for="${'${field}_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -110,7 +138,8 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="${field}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end>
|
<input name="${field}" class="form-control" placeholder="yyyy-MM-dd"
|
||||||
|
type="text"#if($column.required) required#end>
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,7 +148,27 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<textarea name="${field}" class="form-control"#if($column.required) required#end></textarea>
|
<textarea name="${field}" class="form-control"#if($column.required)
|
||||||
|
required#end></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "upload")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input type="hidden" name="${field}">
|
||||||
|
<input class="form-control file-upload" name="file" id="${field}"
|
||||||
|
type="file" #if($column.required) required#end>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "summernote" )
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" class="form-control" name="${field}">
|
||||||
|
<div class="summernote" id="${field}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#end
|
#end
|
||||||
|
|
@ -130,8 +179,10 @@
|
||||||
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
增加</i></button>
|
||||||
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus">
|
||||||
|
删除</i></button>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table"></table>
|
<table id="bootstrap-table"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -139,15 +190,18 @@
|
||||||
</div>
|
</div>
|
||||||
#end
|
#end
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer"/>
|
||||||
#foreach($column in $columns)
|
#if($isDateTime)
|
||||||
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
<th:block th:include="include :: datetimepicker-js"/>
|
||||||
<th:block th:include="include :: datetimepicker-js" />
|
|
||||||
#break
|
|
||||||
#end
|
#end
|
||||||
|
#if($isUpload)
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
#end
|
#end
|
||||||
<script th:inline="javascript">
|
#if($isSummernote)
|
||||||
|
<th:block th:include="include :: summernote-js"/>
|
||||||
|
#end
|
||||||
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "${moduleName}/${businessName}"
|
var prefix = ctx + "${moduleName}/${businessName}"
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
#foreach($column in $subTable.columns)
|
#foreach($column in $subTable.columns)
|
||||||
|
|
@ -165,9 +219,9 @@
|
||||||
$.operate.save(prefix + "/add", $('#form-${businessName}-add').serialize());
|
$.operate.save(prefix + "/add", $('#form-${businessName}-add').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if($isDateTime)
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
|
||||||
$("input[name='$column.javaField']").datetimepicker({
|
$("input[name='$column.javaField']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd",
|
||||||
minView: "month",
|
minView: "month",
|
||||||
|
|
@ -175,8 +229,46 @@
|
||||||
});
|
});
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#if($table.tree)
|
#end
|
||||||
|
#if($isUpload)
|
||||||
|
// 文件上传
|
||||||
|
$(".file-upload").fileinput({
|
||||||
|
'theme': 'explorer-fas',
|
||||||
|
'uploadUrl': '/common/upload',
|
||||||
|
overwriteInitial: false,
|
||||||
|
initialPreviewAsData: true,
|
||||||
|
maxFileCount: 1, // 最大上传数
|
||||||
|
autoReplace: true, // 自动替换预览图(maxFileCount 是前置条件)
|
||||||
|
overwriteInitial: true, // 选择文件后覆盖预览图
|
||||||
|
layoutTemplates :{
|
||||||
|
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||||
|
actionDrag:'' // 去除预览图拖拽图标
|
||||||
|
}
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
// 赋值
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
// 清空数据
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
})
|
||||||
|
$(this).fileinput('_initFileActions');
|
||||||
|
#end
|
||||||
|
#if($isSummernote)
|
||||||
|
$(function () {
|
||||||
|
$('.summernote').summernote({
|
||||||
|
height: 100,
|
||||||
|
lang: 'zh-CN',
|
||||||
|
callbacks: {
|
||||||
|
onChange: function (contents, $edittable) {
|
||||||
|
// Xss 过滤掉了html 内容 ,所以用base64 保存
|
||||||
|
$("input[name='" + this.id + "']").val(window.btoa(contents))
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
#end
|
||||||
|
#if($table.tree)
|
||||||
/*${functionName}-新增-选择父部门树*/
|
/*${functionName}-新增-选择父部门树*/
|
||||||
function select${BusinessName}Tree() {
|
function select${BusinessName}Tree() {
|
||||||
var options = {
|
var options = {
|
||||||
|
|
@ -188,23 +280,24 @@
|
||||||
$.modal.openOptions(options);
|
$.modal.openOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSubmit(index, layero){
|
function doSubmit(index, layero) {
|
||||||
var body = layer.getChildFrame('body', index);
|
var body = layer.getChildFrame('body', index);
|
||||||
$("#treeId").val(body.find('#treeId').val());
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
$("#treeName").val(body.find('#treeName').val());
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
#if($table.sub)
|
|
||||||
|
|
||||||
$(function() {
|
#if($table.sub)
|
||||||
|
$(function () {
|
||||||
var options = {
|
var options = {
|
||||||
pagination: false,
|
pagination: false,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
showToggle: false,
|
showToggle: false,
|
||||||
showColumns: false,
|
showColumns: false,
|
||||||
columns: [{
|
columns: [
|
||||||
|
{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -231,26 +324,30 @@
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '${comment}',
|
title: '${comment}',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
|
var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
|
||||||
return $.common.dictToSelect(${javaField}Datas, value, name);
|
return $.common.dictToSelect(${javaField}Datas, value, name);
|
||||||
}
|
}
|
||||||
#if($velocityCount != $subTable.columns.size())},#end
|
#if($velocityCount != $subTable.columns.size())
|
||||||
|
},
|
||||||
|
#end
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '${comment}',
|
title: '${comment}',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
#if($velocityCount != $subTable.columns.size())},#end
|
#if($velocityCount != $subTable.columns.size())
|
||||||
|
},
|
||||||
|
#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
@ -258,7 +355,6 @@
|
||||||
function addColumn() {
|
function addColumn() {
|
||||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||||
sub.editColumn();
|
sub.editColumn();
|
||||||
|
|
||||||
$("#" + table.options.id).bootstrapTable('insertRow', {
|
$("#" + table.options.id).bootstrapTable('insertRow', {
|
||||||
index: count,
|
index: count,
|
||||||
row: {
|
row: {
|
||||||
|
|
@ -268,13 +364,12 @@
|
||||||
#if($column.pk || $javaField == ${subTableFkclassName})
|
#if($column.pk || $javaField == ${subTableFkclassName})
|
||||||
#else
|
#else
|
||||||
${javaField}: ""#if($velocityCount != $subTable.columns.size()),#end
|
${javaField}: ""#if($velocityCount != $subTable.columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,16 +1,34 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('修改${functionName}')" />
|
#set($isUpload = false)
|
||||||
|
#set($isSummernote = false)
|
||||||
|
#set($isDateTime = false)
|
||||||
|
<th:block th:include="include :: header('修改${functionName}')"/>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
<th:block th:include="include :: datetimepicker-css" />
|
#set($isDateTime = true)
|
||||||
|
<th:block th:include="include :: datetimepicker-css"/>
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "upload")
|
||||||
|
#set($isUpload = true)
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "summernote")
|
||||||
|
#set($isSummernote = true)
|
||||||
|
<th:block th:include="include :: summernote-css"/>
|
||||||
#break
|
#break
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-${businessName}-edit" th:object="${${className}}">
|
<form class="form-horizontal m" id="form-${businessName}-edit" th:object="${${className}}">
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
<h4 class="form-header h4">${functionName}信息</h4>
|
<h4 class="form-header h4">${functionName}信息</h4>
|
||||||
|
|
@ -33,25 +51,33 @@
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
||||||
<input id="treeId" name="${treeParentCode}" type="hidden" th:field="*{${treeParentCode}}" />
|
<input id="treeId" name="${treeParentCode}" type="hidden"
|
||||||
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" readonly="true" th:field="*{parentName}"#if($column.required) required#end>
|
th:field="*{${treeParentCode}}"/>
|
||||||
|
<input class="form-control" type="text" onclick="select${BusinessName}Tree()"
|
||||||
|
id="treeName" readonly="true" th:field="*{parentName}"#if($column.required)
|
||||||
|
required#end>
|
||||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#elseif($column.htmlType == "input")
|
#elseif($column.htmlType == "input")
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}
|
||||||
|
:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="${field}" th:field="*{${field}}" class="form-control" type="text"#if($column.required) required#end>
|
<input name="${field}" th:field="*{${field}}" class="form-control"
|
||||||
|
type="text"#if($column.required) required#end>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end>
|
<select name="${field}" class="form-control m-b"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{${field}}"></option>
|
th:with="type=${@dict.getType('${dictType}')}"#if($column.required)
|
||||||
|
required#end>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}" th:field="*{${field}}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -70,7 +96,10 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
|
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
|
||||||
<label th:each="dict : ${type}" class="check-box">
|
<label th:each="dict : ${type}" class="check-box">
|
||||||
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end>
|
<input name="${field}" type="checkbox" th:value="${dict.dictValue}"
|
||||||
|
th:text="${dict.dictLabel}"
|
||||||
|
th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required)
|
||||||
|
required#end>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -89,7 +118,9 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
|
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
|
||||||
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required) required#end>
|
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}"
|
||||||
|
th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required)
|
||||||
|
required#end>
|
||||||
<label th:for="${'${field}_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
<label th:for="${'${field}_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -110,7 +141,10 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="${field}" th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end>
|
<input name="${field}"
|
||||||
|
th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd')}"
|
||||||
|
class="form-control" placeholder="yyyy-MM-dd"
|
||||||
|
type="text"#if($column.required) required#end>
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,7 +153,28 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<textarea name="${field}" class="form-control"#if($column.required) required#end>[[*{${field}}]]</textarea>
|
<textarea name="${field}" class="form-control"#if($column.required)
|
||||||
|
required#end>[[*{${field}}]]</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "upload" || $column.htmlType == "uploads")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input type="hidden" th:field="*{${field}}">
|
||||||
|
<input class="form-control file-upload" name="file" id="${field}"
|
||||||
|
type="file" #if($column.htmlType == "uploads")
|
||||||
|
multiple#end #if($column.required) required#end>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "summernote" )
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" class="form-control" th:field="*{${field}}">
|
||||||
|
<div class="summernote" id="${field}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#end
|
#end
|
||||||
|
|
@ -130,8 +185,10 @@
|
||||||
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
增加</i></button>
|
||||||
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus">
|
||||||
|
删除</i></button>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table"></table>
|
<table id="bootstrap-table"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -139,15 +196,18 @@
|
||||||
</div>
|
</div>
|
||||||
#end
|
#end
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer"/>
|
||||||
#foreach($column in $columns)
|
#if($isDateTime)
|
||||||
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
<th:block th:include="include :: datetimepicker-js"/>
|
||||||
<th:block th:include="include :: datetimepicker-js" />
|
|
||||||
#break
|
|
||||||
#end
|
#end
|
||||||
|
#if($isUpload)
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
#end
|
#end
|
||||||
<script th:inline="javascript">
|
#if($isSummernote)
|
||||||
|
<th:block th:include="include :: summernote-js"/>
|
||||||
|
#end
|
||||||
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "${moduleName}/${businessName}";
|
var prefix = ctx + "${moduleName}/${businessName}";
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
#foreach($column in $subTable.columns)
|
#foreach($column in $subTable.columns)
|
||||||
|
|
@ -165,9 +225,9 @@
|
||||||
$.operate.save(prefix + "/edit", $('#form-${businessName}-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-${businessName}-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if($isDateTime)
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
|
||||||
$("input[name='$column.javaField']").datetimepicker({
|
$("input[name='$column.javaField']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd",
|
||||||
minView: "month",
|
minView: "month",
|
||||||
|
|
@ -175,6 +235,52 @@
|
||||||
});
|
});
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
#if($isUpload)
|
||||||
|
// 文件上传
|
||||||
|
$(".file-upload").each(function (i) {
|
||||||
|
var val = $("input[name='" + this.id + "']").val()
|
||||||
|
$(this).fileinput({
|
||||||
|
'theme': 'explorer-fas',
|
||||||
|
'uploadUrl': '/common/upload',
|
||||||
|
overwriteInitial: false,
|
||||||
|
initialPreviewAsData: true,
|
||||||
|
initialPreview: [val], // 预览图片
|
||||||
|
maxFileCount: 1, // 最大上传数
|
||||||
|
autoReplace: true, // 自动替换预览图(maxFileCount 是前置条件)
|
||||||
|
overwriteInitial: true, // 选择文件后覆盖预览图
|
||||||
|
layoutTemplates :{
|
||||||
|
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||||
|
actionDrag:'' // 去除预览图拖拽图标
|
||||||
|
}
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
// 赋值
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
// 清空数据
|
||||||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
|
})
|
||||||
|
$(this).fileinput('_initFileActions');
|
||||||
|
});
|
||||||
|
#end
|
||||||
|
#if($isSummernote)
|
||||||
|
$(function () {
|
||||||
|
$('.summernote').each(function (i) {
|
||||||
|
var content = $("input[name='" + this.id + "']").val()
|
||||||
|
content = window.atob(content);
|
||||||
|
this.innerHTML = content;
|
||||||
|
$(this).summernote({
|
||||||
|
height: 100,
|
||||||
|
lang: 'zh-CN',
|
||||||
|
callbacks: {
|
||||||
|
onChange: function (contents, $edittable) {
|
||||||
|
$("input[name='" + this.id + "']").val(window.btoa(contents))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
#end
|
||||||
#if($table.tree)
|
#if($table.tree)
|
||||||
|
|
||||||
/*${functionName}-新增-选择父部门树*/
|
/*${functionName}-新增-选择父部门树*/
|
||||||
|
|
@ -188,7 +294,7 @@
|
||||||
$.modal.openOptions(options);
|
$.modal.openOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSubmit(index, layero){
|
function doSubmit(index, layero) {
|
||||||
var body = layer.getChildFrame('body', index);
|
var body = layer.getChildFrame('body', index);
|
||||||
$("#treeId").val(body.find('#treeId').val());
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
$("#treeName").val(body.find('#treeName').val());
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
|
@ -196,8 +302,7 @@
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
|
$(function () {
|
||||||
$(function() {
|
|
||||||
var options = {
|
var options = {
|
||||||
data: [[${${className}.${subclassName}List}]],
|
data: [[${${className}.${subclassName}List}]],
|
||||||
pagination: false,
|
pagination: false,
|
||||||
|
|
@ -205,7 +310,8 @@
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
showToggle: false,
|
showToggle: false,
|
||||||
showColumns: false,
|
showColumns: false,
|
||||||
columns: [{
|
columns: [
|
||||||
|
{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -232,29 +338,31 @@
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '${comment}',
|
title: '${comment}',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
|
var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
|
||||||
return $.common.dictToSelect(${javaField}Datas, value, name);
|
return $.common.dictToSelect(${javaField}Datas, value, name);
|
||||||
}
|
}
|
||||||
#if($velocityCount != $subTable.columns.size())},#end
|
#if($velocityCount != $subTable.columns.size())
|
||||||
|
},
|
||||||
|
#end
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '${comment}',
|
title: '${comment}',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
#if($velocityCount != $subTable.columns.size())},#end
|
#if($velocityCount != $subTable.columns.size())
|
||||||
|
},
|
||||||
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
}) ;
|
||||||
|
|
||||||
function addColumn() {
|
function addColumn() {
|
||||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||||
|
|
@ -269,13 +377,12 @@
|
||||||
#if($column.pk || $javaField == ${subTableFkclassName})
|
#if($column.pk || $javaField == ${subTableFkclassName})
|
||||||
#else
|
#else
|
||||||
${javaField}: ""#if($velocityCount != $subTable.columns.size()),#end
|
${javaField}: ""#if($velocityCount != $subTable.columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -107,6 +107,8 @@
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#set($javaField=$column.javaField)
|
#set($javaField=$column.javaField)
|
||||||
|
#set($isUpload = $column.htmlType == 'upload')
|
||||||
|
#set($isSummernote = $column.htmlType == 'summernote')
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||||
|
|
@ -124,11 +126,34 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
|
#if($isUpload)
|
||||||
|
{
|
||||||
|
field: '${javaField}',
|
||||||
|
title: '${comment}',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
if(row.${column.javaField}){
|
||||||
|
return '<a class="btn btn-success btn-xs" href="'+row.${column.javaField}+'" target="view_window"><i class="fa fa-download"></i></a> '
|
||||||
|
// 如果是图片,把下面注释取消
|
||||||
|
// return $.table.imageView(row.${column.javaField});
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#elseif($isSummernote)
|
||||||
|
{
|
||||||
|
field: '${javaField}',
|
||||||
|
title: '${comment}',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return '<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.seeSummernoteDetail(' + index + ',\'${column.javaField}\')"><i class="fa fa-eye"></i></a>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#else
|
||||||
{
|
{
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
title: '${comment}',
|
title: '${comment}',
|
||||||
align: 'left'
|
align: 'left'
|
||||||
},
|
},
|
||||||
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,8 @@
|
||||||
},
|
},
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
|
#set($isUpload = $column.htmlType == 'upload')
|
||||||
|
#set($isSummernote = $column.htmlType == 'summernote')
|
||||||
#set($javaField=$column.javaField)
|
#set($javaField=$column.javaField)
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
|
|
@ -125,10 +127,36 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
|
#if($isUpload)
|
||||||
|
{
|
||||||
|
field: '${javaField}',
|
||||||
|
title: '${comment}',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
if(row.${column.javaField}){
|
||||||
|
return '<a class="btn btn-success btn-xs" href="'+row.${column.javaField}+'" target="view_window"><i class="fa fa-download"></i></a> '
|
||||||
|
// 如果是图片,把下面注释取消
|
||||||
|
// return $.table.imageView(row.${column.javaField});
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#elseif($isSummernote)
|
||||||
|
{
|
||||||
|
field: '${javaField}',
|
||||||
|
title: '${comment}',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.seeSummernoteDetail(' + index + ',\'${column.javaField}\')"><i class="fa fa-eye"></i>查看</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#else
|
||||||
{
|
{
|
||||||
field: '${javaField}',
|
field: '${javaField}',
|
||||||
title: '${comment}'
|
title: '${comment}'
|
||||||
},
|
},
|
||||||
|
#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue