1266 lines
50 KiB
Plaintext
1266 lines
50 KiB
Plaintext
|
|
<%@page import="com.sipai.tools.CommString"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
|||
|
|
<%@page import="com.sipai.service.maintenance.MaintenanceDetailService"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
|||
|
|
<%@page import="com.sipai.entity.equipment.EquipmentCommStr"%>
|
|||
|
|
<%@page import="com.sipai.entity.equipment.EquipmentCard"%>
|
|||
|
|
<%@ 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"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|||
|
|
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
|||
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
|||
|
|
|
|||
|
|
<%request.setAttribute("Status_OFF", EquipmentCard.Status_OFF); %>
|
|||
|
|
<%request.setAttribute("Status_ON", EquipmentCard.Status_ON); %>
|
|||
|
|
<%request.setAttribute("Status_Fault", EquipmentCard.Status_Fault); %>
|
|||
|
|
<%request.setAttribute("Status_Transfer", EquipmentCard.Status_Transfer); %>
|
|||
|
|
<%request.setAttribute("Status_Scrap", EquipmentCard.Status_Scrap); %>
|
|||
|
|
<%request.setAttribute("Status_STOP", EquipmentCard.Status_STOP); %>
|
|||
|
|
<%request.setAttribute("UserType_Maintainer", CommString.UserType_Maintainer); %>
|
|||
|
|
<%request.setAttribute("Status_Finish",MaintenanceDetail.Status_Finish);%>
|
|||
|
|
<%request.setAttribute("Status_Start",MaintenanceDetail.Status_Start);%>
|
|||
|
|
|
|||
|
|
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
|||
|
|
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL);%>
|
|||
|
|
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN);%>
|
|||
|
|
|
|||
|
|
<%request.setAttribute("Equipment_Level_All",com.sipai.entity.equipment.EquipmentCommStr.Equipment_Level_All);%>
|
|||
|
|
<!DOCTYPE html>
|
|||
|
|
<!-- <html lang="zh-CN"> -->
|
|||
|
|
<!-- BEGIN HEAD -->
|
|||
|
|
<head>
|
|||
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
|||
|
|
<!-- 引用页头及CSS页-->
|
|||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|||
|
|
|
|||
|
|
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
|||
|
|
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
|||
|
|
<!-- 引入slimscroll-->
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/AdminLTE/js/jquery.slimscroll.min.js"
|
|||
|
|
charset="utf-8"></script>
|
|||
|
|
<!-- 日历 -->
|
|||
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/fullcalendar.min.css" />
|
|||
|
|
<link rel="stylesheet"
|
|||
|
|
href="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/fullcalendar.print.min.css" media='print' />
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/moment/min/moment.min.js"
|
|||
|
|
charset="utf-8"></script>
|
|||
|
|
<script type="text/javascript"
|
|||
|
|
src="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/fullcalendar.min.js" charset="utf-8"></script>
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/locale/zh-cn.js"
|
|||
|
|
charset="utf-8"></script>
|
|||
|
|
<!-- 引入daterangepicker-->
|
|||
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css" />
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
|||
|
|
charset="utf-8"></script>
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
|||
|
|
charset="utf-8"></script>
|
|||
|
|
<style>
|
|||
|
|
.box.box-white {
|
|||
|
|
border-top: 0;
|
|||
|
|
}
|
|||
|
|
.btn-top>.btn{
|
|||
|
|
font-size: 12px;
|
|||
|
|
font-family: MicrosoftYaHei, MicrosoftYaHei-Bold;
|
|||
|
|
font-weight: 700;
|
|||
|
|
line-height: 16px;
|
|||
|
|
letter-spacing: 1px;
|
|||
|
|
padding:10px 35px;
|
|||
|
|
margin:0 20px;
|
|||
|
|
}
|
|||
|
|
.box-middle{
|
|||
|
|
height:380px;
|
|||
|
|
}
|
|||
|
|
.box-middle > .box-body{
|
|||
|
|
height:90%;
|
|||
|
|
}
|
|||
|
|
.box-label{
|
|||
|
|
height:90px;
|
|||
|
|
}
|
|||
|
|
.box-label > .box-body>div{
|
|||
|
|
width:11%;
|
|||
|
|
float: left;
|
|||
|
|
text-align:center;
|
|||
|
|
}
|
|||
|
|
.lable-gray{
|
|||
|
|
font-size: 16px;
|
|||
|
|
font-family: MicrosoftYaHei;
|
|||
|
|
text-align: left;
|
|||
|
|
color: #606163;
|
|||
|
|
line-height: 21px;
|
|||
|
|
padding:0 10px;
|
|||
|
|
margin-bottom: 8px;
|
|||
|
|
margin-top: 5%;
|
|||
|
|
}
|
|||
|
|
.lable-black{
|
|||
|
|
font-size: 21px;
|
|||
|
|
font-family: Helvetica;
|
|||
|
|
text-align: left;
|
|||
|
|
color: #001423;
|
|||
|
|
line-height: 25px;
|
|||
|
|
padding:0 10px;
|
|||
|
|
}
|
|||
|
|
.btn-white{
|
|||
|
|
margin: 0 auto;
|
|||
|
|
width: 152px;
|
|||
|
|
height: 91px;
|
|||
|
|
color: #132046;
|
|||
|
|
border: 2px dashed #e4e8f6;
|
|||
|
|
border-radius: 12px;
|
|||
|
|
padding-top: 15px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.btn-white >.fa-plus{
|
|||
|
|
width: 40px;
|
|||
|
|
height: 40px;
|
|||
|
|
background: #f7f8fb;
|
|||
|
|
border-radius: 20px;
|
|||
|
|
padding-top: 12px;
|
|||
|
|
}
|
|||
|
|
.box-calendar,.tabs-table{
|
|||
|
|
height:575px;
|
|||
|
|
}
|
|||
|
|
.box-calendar>.box-body{
|
|||
|
|
height:90%;
|
|||
|
|
}
|
|||
|
|
.tab-pane{
|
|||
|
|
height:100%;
|
|||
|
|
}
|
|||
|
|
.tab-content{
|
|||
|
|
height:85%;
|
|||
|
|
}
|
|||
|
|
.fc-toolbar {
|
|||
|
|
padding: 0px;
|
|||
|
|
margin: 0px;
|
|||
|
|
}
|
|||
|
|
.fc-toolbar.fc-header-toolbar {
|
|||
|
|
margin-bottom: 0;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
var companyId = "";
|
|||
|
|
|
|||
|
|
var beginTimeStore = '';
|
|||
|
|
var endTimeStore = '';
|
|||
|
|
// 起止日期选择
|
|||
|
|
function initDate() {
|
|||
|
|
// 定义locale汉化插件
|
|||
|
|
beginTimeStore = moment().subtract(30, 'days').format('YYYY-MM-DD');;
|
|||
|
|
endTimeStore = moment().subtract(-1, 'days').format('YYYY-MM-DD');
|
|||
|
|
var locale = {
|
|||
|
|
"format": 'YYYY-MM-DD',
|
|||
|
|
"separator": " ~ ",
|
|||
|
|
"applyLabel": "确定",
|
|||
|
|
"cancelLabel": "取消",
|
|||
|
|
"fromLabel": "起始时间",
|
|||
|
|
"toLabel": "结束时间'",
|
|||
|
|
"customRangeLabel": "自定义",
|
|||
|
|
"weekLabel": "W",
|
|||
|
|
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
|||
|
|
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
|||
|
|
"firstDay": 1
|
|||
|
|
};
|
|||
|
|
$('#reservationtime').daterangepicker({
|
|||
|
|
"timePicker": false,
|
|||
|
|
"timePicker24Hour": false,
|
|||
|
|
"linkedCalendars": false,
|
|||
|
|
"autoUpdateInput": false,
|
|||
|
|
"timePickerIncrement": 10,
|
|||
|
|
"locale": locale,
|
|||
|
|
// 汉化按钮部分
|
|||
|
|
ranges: {
|
|||
|
|
'今日': [moment(), moment().subtract(-1, 'days')],
|
|||
|
|
'昨日': [moment().subtract(1, 'days'), moment()],
|
|||
|
|
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
|||
|
|
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
|||
|
|
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
|||
|
|
},
|
|||
|
|
startDate: beginTimeStore,
|
|||
|
|
endDate: endTimeStore
|
|||
|
|
}, function (start, end, label) {
|
|||
|
|
beginTimeStore = start.format(this.locale.format);
|
|||
|
|
endTimeStore = end.format(this.locale.format);
|
|||
|
|
if (!this.startDate) {
|
|||
|
|
this.element.val('');
|
|||
|
|
} else {
|
|||
|
|
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
|||
|
|
}
|
|||
|
|
dosearch();
|
|||
|
|
});
|
|||
|
|
$('#reservationtime').val(beginTimeStore + locale.separator + endTimeStore);
|
|||
|
|
};
|
|||
|
|
//临时任务
|
|||
|
|
function doTable(id,size){
|
|||
|
|
if(size==null || size==undefined){
|
|||
|
|
size = 10;
|
|||
|
|
}
|
|||
|
|
var height = $("#"+id).parent().height();
|
|||
|
|
$("#"+id).bootstrapTable({
|
|||
|
|
//url:"",
|
|||
|
|
height:height,
|
|||
|
|
striped: false, //是否显示行间隔色
|
|||
|
|
cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|||
|
|
pagination: true, //是否显示分页(*)
|
|||
|
|
sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
|
|||
|
|
pageNumber:1, //初始化加载第一页,默认第一页
|
|||
|
|
pageSize: size, //每页的记录行数(*)
|
|||
|
|
pageList: [10,20], //可供选择的每页的行数(*)
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
//巡检统计等bar
|
|||
|
|
function doBar(id,data,type,colorNum){
|
|||
|
|
const colorList = ['#F0B253', '#397EFA', '#9E70C7', '#47C1C8', '#F55945', '#A84ECB'];
|
|||
|
|
// 基于准备好的dom,初始化echarts实例
|
|||
|
|
var myChart = echarts.init(document.getElementById(id));
|
|||
|
|
|
|||
|
|
$.post(ext.contextPath + "/maintenance/abnormity/getPatrolAbnormal.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
sdt: beginTimeStore,
|
|||
|
|
edt: endTimeStore,
|
|||
|
|
type: type
|
|||
|
|
}, function (data) {
|
|||
|
|
var option = {
|
|||
|
|
color: colorList[colorNum],
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'axis',
|
|||
|
|
},
|
|||
|
|
grid: {
|
|||
|
|
left: '1%',
|
|||
|
|
right: '1%',
|
|||
|
|
top: '5%',
|
|||
|
|
bottom: '5%',
|
|||
|
|
containLabel: true
|
|||
|
|
},
|
|||
|
|
xAxis: [
|
|||
|
|
{
|
|||
|
|
type: 'category',
|
|||
|
|
data: data.name,
|
|||
|
|
axisLine: {
|
|||
|
|
lineStyle:{
|
|||
|
|
color:'#8A88B7',
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
axisLabel: {
|
|||
|
|
color:'#8A88B7',
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
yAxis: [
|
|||
|
|
{
|
|||
|
|
type: 'value',
|
|||
|
|
axisLine: {
|
|||
|
|
lineStyle:{
|
|||
|
|
color:'#8A88B7',
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
axisLabel: {
|
|||
|
|
color:'#8A88B7',
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
//网格样式
|
|||
|
|
splitLine: {
|
|||
|
|
show: true,
|
|||
|
|
lineStyle:{
|
|||
|
|
color: '#8A88B7',
|
|||
|
|
type: 'dashed',
|
|||
|
|
opacity:0.3,
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
name: '数量',
|
|||
|
|
type: 'bar',
|
|||
|
|
barWidth: '40%',
|
|||
|
|
barMaxWidth: 40 ,
|
|||
|
|
data: data.number
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
};
|
|||
|
|
myChart.clear();
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
function patrolAbnormal(type){
|
|||
|
|
$.post(ext.contextPath + "/maintenance/abnormity/getPatrolAbnormal.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
sdt: beginTimeStore,
|
|||
|
|
edt: endTimeStore,
|
|||
|
|
type: type
|
|||
|
|
}, function (data) {
|
|||
|
|
doBar('chart1',data,type,'1')
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 维修统计柱状图
|
|||
|
|
var getRepairNumber = function (type) {
|
|||
|
|
$.post(ext.contextPath + "/maintenance/getMaintenanceNumber.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
sdt: beginTimeStore,
|
|||
|
|
edt: endTimeStore,
|
|||
|
|
type: type,
|
|||
|
|
maintenanceType: '${MAINTENANCE_TYPE_REPAIR}'
|
|||
|
|
}, function (data) {
|
|||
|
|
doBar('chart2',data,type,'2');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 养护计划柱状图
|
|||
|
|
var getMaintainNumber = function (type) {
|
|||
|
|
$.post(ext.contextPath + "/maintenance/getMaintenanceNumber.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
sdt: beginTimeStore,
|
|||
|
|
edt: endTimeStore,
|
|||
|
|
type: type,
|
|||
|
|
maintenanceType: '${MAINTENANCE_TYPE_MAINTAIN}'
|
|||
|
|
}, function (data) {
|
|||
|
|
doBar('chart3',data,type,'3');
|
|||
|
|
}, 'json');
|
|||
|
|
};
|
|||
|
|
//故障统计等bar
|
|||
|
|
var getEquipmentFault = function (type) {
|
|||
|
|
// 基于准备好的dom,初始化echarts实例
|
|||
|
|
var myChart = echarts.init(document.getElementById('bar'));
|
|||
|
|
$.post(ext.contextPath + "/equipment/getEquipmentFaultsNumber.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
sdt: beginTimeStore,
|
|||
|
|
edt: endTimeStore,
|
|||
|
|
type: type
|
|||
|
|
}, function (data) {
|
|||
|
|
/* var option = {
|
|||
|
|
dataset: {
|
|||
|
|
source: data.faultNumber,
|
|||
|
|
},
|
|||
|
|
grid: {
|
|||
|
|
left: '1%',
|
|||
|
|
right: '3%',
|
|||
|
|
top: '5%',
|
|||
|
|
bottom: '5%',
|
|||
|
|
containLabel: true
|
|||
|
|
},
|
|||
|
|
xAxis: {
|
|||
|
|
axisLine: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},},
|
|||
|
|
yAxis: {type: 'category',
|
|||
|
|
axisLine: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},},
|
|||
|
|
visualMap: {
|
|||
|
|
show: false,
|
|||
|
|
min: data[data.length-1][0],
|
|||
|
|
max: data[1][0],
|
|||
|
|
dimension: 0,
|
|||
|
|
inRange: {
|
|||
|
|
color: ['#B0D9FF', '#1890FF']
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
type: 'bar',
|
|||
|
|
encode: {
|
|||
|
|
// Map the "amount" column to X axis.
|
|||
|
|
x: '故障次数',
|
|||
|
|
// Map the "product" column to Y axis
|
|||
|
|
y: '故障类型'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
}; */
|
|||
|
|
var option = {
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'axis'
|
|||
|
|
},
|
|||
|
|
legend: {
|
|||
|
|
},
|
|||
|
|
grid: {
|
|||
|
|
left: '2%',
|
|||
|
|
right: '15%',
|
|||
|
|
top: '2%',
|
|||
|
|
bottom: '2%',
|
|||
|
|
containLabel: true
|
|||
|
|
},
|
|||
|
|
calculable: true,
|
|||
|
|
xAxis: [
|
|||
|
|
{
|
|||
|
|
type: 'value',
|
|||
|
|
boundaryGap: [0, 0.01],
|
|||
|
|
name: '数量(个)'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
yAxis: [
|
|||
|
|
{
|
|||
|
|
type: 'category',
|
|||
|
|
data: data.faultName,
|
|||
|
|
// name : '故障类型'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
type: 'bar',
|
|||
|
|
data: data.faultNumber,
|
|||
|
|
itemStyle: {
|
|||
|
|
normal: {
|
|||
|
|
/*
|
|||
|
|
* color: function(params) { // build a
|
|||
|
|
* color map as your need. var colorList = [
|
|||
|
|
* '#836FFF','#7FFFD4','#FCCE10','#0000CD','#00BFFF',
|
|||
|
|
* '#00FF00','#00CED1','#1C86EE','#3A5FCD','#60C0DD',
|
|||
|
|
* '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0' ];
|
|||
|
|
* return colorList[params.dataIndex] },
|
|||
|
|
*/
|
|||
|
|
color: '#1C86EE'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
};
|
|||
|
|
myChart.clear();
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 选择工艺段
|
|||
|
|
function processSectionSelect() {
|
|||
|
|
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", { companyId: companyId }, function (data) {
|
|||
|
|
var select = $("#processSection").select2({
|
|||
|
|
data: data,
|
|||
|
|
cache: false,
|
|||
|
|
placeholder: '请选择',// 默认文字提示
|
|||
|
|
allowClear: true,// 允许清空
|
|||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,// 禁用搜索框
|
|||
|
|
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' })
|
|||
|
|
select.val('').trigger("change");
|
|||
|
|
select.on("select2:select", function (e) {
|
|||
|
|
dosearch();
|
|||
|
|
});
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
// 选择设备类型
|
|||
|
|
function equipmentClassSelect() {
|
|||
|
|
$.post(ext.contextPath + "/equipment/equipmentClass/getEquipmentClassForSelect.do", {}, function (data) {
|
|||
|
|
var select = $("#equipmentClass").select2({
|
|||
|
|
data: data,
|
|||
|
|
placeholder: '请选择',// 默认文字提示
|
|||
|
|
allowClear: true,// 允许清空
|
|||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,// 禁用搜索框
|
|||
|
|
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
select.val('').trigger("change");
|
|||
|
|
select.on("change", function (e) {
|
|||
|
|
dosearch();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 选择设备等级
|
|||
|
|
function equipmentLevelSelect() {
|
|||
|
|
$.post(ext.contextPath + "/equipment/equipmentLevel/getEquipmentLevelForSelect.do", {}, function (data) {
|
|||
|
|
var select = $("#equipmentLevel").select2({
|
|||
|
|
data: data,
|
|||
|
|
placeholder: '请选择',// 默认文字提示
|
|||
|
|
allowClear: true,// 允许清空
|
|||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,// 禁用搜索框
|
|||
|
|
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
select.val('').trigger("change");
|
|||
|
|
select.on("change", function (e) {
|
|||
|
|
dosearch();
|
|||
|
|
});
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
//查询设备的数量和在用数量
|
|||
|
|
var getEquipmentNumber = function () {
|
|||
|
|
$.post(ext.contextPath + "/equipment/getEquipmentNumber.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
stdt: beginTimeStore,
|
|||
|
|
eddt: endTimeStore
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#equipmentNumber").text("");
|
|||
|
|
$("#useEquipmentNumber").text("");
|
|||
|
|
$("#equipmentNumber").text(data.equipmentNumber);
|
|||
|
|
$("#useEquipmentNumber").text(data.useEquipmentNumber);
|
|||
|
|
}, 'json');
|
|||
|
|
};
|
|||
|
|
//完好率和故障率
|
|||
|
|
var getIntactRate = function () {
|
|||
|
|
$.post(ext.contextPath + "/valueEngineering/equipmentEvaluate/intactRateAndfaultRate.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
stdt: beginTimeStore,
|
|||
|
|
eddt: endTimeStore
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#intactRate").text(data.intactRate);
|
|||
|
|
$("#faultRate").text(data.faultRate);
|
|||
|
|
}, 'json');
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 报警数量
|
|||
|
|
var getAlarmNum = function () {
|
|||
|
|
$.post(ext.contextPath + "/work/scadaAlarm/getAlarmNumberByProcessSection.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
stdt: beginTimeStore,
|
|||
|
|
eddt: endTimeStore
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#equipmentsNum").html(data);
|
|||
|
|
}, 'json');
|
|||
|
|
};
|
|||
|
|
//累计消缺数量
|
|||
|
|
|
|||
|
|
var getDefectNumber = function () {
|
|||
|
|
$.post(ext.contextPath + "/maintenance/getDefectNumber.do", {
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val(),
|
|||
|
|
stdt: beginTimeStore,
|
|||
|
|
eddt: endTimeStore
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#defectNumber").html(data.defectNumber);
|
|||
|
|
}, 'json');
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 获取点击的导航标签
|
|||
|
|
var chartStatus = 'chart1';
|
|||
|
|
var chartOnclick = function (chart) {
|
|||
|
|
chartStatus = chart;
|
|||
|
|
switch (chartStatus) {
|
|||
|
|
case 'chart1':
|
|||
|
|
patrolAbnormal();
|
|||
|
|
break;
|
|||
|
|
case 'chart2':
|
|||
|
|
getRepairNumber();
|
|||
|
|
break;
|
|||
|
|
case 'chart3':
|
|||
|
|
getMaintainNumber();
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// 导航条中的周月年点击触发
|
|||
|
|
var dateOnclick = function (type) {
|
|||
|
|
switch (chartStatus) {
|
|||
|
|
case 'chart1':
|
|||
|
|
patrolAbnormal(type);
|
|||
|
|
break;
|
|||
|
|
case 'chart2':
|
|||
|
|
getRepairNumber(type);
|
|||
|
|
break;
|
|||
|
|
case 'chart3':
|
|||
|
|
getMaintainNumber(type);
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// 搜索
|
|||
|
|
var dosearch = function () {
|
|||
|
|
initDate();
|
|||
|
|
equipmentLevelSelect();
|
|||
|
|
equipmentClassSelect();
|
|||
|
|
processSectionSelect();
|
|||
|
|
getEquipmentNumber();
|
|||
|
|
getIntactRate();
|
|||
|
|
getAlarmNum();
|
|||
|
|
getDefectNumber();
|
|||
|
|
patrolAbnormal();
|
|||
|
|
getEquipmentFault();
|
|||
|
|
$('#calendar').fullCalendar('refetchEvents');
|
|||
|
|
};
|
|||
|
|
$(function() {
|
|||
|
|
companyId = unitId;
|
|||
|
|
dosearch();
|
|||
|
|
// 设备列表
|
|||
|
|
$("#table1").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/equipment/getList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 11, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
equipmentLevel: $("#equipmentLevel").val(),
|
|||
|
|
equipmentClass: $("#equipmentClass").val()
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
onClickRow: function (row) {//单击行事件,执行查看功能
|
|||
|
|
viewFun(row.id);
|
|||
|
|
},
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
checkbox: true, // 显示一个勾选框
|
|||
|
|
},{
|
|||
|
|
field: 'equipmentcardid', // 返回json数据中的name
|
|||
|
|
title: '设备编号', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},{
|
|||
|
|
field: 'equipmentname', // 返回json数据中的name
|
|||
|
|
title: '名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},{
|
|||
|
|
field: 'equipmentClass.name', // 返回json数据中的name
|
|||
|
|
title: '设备类型', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
},{
|
|||
|
|
field: 'equipmentLevel.levelname', // 返回json数据中的name
|
|||
|
|
title: '设备级别', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
},{
|
|||
|
|
field: 'equipmentstatus', // 返回json数据中的name
|
|||
|
|
title: '状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
switch (value){
|
|||
|
|
case '${Status_OFF}' :
|
|||
|
|
return "封存";
|
|||
|
|
case '${Status_ON}' :
|
|||
|
|
return "在用";
|
|||
|
|
case '${Status_Fault}' :
|
|||
|
|
return "故障";
|
|||
|
|
case '${Status_Transfer}' :
|
|||
|
|
return "调拨";
|
|||
|
|
case '${Status_Scrap}' :
|
|||
|
|
return "报废";
|
|||
|
|
case '${Status_STOP}' :
|
|||
|
|
return "停用";
|
|||
|
|
default :
|
|||
|
|
return "";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function(){ //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table");
|
|||
|
|
},
|
|||
|
|
onLoadError: function(){ //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
|
|||
|
|
// 维护保养记录
|
|||
|
|
$("#table2").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/maintenance/getMaintenanceDetailList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, // 表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 10, // 页面数据条数
|
|||
|
|
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(),
|
|||
|
|
search_code: companyId,
|
|||
|
|
processSectionId: $('#processSection').val(),
|
|||
|
|
type: '${MAINTENANCE_TYPE_MAINTAIN}'
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
/*
|
|||
|
|
* onClickRow:function(row){ switch(row.type){ case
|
|||
|
|
* '${MAINTENANCE_TYPE_REPAIR}': viewDetailFun(row.id); break;
|
|||
|
|
* case '${MAINTENANCE_TYPE_REPAIR}': viewSupplementFun(row.id);
|
|||
|
|
* break; case '${MAINTENANCE_TYPE_REPAIR}':
|
|||
|
|
* viewDetailFun(row.id); break; default: break;
|
|||
|
|
* } },
|
|||
|
|
*/
|
|||
|
|
onClickRow: function (row) {// 单击行事件,执行查看功能
|
|||
|
|
maintenanceViewFun(row.id);
|
|||
|
|
},
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'detailNumber', // 返回json数据中的name
|
|||
|
|
title: '保养编号', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
}, {
|
|||
|
|
field: 'problemcontent', // 返回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: 'status', // 返回json数据中的name
|
|||
|
|
title: '保养状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
if (value == '${Status_Start}' && row.type == '${TYPE_SUPPLEMENT}') {
|
|||
|
|
return '处理中';
|
|||
|
|
} else if (value == '${Status_Start}') {
|
|||
|
|
return '已下发';
|
|||
|
|
} else if (value == '${Status_Finish}') {
|
|||
|
|
return '已完成';
|
|||
|
|
} else {
|
|||
|
|
return value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function () { // 加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table");
|
|||
|
|
console.info("加载数据成功");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { // 加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
// 设备巡检
|
|||
|
|
$("#table3").bootstrapTable({ // 对应table标签的id
|
|||
|
|
// ///timeEfficiency/patrolRecord
|
|||
|
|
url: ext.contextPath + '/timeEfficiency/patrolRecord/getList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, // 表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 10, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
bizId: companyId,
|
|||
|
|
search_name: $('#search_name').val()
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
onClickRow: function (row) {// 单击行事件,执行查看功能
|
|||
|
|
patrolRecordViewFun(row.id);
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'name', // 返回json数据中的name
|
|||
|
|
title: '巡检名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'content', // 返回json数据中的name
|
|||
|
|
title: '巡检内容', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'startTime', // 返回json数据中的name
|
|||
|
|
title: '计划开始时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return value.substring(0, 16);
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'endTime', // 返回json数据中的name
|
|||
|
|
title: '计划结束时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return value.substring(0, 16);
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'patrolModel', // 返回json数据中的name
|
|||
|
|
title: '巡检模式', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
if (row.patrolModel == null) {
|
|||
|
|
return "临时任务";
|
|||
|
|
} else {
|
|||
|
|
return row.patrolModel.name;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'status', // 返回json数据中的name
|
|||
|
|
title: '状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
switch (value) {
|
|||
|
|
case '1':
|
|||
|
|
return "已下发";
|
|||
|
|
case '2':
|
|||
|
|
return "进行中";
|
|||
|
|
case '3':
|
|||
|
|
return "已完成";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function () { // 加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { // 加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
// 设备管理日历
|
|||
|
|
$('#calendar').fullCalendar({
|
|||
|
|
header: {
|
|||
|
|
left: 'prev,next today',
|
|||
|
|
center: 'title',
|
|||
|
|
right: 'month,agendaWeek,agendaDay'
|
|||
|
|
},
|
|||
|
|
aspectRatio: 1.35,
|
|||
|
|
// defaultDate: '2018-03-12',
|
|||
|
|
timeFormat: 'HH:mm',
|
|||
|
|
// 定义表格中显示的时间格式如:22:30,默认格式为HH(:mm)效果是整点的时候自动隐藏分钟,例如23:00会显示成23
|
|||
|
|
displayEventEnd: true,
|
|||
|
|
// 显示事件的结束时间,默认是false
|
|||
|
|
// aspectRatio: 1, //设置日历单元格显示的宽高比,数值越小越窄高
|
|||
|
|
navLinks: true, // can click day/week names to navigate views
|
|||
|
|
eventLimit: true, // allow "more" link when too many events
|
|||
|
|
editable: false, // 允许编辑
|
|||
|
|
eventStartEditable: false, // 允许直接在界面中编辑事件的开始时间
|
|||
|
|
eventDurationEditable: false, // 允许编辑事件的时长
|
|||
|
|
events: function (start, end, timezone, callback) { // 单击日历中事件时触发的函数,实现效果是获取当前点击事件的标题,开始时间,结束时间传给DOM控件
|
|||
|
|
var events = [];
|
|||
|
|
/*
|
|||
|
|
* var starttime = moment(calEvent.start).format('YYYY-MM-DD
|
|||
|
|
* HH:mm:ss'); //使用moment.js对时间进行格式化 var endtime =
|
|||
|
|
* moment(calEvent.end).format('YYYY-MM-DD HH:mm:ss');
|
|||
|
|
*/
|
|||
|
|
$.post(ext.contextPath + '/maintenance/getAllList.do', {
|
|||
|
|
sdt: start.format(),
|
|||
|
|
edt: end.format(),
|
|||
|
|
companyId: companyId,
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
}, function (data) {
|
|||
|
|
|
|||
|
|
for (var i = 0; i < data.maintenanceList.length; i++) {
|
|||
|
|
var obj = new Object();
|
|||
|
|
obj.id = data.maintenanceList[i].ids;
|
|||
|
|
obj.title = "缺陷" + data.maintenanceList[i].number;
|
|||
|
|
obj.color = '#FF0000';
|
|||
|
|
obj.start = data.maintenanceList[i].sdt;
|
|||
|
|
events.push(obj);
|
|||
|
|
}
|
|||
|
|
for (var i = 0; i < data.abnormalList.length; i++) {
|
|||
|
|
var obj = new Object();
|
|||
|
|
obj.id = data.abnormalList[i].ids;
|
|||
|
|
obj.title = "异常" + data.abnormalList[i].number;
|
|||
|
|
obj.color = '#EEC900';
|
|||
|
|
obj.start = data.abnormalList[i].sdt;
|
|||
|
|
events.push(obj);
|
|||
|
|
}
|
|||
|
|
callback(events);
|
|||
|
|
}, 'json'); // 把从后台取出的数据进行封装以后在页面上以fullCalendar的方式进行显示
|
|||
|
|
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
eventClick: function (event, jsEvent, view) {
|
|||
|
|
if (event.color == '#FF0000') {
|
|||
|
|
viewDefectFun(event.id);// 查看缺陷
|
|||
|
|
} else if (event.color == '#EEC900') {
|
|||
|
|
viewAbnormalFun(event.id);// 查看异常
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
dayClick: function (date, jsEvent, view) {
|
|||
|
|
// 点击空白日期调用
|
|||
|
|
},
|
|||
|
|
eventRender: function (event, element) {// title以HTML显示(换行)
|
|||
|
|
element.html(event.title);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
/* initialize the calendar
|
|||
|
|
-----------------------------------------------------------------*/
|
|||
|
|
//Date for the calendar events (dummy data)
|
|||
|
|
var date = new Date()
|
|||
|
|
var d = date.getDate(),
|
|||
|
|
m = date.getMonth(),
|
|||
|
|
y = date.getFullYear()
|
|||
|
|
$('#calendarOLD').fullCalendar({
|
|||
|
|
|
|||
|
|
header : false,
|
|||
|
|
buttonText: false,
|
|||
|
|
contentHeight: 360,
|
|||
|
|
//Random default events
|
|||
|
|
events : [
|
|||
|
|
{
|
|||
|
|
title : '5',
|
|||
|
|
start : new Date(y, m, 1),
|
|||
|
|
backgroundColor: '#f56954', //red
|
|||
|
|
borderColor : '#f56954' //red
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title : '2',
|
|||
|
|
start : new Date(y, m, d - 5),
|
|||
|
|
backgroundColor: '#f39c12', //yellow
|
|||
|
|
borderColor : '#f39c12' //yellow
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
editable : true,
|
|||
|
|
droppable : true, // this allows things to be dropped onto the calendar !!!
|
|||
|
|
drop : function (date, allDay) { // this function is called when something is dropped
|
|||
|
|
|
|||
|
|
// retrieve the dropped element's stored Event Object
|
|||
|
|
var originalEventObject = $(this).data('eventObject')
|
|||
|
|
|
|||
|
|
// we need to copy it, so that multiple events don't have a reference to the same object
|
|||
|
|
var copiedEventObject = $.extend({}, originalEventObject)
|
|||
|
|
|
|||
|
|
// assign it the date that was reported
|
|||
|
|
copiedEventObject.start = date
|
|||
|
|
copiedEventObject.allDay = allDay
|
|||
|
|
copiedEventObject.backgroundColor = $(this).css('background-color')
|
|||
|
|
copiedEventObject.borderColor = $(this).css('border-color')
|
|||
|
|
|
|||
|
|
// render the event on the calendar
|
|||
|
|
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
|
|||
|
|
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true)
|
|||
|
|
|
|||
|
|
// is the "remove after drop" checkbox checked?
|
|||
|
|
if ($('#drop-remove').is(':checked')) {
|
|||
|
|
// if so, remove the element from the "Draggable Events" list
|
|||
|
|
$(this).remove()
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
</head>
|
|||
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
|||
|
|
<div class="wrapper">
|
|||
|
|
<!-- 引用top -->
|
|||
|
|
<%--<jsp:include page="/jsp/top.jsp"></jsp:include>--%>
|
|||
|
|
<!-- 菜单栏 -->
|
|||
|
|
<%--<jsp:include page="/jsp/left.jsp"></jsp:include>--%>
|
|||
|
|
<div class="content-wrapper">
|
|||
|
|
<!-- Main content -->
|
|||
|
|
<section class="content container-fluid">
|
|||
|
|
<div id="mainAlertdiv"></div>
|
|||
|
|
<div id="subDiv"></div>
|
|||
|
|
<div id="menu4SelectDiv"></div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-12">
|
|||
|
|
<div class="box box-white">
|
|||
|
|
<div class="box-body">
|
|||
|
|
<form class="form-inline">
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="control-label">工艺段</label>
|
|||
|
|
<select class="form-control input-sm select2 " id="processSection" name="processSection" style="width: 200px;">
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class=" control-label">设备类型</label>
|
|||
|
|
<select class="form-control input-sm select2 " id="equipmentLevel" name="equipmentLevel" style="width: 200px;">
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class=" control-label">设备等级</label>
|
|||
|
|
<select class="form-control input-sm select2 " id="equipmentClass" name="equipmentClass" style="width: 200px;">
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="input-group">
|
|||
|
|
<label class="form-label">时间范围:</label>
|
|||
|
|
<div class="input-group">
|
|||
|
|
<div class="input-group-addon">
|
|||
|
|
<i class="fa fa-clock-o"></i>
|
|||
|
|
</div>
|
|||
|
|
<input type="text" class="form-control" id="reservationtime">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- <div class="col-md-3 btn-top">
|
|||
|
|
<a class="btn btn-default pull-right" type="button" >重置</a>
|
|||
|
|
<a class="btn btn-primary pull-right" type="button" >搜索</a>
|
|||
|
|
</div> -->
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-12">
|
|||
|
|
<div class="box box-white box-label">
|
|||
|
|
<div class="box-body">
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">设备总台套数</span>
|
|||
|
|
<span class="col-md-12 lable-black" id="equipmentNumber">0</span>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">设备在用总台套数</span>
|
|||
|
|
<span class="col-md-12 lable-black" id="useEquipmentNumber">0</span>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">设备完好率</span>
|
|||
|
|
<span class="col-md-12 lable-black" id="intactRate">0%</span>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">本月累计消缺数量</span>
|
|||
|
|
<span class="col-md-12 lable-black" id="getDefectNumber">0</span>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">本月关键报警累计数</span>
|
|||
|
|
<span class="col-md-12 lable-black" id="equipmentsNum">0</span>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">设备运行总台时</span>
|
|||
|
|
<span class="col-md-12 lable-black">0h</span>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<span class="col-md-12 lable-gray">故障停机率</span>
|
|||
|
|
<span class="col-md-12 lable-black" id="faultRate">0%</span>
|
|||
|
|
</div>
|
|||
|
|
<!-- <div style="width:23%;">
|
|||
|
|
<a class="btn btn-white" href="#" role="button"><i class="fa fa-plus"></i><br>增加</a>
|
|||
|
|
</div> -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-6">
|
|||
|
|
<div class="nav-tabs-custom box-middle">
|
|||
|
|
<ul class="nav nav-tabs">
|
|||
|
|
<li class="active"><a href="#chart1" data-toggle="tab" onclick="chartOnclick('chart1')">巡检异常统计</a></li>
|
|||
|
|
<li><a href="#chart2" data-toggle="tab" onclick="chartOnclick('chart2')">维修统计</a></li>
|
|||
|
|
<li><a href="#chart3" data-toggle="tab" onclick="chartOnclick('chart3')">养护计划</a></li>
|
|||
|
|
<li class="pull-right">
|
|||
|
|
<div class="btn-toolbar" role="toolbar" aria-label="...">
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button" onclick="dateOnclick('year')">年</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button" onclick="dateOnclick('month')">月</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button" onclick="dateOnclick('week')">周</a>
|
|||
|
|
</div>
|
|||
|
|
<!-- <div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<select class="form-control">
|
|||
|
|
<option>2020-02</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-primary" href="#" role="button">确定</a>
|
|||
|
|
</div> -->
|
|||
|
|
</div>
|
|||
|
|
</li>
|
|||
|
|
</ul>
|
|||
|
|
<div class="tab-content">
|
|||
|
|
<div class="tab-pane active" id="chart1">
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-pane -->
|
|||
|
|
<div class="tab-pane" id="chart2">
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-pane -->
|
|||
|
|
<div class="tab-pane" id="chart3">
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-pane -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- nav-tabs-custom -->
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-6">
|
|||
|
|
<div class="box box-white box-middle">
|
|||
|
|
<div class="box-header">
|
|||
|
|
<h4 class="box-title">设备故障统计</h4>
|
|||
|
|
<div class="box-tools">
|
|||
|
|
<div class="btn-toolbar" role="toolbar" aria-label="...">
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button" onclick="getEquipmentFault('year')">年</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button" onclick="getEquipmentFault('month')">月</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button" onclick="getEquipmentFault('week')">周</a>
|
|||
|
|
</div>
|
|||
|
|
<!-- <div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<select class="form-control">
|
|||
|
|
<option>2020-02</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-primary" href="#" role="button">确定</a>
|
|||
|
|
</div> -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-tools -->
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body" id="bar">
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-body -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-5">
|
|||
|
|
<div class="box box-white box-calendar">
|
|||
|
|
<div class="box-header">
|
|||
|
|
<h4 class="box-title">设备管理日历</h4>
|
|||
|
|
<div class="box-tools"></div>
|
|||
|
|
<!-- /.box-tools -->
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body">
|
|||
|
|
<!-- THE CALENDAR -->
|
|||
|
|
<div id="calendar"></div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-body -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-7">
|
|||
|
|
<div class="nav-tabs-custom tabs-table">
|
|||
|
|
<ul class="nav nav-tabs">
|
|||
|
|
<li class="active"><a href="#tab_1" data-toggle="tab">设备台账</a></li>
|
|||
|
|
<li><a href="#tab_2" data-toggle="tab">缺陷管理</a></li>
|
|||
|
|
<li><a href="#tab_3" data-toggle="tab">报警统计</a></li>
|
|||
|
|
<li class="pull-right">
|
|||
|
|
<div class="btn-toolbar" role="toolbar" aria-label="...">
|
|||
|
|
<!-- <div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button">年</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button">月</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-default" href="#" role="button">日</a>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<select class="form-control">
|
|||
|
|
<option>2020-02</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<div class="btn-group" role="group" aria-label="...">
|
|||
|
|
<a class="btn btn-primary" href="#" role="button">确定</a>
|
|||
|
|
</div> -->
|
|||
|
|
</div>
|
|||
|
|
</li>
|
|||
|
|
</ul>
|
|||
|
|
<div class="tab-content">
|
|||
|
|
<div class="tab-pane active" id="tab_1">
|
|||
|
|
<table class="table table-striped" id="table1">
|
|||
|
|
<!-- <thead>
|
|||
|
|
<tr>
|
|||
|
|
<th data-width="30px" data-align="center">
|
|||
|
|
<input type="checkbox" name="checkall" class="checkbox"
|
|||
|
|
onclick="selectAll('cids',this.checked);">
|
|||
|
|
</th>
|
|||
|
|
<th data-width="30%">设备编号</th>
|
|||
|
|
<th data-width="20%">名称</th>
|
|||
|
|
<th data-width="20%">无故障连续运行时间</th>
|
|||
|
|
<th data-width="20%">设备级别</th>
|
|||
|
|
<th data-width="8%">状态</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead> -->
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-pane -->
|
|||
|
|
<div class="tab-pane" id="tab_2">
|
|||
|
|
<table class="table table-striped" id="table2"></table>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-pane -->
|
|||
|
|
<div class="tab-pane" id="tab_3">
|
|||
|
|
<table class="table table-striped" id="table3"></table>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-pane -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.tab-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- nav-tabs-custom -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</section>
|
|||
|
|
<!-- /.content -->
|
|||
|
|
</div>
|
|||
|
|
<%--<jsp:include page="/jsp/bottom.jsp"></jsp:include>--%>
|
|||
|
|
<%--<jsp:include page="/jsp/side.jsp"></jsp:include>--%>
|
|||
|
|
</div>
|
|||
|
|
</body>
|
|||
|
|
</html>
|