<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
<head>
|
<th:block th:include="include :: header('公司四色平面图')"/>
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
<th:block th:include="include :: datetimepicker-css"/>
|
<style type="text/css">
|
.btn-file {
|
display: none;
|
}
|
|
.kv-file-remove {
|
display: none;
|
}
|
|
.krajee-default .file-footer-caption {
|
display: none;
|
}
|
|
.krajee-default.file-preview-frame .file-thumbnail-footer {
|
height: 30px;
|
}
|
|
.glyphicon-move:before {
|
display: none;
|
}
|
</style>
|
</head>
|
|
<!--多图上传样式-->
|
<link rel="stylesheet" href="/ajax/libs/layui/css/layui.css" media="all">
|
|
<body class="white-bg">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<form class="form-horizontal m" id="form-company-detail" th:object="${company}">
|
|
<div class="form-group">
|
<div class="col-sm-11">
|
<input name="companyFourColorMapUrl" th:value="*{companyFourColorMapUrl}" type="hidden"
|
id="companyFourColorMapUrl">
|
<div class="file-loading">
|
<input name="file" id="companyFourColorMapUrlUpload" type="file">
|
<!-- </div>-->
|
</div>
|
</div>
|
</div>
|
|
|
</form>
|
</div>
|
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
<th:block th:include="include :: datetimepicker-js"/>
|
<script type="text/javascript">
|
$(function () {
|
showDetail($("#companyFourColorMapUrlUpload"), $("#companyFourColorMapUrl"));
|
showDetail($("#postSafetyRiskBarChartUrlUpload"), $("#postSafetyRiskBarChartUrl"));
|
showDetail($("#companyBusinessLicenseUpload"), $("#companyBusinessLicense"));
|
|
});
|
|
|
$(function () {
|
$("#form-company-detail").find("input,textarea,select").attr("disabled", "disabled");
|
});
|
|
|
var showDetail = function (thatFile, thatUrl, callback) {
|
var urlObj = $(thatUrl).val();
|
var previewUrl = [];
|
var config = [];
|
if (urlObj) {
|
urlObj = JSON.parse(urlObj);
|
for (var key in urlObj) {
|
previewUrl.push(urlObj[key]);
|
var tem = {};
|
tem['key'] = key;
|
config.push(tem)
|
}
|
}
|
;
|
var lastThatFile =
|
$(thatFile).fileinput({
|
'theme': 'explorer-fas',
|
showUpload: false,
|
overwriteInitial: false,
|
initialPreviewAsData: true,
|
language: 'zh',
|
dropZoneEnabled: false,
|
resizeImage: false,
|
showCaption: false,
|
showPreview: true,
|
showRemove: false,
|
showClose: false,
|
browseClass: "btn btn-primary btn-lg",
|
allowedFileExtensions: ['jpg', 'png', 'gif', 'jpeg', 'bmp'],
|
previewFileIcon: '',
|
initialPreviewConfig: config,
|
initialPreview: previewUrl
|
});
|
}
|
</script>
|
</body>
|
</html>
|