301 lines
15 KiB
Plaintext
301 lines
15 KiB
Plaintext
<%@page import="com.sipai.entity.business.BusinessUnit" %>
|
||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@page import="com.sipai.entity.maintenance.Maintenance" %>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
<%String contextPath = request.getContextPath();%>
|
||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||
<%request.setAttribute("Status_Finish", Maintenance.Status_Finish);%>
|
||
<!-- 补录状态 -->
|
||
<%request.setAttribute("TYPE_SUPPLEMENT", Maintenance.TYPE_SUPPLEMENT);%>
|
||
<!-- 运维主流程状态 -->
|
||
<%request.setAttribute("TYPE_MAINTENANCE", Maintenance.TYPE_MAINTENANCE);%>
|
||
<%request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||
<!-- bootstrap-star-rating -->
|
||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js"
|
||
charset="utf-8"></script>
|
||
<script type="text/javascript">
|
||
var tbName_problem = 'tb_maintenance_problem_fille'; //数据表
|
||
var tbName_maintenance = 'tb_maintenance_file'; //数据表
|
||
var nameSpace = 'maintenance';//保存文件夹
|
||
var bucketName = 'maintenance';
|
||
var previews = new Array();
|
||
var previewConfigs = new Array();
|
||
|
||
//流程审核文件上传所需参数
|
||
var masterId_process = '${param.id}';//业务Id
|
||
var tbName_process = 'tb_maintenance_problem_fille'; //数据表
|
||
var nameSpace_process = 'maintenance';//保存文件夹
|
||
var status = 'view';//有查看权限
|
||
|
||
//初始化fileinput控件(第一次初始化)
|
||
function showFileInput(ctrlName) {
|
||
var control = $('#' + ctrlName);
|
||
control.fileinput('destroy');
|
||
control.fileinput({
|
||
language: 'zh', //设置语言
|
||
showUpload: false, //是否显示上传按钮
|
||
showRemove: false,
|
||
showCaption: false,//是否显示标题
|
||
showBrowse: false,//选择按钮
|
||
showClose: false,//右上角关闭按钮
|
||
dropZoneEnabled: false,//是否显示拖拽区域
|
||
resizeImage: true,
|
||
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: ''
|
||
}
|
||
});
|
||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||
$(this).removeData("bs.modal");
|
||
//modal重复打开会导致前面的滚动条失去作用
|
||
$('.modal').css("overflow", "auto");
|
||
});
|
||
}
|
||
|
||
var viewHandleDetailFun = function (id) {
|
||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id: id}, function (data) {
|
||
$("#handleDetailDiv").html(data);
|
||
openModal('handleDetailModal');
|
||
});
|
||
};
|
||
|
||
//流程审核文件上传所需参数
|
||
var masterId_process = '${param.id}';//业务Id
|
||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||
var status = 'view';//有查看权限
|
||
|
||
$(function () {
|
||
// getFileList_process();
|
||
$("#judgemaintainerstaff").rating('refresh', {showClear: false, showCaption: false, readonly: true});
|
||
$("#judgeresult").rating('refresh', {showClear: false, showCaption: false, readonly: true});
|
||
var result = '${businessUnitRecords}';
|
||
result = result.replace(new RegExp("\r\n", "gm"), "");
|
||
result = result.replace(/\s+/g, '')
|
||
var json = JSON.parse(result);
|
||
$.each(json, function (index, item) {
|
||
if (item.id != null && item.id != "") {
|
||
previews = new Array();
|
||
$('#' + item.id).show();
|
||
var data = item.files;
|
||
for (var i = 0; i < data.length; i++) {
|
||
var previewConfig = new Object();
|
||
var path = data[i].abspath;
|
||
previews.push(path);
|
||
previewConfig['width'] = '50px';
|
||
previewConfig['caption'] = data[i].filename;
|
||
previewConfig['key'] = data[i].id;
|
||
previewConfig['showRemove'] = false;//不显示移除按钮
|
||
previewConfigs.push(previewConfig);
|
||
}
|
||
// getFileList(item.id, data[i].masterId);
|
||
showFileInput(item.id);
|
||
}
|
||
});
|
||
})
|
||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||
var printpage = function (myDiv) {
|
||
$('.printContent').show();
|
||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||
/*
|
||
var ss = ".coversheet-pageBoder{"
|
||
+" padding: 10px;"
|
||
+" margin-top: 10px;"
|
||
+" border: 1px solid gray;"
|
||
+" page-break-after: always;"
|
||
+" border-radius: 5px;"
|
||
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
|
||
+"}"
|
||
+".noprint{display: none;}"
|
||
+".select2-container .select2-selection--single{ "
|
||
+" height:34px; "
|
||
+" line-height: 34px; "
|
||
+" }"
|
||
+" .select2-selection__arrow{"
|
||
+" margin-top:3px;"
|
||
+" } "
|
||
+" .div-row{"
|
||
+" margin-left:3px;"
|
||
+" margin-right:3px;"
|
||
+" }"
|
||
+" .div-border{"
|
||
+" border-style:solid;"
|
||
+" border-width:1px;"
|
||
+" text-align:center;"
|
||
+" }"
|
||
+" .right-border{"
|
||
+" border-right:none;"
|
||
+" }"
|
||
+" .top-right-border{"
|
||
+" border-top:none;"
|
||
+" border-right:none;"
|
||
+" }"
|
||
+" .top-border{"
|
||
+" border-top:none;"
|
||
+" }";
|
||
*/
|
||
//for Chrome Firefox Opera Safari
|
||
//wind.document.body.innerHTML = printHtml;
|
||
var link = document.createElement('link');
|
||
link.type = 'text/css';
|
||
link.rel = 'stylesheet';
|
||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||
wind.document.head.appendChild(link);
|
||
/*
|
||
var style = document.createElement('style');
|
||
style.type = 'text/css';
|
||
style.rel = 'stylesheet';
|
||
style.appendChild(document.createTextNode(ss));
|
||
wind.document.head.appendChild(style);
|
||
*/
|
||
wind.document.body.innerHTML = printHtml;
|
||
//console.log(wind.document);
|
||
wind.print();
|
||
wind.close();
|
||
$('.printContent').hide();
|
||
};
|
||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||
</script>
|
||
<div class="modal fade" id="maintenanceDetailModal">
|
||
<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 " style="padding-left:0;padding-right:0;">
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<!-- The time line -->
|
||
<ul class="timeline">
|
||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||
<li>
|
||
<c:choose>
|
||
<c:when test='${finishFlag && status.last}'>
|
||
<i class="fa fa-check bg-blue"></i>
|
||
</c:when>
|
||
<c:otherwise>
|
||
<i class="fa fa-clock-o bg-grey"></i>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
<div class="timeline-item">
|
||
<span class="time"><i
|
||
class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||
<h3 class="timeline-header"><a
|
||
href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||
<div>
|
||
${item.record}
|
||
<c:if test="${UNIT_HANDLE==item.type}"><a style="cursor:pointer "
|
||
onclick="viewHandleDetailFun('${item.id}')">查看详情</a></c:if>
|
||
</div>
|
||
<c:if test="${item.id!=''}">
|
||
<div style="padding-top:5px;">
|
||
<%-- <input type="file" id='${item.id}' multiple class="file-loading"/>--%>
|
||
</div>
|
||
</c:if>
|
||
|
||
<%-- <c:forEach items="${item.files}" var="file" >
|
||
<img src="${file.abspath.substring(file.abspath.indexOf('webapps')+7,file.abspath.length())}" height="200" width="200" class="margin">
|
||
</c:forEach> --%>
|
||
</div>
|
||
</div>
|
||
</li>
|
||
</c:forEach>
|
||
|
||
</ul>
|
||
</div>
|
||
<c:if test='${not empty maintenanceDetail.judgemaintainerstaff || not empty maintenanceDetail.judgeresult}'>
|
||
<div class="form-group form-inline" style="padding-left:60px">
|
||
<div class="form-group">
|
||
<label class="col-sm-4 control-label">对运维人员服务评价:</label>
|
||
<div class="col-sm-8">
|
||
<input id="judgemaintainerstaff" name='judgemaintainerstaff' type="number"
|
||
class="rating" min=0 max=5
|
||
step=0.5 data-size="xs" value='${maintenanceDetail.judgemaintainerstaff}'>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-4 control-label">对运维结果评价:</label>
|
||
<div class="col-sm-8">
|
||
<input id="judgeresult" name='judgeresult' type="number" class="rating" min=0 max=5
|
||
step=0.5
|
||
data-size="xs" value='${maintenanceDetail.judgeresult}'>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</c:if>
|
||
<!-- /.col -->
|
||
</div>
|
||
<!--
|
||
<form class="form-horizontal" id="subForm">
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">文件附件:</label>
|
||
</div>
|
||
<div class="file-border" id="fileArea">
|
||
</div>
|
||
</form>
|
||
-->
|
||
</div>
|
||
<!-- 流程打印布局 开始-->
|
||
<div id="maintenanceDetail">
|
||
<div class="printContent" style="display:none">
|
||
<h4 style="text-align:center;">任务处理详情</h4>
|
||
</div>
|
||
<div class="printContent" style="display:none">
|
||
<table style="border-collapse:collapse;margin:0 auto">
|
||
<tr>
|
||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||
</tr>
|
||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||
<tr>
|
||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||
</tr>
|
||
</c:forEach>
|
||
</table>
|
||
</div>
|
||
<form class="form-horizontal" id="subForm">
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">文件附件:</label>
|
||
</div>
|
||
<!-- 文件上传,显示 -->
|
||
<div class="file-border" id="fileArea">
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<!-- 流程打印布局 结束-->
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" onclick="printpage('maintenanceDetail');"><i
|
||
class="fa fa-print"></i>打印
|
||
</button>
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|
||
|