|
|
@ -8,6 +8,12 @@
|
|
|
|
#break
|
|
|
|
#break
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload")
|
|
|
|
|
|
|
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
|
|
|
|
|
|
|
#break
|
|
|
|
|
|
|
|
#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">
|
|
|
@ -46,6 +52,16 @@
|
|
|
|
<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 == "upload")
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
|
|
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
|
|
|
<input type="hidden" name="${field}" th:field="*{${field}}">
|
|
|
|
|
|
|
|
<div class="file-loading">
|
|
|
|
|
|
|
|
<input class="form-control file-upload" id="${field}" name="file" type="file">
|
|
|
|
|
|
|
|
</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>
|
|
|
@ -146,6 +162,12 @@
|
|
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
|
|
#break
|
|
|
|
#break
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
|
|
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload")
|
|
|
|
|
|
|
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
|
|
|
|
|
|
|
#break
|
|
|
|
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
<script th:inline="javascript">
|
|
|
|
<script th:inline="javascript">
|
|
|
|
var prefix = ctx + "${moduleName}/${businessName}";
|
|
|
|
var prefix = ctx + "${moduleName}/${businessName}";
|
|
|
@ -175,6 +197,27 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
#foreach($column in $columns)
|
|
|
|
|
|
|
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "upload")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".file-upload").each(function (i) {
|
|
|
|
|
|
|
|
var val = $("input[name='" + this.id + "']").val()
|
|
|
|
|
|
|
|
$(this).fileinput({
|
|
|
|
|
|
|
|
'uploadUrl': '/common/upload',
|
|
|
|
|
|
|
|
initialPreviewAsData: true,
|
|
|
|
|
|
|
|
initialPreview: [val],
|
|
|
|
|
|
|
|
maxFileCount: 1,
|
|
|
|
|
|
|
|
autoReplace: true
|
|
|
|
|
|
|
|
}).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');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
#break
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
#end
|
|
|
|
#if($table.tree)
|
|
|
|
#if($table.tree)
|
|
|
|
|
|
|
|
|
|
|
|
/*${functionName}-新增-选择父部门树*/
|
|
|
|
/*${functionName}-新增-选择父部门树*/
|
|
|
|