179 lines
8.4 KiB
Plaintext
179 lines
8.4 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
|||
|
|
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
|||
|
|
<!-- 补录状态 -->
|
|||
|
|
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
|||
|
|
<!-- 运维主流程状态 -->
|
|||
|
|
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
|||
|
|
|
|||
|
|
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
|||
|
|
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var showMaintenanceDetailList = function(id) {
|
|||
|
|
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailList4SubList.do', {maintenanceId:id} , function(data) {
|
|||
|
|
$("#maintenanceDiv").html(data);
|
|||
|
|
openModal('subDetailModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
var viewMaintenanceFun = function(id) {
|
|||
|
|
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
|||
|
|
$("#maintenanceDiv").html(data);
|
|||
|
|
openModal('subModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
var dosearch = function() {
|
|||
|
|
$("#table_maintenance").bootstrapTable('refresh');
|
|||
|
|
};
|
|||
|
|
$(function() {
|
|||
|
|
$("#table_maintenance").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/maintenance/getMaintenanceListByEquipmentId.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 50, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
search_name:$('#search_name').val(),
|
|||
|
|
equipmentId: '${param.equipmentId}'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'companyname', // 返回json数据中的name
|
|||
|
|
title: '厂名', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
return row.company.name;
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'problem', // 返回json数据中的name
|
|||
|
|
title: '问题描述', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'insdt', // 返回json数据中的name
|
|||
|
|
title: '发起时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
return value.substring(0,19);
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'type', // 返回json数据中的name
|
|||
|
|
title: '类型', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
switch (value) {
|
|||
|
|
case '${TYPE_MAINTENANCE}':
|
|||
|
|
return '运维';
|
|||
|
|
case '${TYPE_SUPPLEMENT}':
|
|||
|
|
return '补录';
|
|||
|
|
default:
|
|||
|
|
return '';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'status', // 返回json数据中的name
|
|||
|
|
title: '问题状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
switch (value) {
|
|||
|
|
case '${Status_Edit}':
|
|||
|
|
return '编辑中';
|
|||
|
|
case '${Status_Cancel_Problem}':
|
|||
|
|
return '驳回至问题发起人';
|
|||
|
|
case '${Status_Cancel_Maintainer}':
|
|||
|
|
return '退回至厂区负责人';
|
|||
|
|
case '${Status_CancelTOMaintainer}':
|
|||
|
|
return '驳回至运维商';
|
|||
|
|
case '${Status_Confirm_Maintainer}':
|
|||
|
|
return '维护商已确认';
|
|||
|
|
case '${Status_Submit_Problem}':
|
|||
|
|
return '问题已发布';
|
|||
|
|
case '${Status_Launch}':
|
|||
|
|
return '问题已发起';
|
|||
|
|
case '${Status_Finish}':
|
|||
|
|
return '完成';
|
|||
|
|
case '${Status_Submit_Maintainer}':
|
|||
|
|
return '维护商完成提交';
|
|||
|
|
default:
|
|||
|
|
return '';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
title: "操作",
|
|||
|
|
align: 'center',
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: 120, // 定义列的宽度,单位为像素px
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
var str="";
|
|||
|
|
|
|||
|
|
str+='<button class="btn btn-default btn-sm" onclick="viewMaintenanceFun(\'' + row.id + '\')" data-toggle="tooltip" title="查看"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
|||
|
|
//运维流程才能查看详细
|
|||
|
|
if(row.type =='${ TYPE_MAINTENANCE}'){
|
|||
|
|
str+='<security:authorize buttonUrl="maintenance/showDetail.do">';
|
|||
|
|
str+='<button class="btn btn-default btn-sm" onclick="showMaintenanceDetailList(\'' + row.id + '\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-file-text-o"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>';
|
|||
|
|
str+='</security:authorize>';
|
|||
|
|
}
|
|||
|
|
str='<div class="btn-group" >'+str+'</div>';
|
|||
|
|
return str;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function(){ //加载成功时执行
|
|||
|
|
setDataCardView("table");
|
|||
|
|
},
|
|||
|
|
onLoadError: function(){ //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subMaintenanceModal">
|
|||
|
|
<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">
|
|||
|
|
<div class="form-group " >
|
|||
|
|
<div class="form-group pull-right" >
|
|||
|
|
<div class="input-group input-group-sm" style="width: 250px;">
|
|||
|
|
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="问题描述">
|
|||
|
|
<div class="input-group-btn">
|
|||
|
|
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<table id="table_maintenance"></table>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|
|||
|
|
|