first commit
This commit is contained in:
146
WebRoot/jsp/timeefficiency/patrolRecordViewPic.jsp
Normal file
146
WebRoot/jsp/timeefficiency/patrolRecordViewPic.jsp
Normal file
@ -0,0 +1,146 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@page import="com.sipai.entity.maintenance.Abnormity" %>
|
||||
|
||||
<%request.setAttribute("Start", Abnormity.Status_Start); %>
|
||||
<%request.setAttribute("Processing", Abnormity.Status_Processing); %>
|
||||
<%request.setAttribute("Finish", Abnormity.Status_Finish); %>
|
||||
<%request.setAttribute("Clear", Abnormity.Status_Clear); %>
|
||||
|
||||
<%request.setAttribute("Type_Run", Abnormity.Type_Run); %>
|
||||
<%request.setAttribute("Type_Equipment", Abnormity.Type_Equipment); %>
|
||||
<%request.setAttribute("Type_Facilities", Abnormity.Type_Facilities); %>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("FILE_TYPE_IMAGE", CommString.FILE_TYPE_IMAGE); %>
|
||||
<%request.setAttribute("FILE_TYPE_VIDEO", CommString.FILE_TYPE_VIDEO); %>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var masterId = '${param.id}';
|
||||
var tbName = 'TB_TimeEfficiency_PatrolRecord_file'; //数据表
|
||||
var nameSpace = 'patrolrecordsafepic';//保存文件夹
|
||||
var bucketName = 'patrolrecordsafepic';
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
allowedFileExtensions: ['jpg', 'png', 'gif', 'pdf', 'doc', 'xls', 'docx', 'ppt', 'pptx', 'xlsx'],
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList_minio.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
bucketName: bucketName,
|
||||
type: '${FILE_TYPE_IMAGE}'
|
||||
}, function (data) {
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = 'data:image/png;base64,' + data[i].streamFile;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfig['showRemove'] = false;//不显示移除按钮
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("picFile");
|
||||
} else {
|
||||
$('#picFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
$(function () {
|
||||
getFileList();
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subPicModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">图片预览</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="picFile" id="picFile" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12" id="showView_view"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user