154 lines
6.4 KiB
Plaintext
154 lines
6.4 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<style type="text/css">
|
|
.select2-container .select2-selection--single{
|
|
height:34px;
|
|
line-height: 34px;
|
|
}
|
|
.select2-selection__arrow{
|
|
margin-top:3px;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
var masterId='${abnormity.id}';
|
|
var tbName='tb_maintenance_problem_fille'; //数据表
|
|
var nameSpace='MaintenanceProblem';//保存文件夹
|
|
var previews = new Array();
|
|
var previewConfigs = new Array();
|
|
function showFileInput(ctrlName) {
|
|
var control = $('#' + ctrlName);
|
|
|
|
control.fileinput('destroy');
|
|
control.fileinput({
|
|
language: 'zh', //设置语言
|
|
showUpload: false, //是否显示上传按钮
|
|
showRemove:false,
|
|
showCaption: false,//是否显示标题
|
|
showBrowse:false,//选择按钮
|
|
showClose:false,//右上角关闭按钮
|
|
showRemove: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:'',
|
|
actionDelete:''
|
|
},
|
|
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.do', {masterId:masterId,tbName:tbName} , function(data) {
|
|
//console.info(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[i].abspath;
|
|
path=path.substring(path.indexOf('webapps')+7,path.length);
|
|
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
|
previews.push(path);
|
|
previewConfig['width']= '50px';
|
|
previewConfig['caption']= data[i].filename;
|
|
previewConfig['key']= data[i].id;
|
|
previewConfigs.push(previewConfig);
|
|
}
|
|
showFileInput("maintenanceDetailFile");
|
|
}else{
|
|
$('#maintenanceDetailFile').hide();
|
|
}
|
|
},'json');
|
|
|
|
};
|
|
$(function(){
|
|
getFileList();
|
|
})
|
|
</script>
|
|
<div class="modal fade" id="subAbnormalModal">
|
|
<div class="modal-dialog">
|
|
<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">
|
|
<!-- 新增界面formid强制为subForm -->
|
|
<form class="form-horizontal" id="subForm">
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|
<div id="alertDiv"></div>
|
|
<input type="hidden" class="form-control" id="id" name ="id" value ="${abnormity.id}">
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">所属厂区</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" id="bizId" name ="bizId" value ="${abnormity.company.name}" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">工艺段</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" value ="${abnormity.processSection.name}" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
<!-- <div class="form-group">
|
|
<label class="col-sm-2 control-label">异常类型</label>
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" id="type" name ="type" value ="" disabled="disabled">
|
|
</div>
|
|
</div> -->
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">异常描述</label>
|
|
<div class="col-sm-10">
|
|
<textarea class="form-control " id="abnormityDescription" name="abnormityDescription" rows="2" disabled="disabled">${abnormity.abnormityDescription}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" id="equipment">
|
|
<label class="col-sm-2 control-label">异常设备</label>
|
|
<div class="col-sm-10">
|
|
<input class="form-control" id="equipmentIds" name ="equipmentIds" value="${abnormity.equipmentNames}" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">备注</label>
|
|
<div class="col-sm-10">
|
|
<textarea class="form-control " id="remark" name="remark" rows="2" disabled="disabled">${abnormity.remark}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">图片</label>
|
|
</div>
|
|
<div class="form-group" style="margin:8px;">
|
|
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
|
</div>
|
|
</div>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
<!-- /.modal-dialog -->
|
|
</div>
|