1692 lines
57 KiB
Plaintext
1692 lines
57 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 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("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/bootstrap-fileinput/css/fileinput.min.css" />
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
|
||
charset="utf-8"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.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>
|
||
<style type="text/css">
|
||
/*隐藏百度地图底部文字*/
|
||
.anchorBL{display:none;}
|
||
.main-header {
|
||
display: none;
|
||
}
|
||
|
||
.content-header {
|
||
display: none;
|
||
}
|
||
|
||
.main-footer {
|
||
display: none;
|
||
}
|
||
|
||
/*解决tab导航栏切换标签时,后面的标签里echars图表不显示的情况 */
|
||
.tab-content>.tab-pane,
|
||
.pill-content>.pill-pane {
|
||
display: block;
|
||
/* undo display:none */
|
||
height: 0;
|
||
/* height:0 is also invisible */
|
||
overflow-y: hidden;
|
||
/* no-overflow */
|
||
}
|
||
|
||
.tab-content>.active,
|
||
.pill-content>.active {
|
||
height: auto;
|
||
/* let the content decide it */
|
||
}
|
||
|
||
/* bootstrap hack end */
|
||
|
||
.select2-container .select2-selection--single {
|
||
height: 34px;
|
||
line-height: 34px;
|
||
}
|
||
|
||
.select2-selection__arrow {
|
||
margin-top: 3px;
|
||
}
|
||
</style>
|
||
<!--
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/temp_test_js/equipmentStatisticalChart.js"></script>
|
||
-->
|
||
<script type="text/javascript">
|
||
//写cookies
|
||
function setCookie(name, value) {
|
||
var Days = 365;
|
||
var exp = new Date();
|
||
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
|
||
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
|
||
}
|
||
// 读取cookies
|
||
function getCookie(name) {
|
||
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
||
if (arr = document.cookie.match(reg)) return unescape(arr[2]);
|
||
else return null;
|
||
}
|
||
|
||
// 删除cookies
|
||
function delCookie(name) {
|
||
var exp = new Date();
|
||
exp.setTime(exp.getTime() - 1);
|
||
var cval = getCookie(name);
|
||
if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
|
||
}
|
||
|
||
var companyId = unitId;
|
||
|
||
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();
|
||
// console.log("66");
|
||
});
|
||
$('#reservationtime').val(beginTimeStore + locale.separator + endTimeStore);
|
||
};
|
||
// 查看异常
|
||
var viewAbnormalFun = function (ids) {
|
||
$.post(ext.contextPath + '/maintenance/abnormity/showAbnormalListForView.do', { ids: ids }, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
}
|
||
// 查看缺陷
|
||
var viewDefectFun = function (ids) {
|
||
$.post(ext.contextPath + '/maintenance/showDefectListForView.do', { ids: ids }, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
}
|
||
// 初始化工艺段
|
||
/*
|
||
* var refreshSelect = function () { var selelct_ =
|
||
* $("#processSection").select2({ data: null, placeholder:
|
||
* '请选择',//默认文字提示 allowClear: true,//允许清空 escapeMarkup: function
|
||
* (markup) { return markup; }, // 自定义格式化防止xss注入 language: "zh-CN",
|
||
* minimumInputLength: 0, minimumResultsForSearch: 10,//数据超过十个启用搜索框 });
|
||
* $("#processSection").empty(); $(".select2-selection--single").css({
|
||
* 'height': '30px', 'paddingTop': '4px' }) };
|
||
*/
|
||
|
||
// 选择工艺段
|
||
function processSectionSelect() {
|
||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", { companyId: companyId }, function (data) {
|
||
// $("#processSection").empty();
|
||
// $("#processSection").select2("val", " ");
|
||
|
||
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) {
|
||
// select.one("change", function (e) {
|
||
$("#table1").bootstrapTable('refresh');
|
||
$("#table2").bootstrapTable('refresh');
|
||
$("#table3").bootstrapTable('refresh');
|
||
$('#calendar').fullCalendar('refetchEvents');
|
||
getEquipmentNumber();
|
||
// getDefectNumber();
|
||
getEquipmentFault();
|
||
patrolAbnormal();
|
||
getRepairNumber();
|
||
getMaintainNumber();
|
||
// equipmentTotalTime();
|
||
getIntactRate();
|
||
// getAlarmNum();
|
||
});
|
||
/*
|
||
* $("#processSection").on("select2:unselect", function (e) {
|
||
* dosearch(); //console.log("88"); }); select.on("change",
|
||
* function (e) { if ($("#processSection").val() != null) {
|
||
* dosearch(); //console.log("33"); } });
|
||
*/
|
||
}, '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) {
|
||
$("#table1").bootstrapTable('refresh');
|
||
$("#table2").bootstrapTable('refresh');
|
||
$("#table3").bootstrapTable('refresh');
|
||
$('#calendar').fullCalendar('refetchEvents');
|
||
getEquipmentNumber();
|
||
// getDefectNumber();
|
||
getEquipmentFault();
|
||
patrolAbnormal();
|
||
getRepairNumber();
|
||
getMaintainNumber();
|
||
// equipmentTotalTime();
|
||
getIntactRate();
|
||
// getAlarmNum();
|
||
// console.log("11");
|
||
});
|
||
|
||
}, '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) {
|
||
$("#table1").bootstrapTable('refresh');
|
||
$("#table2").bootstrapTable('refresh');
|
||
$("#table3").bootstrapTable('refresh');
|
||
$('#calendar').fullCalendar('refetchEvents');
|
||
getEquipmentNumber();
|
||
// getDefectNumber();
|
||
getEquipmentFault();
|
||
patrolAbnormal();
|
||
getRepairNumber();
|
||
getMaintainNumber();
|
||
// equipmentTotalTime();
|
||
getIntactRate();
|
||
// getAlarmNum();
|
||
// console.log("22");
|
||
});
|
||
}, 'json');
|
||
}
|
||
|
||
// 报警数量
|
||
var getAlarmNum = function () {
|
||
$.post(ext.contextPath + "/work/scadaAlarm/getAlarmNumberByProcessSection.do", {
|
||
companyId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
sdt: beginTimeStore,
|
||
edt: endTimeStore
|
||
}, function (data) {
|
||
// console.info(data)
|
||
$("#equipmentsNum").html(data);
|
||
}, 'json');
|
||
};
|
||
|
||
/*
|
||
* //完好率和故障率 var getIntactRate = function () { $.post(ext.contextPath +
|
||
* "/valueEngineering/equipmentEvaluate/getCompanyStatistics.do", { ids:
|
||
* companyId, equipmentLevelId: '${Equipment_Level_All}', stdt: beginTimeStore,
|
||
* eddt: endTimeStore }, function (data) { console.info(data);
|
||
* $("#intactRate").html((data.rows[0].intactRate * 100).toFixed(1) + "%");
|
||
* $("#faultRate").html(((1 - data.rows[0].intactRate) * 100).toFixed(1) + "%"); },
|
||
* '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) {
|
||
console.info(data);
|
||
// result.put("intactRate", intactRateStr);
|
||
// result.put("faultRate", faultRateRateStr);
|
||
$("#intactRate").text(data.intactRate);
|
||
$("#faultRate").text(data.faultRate);
|
||
// $("#intactRate").html((data.rows[0].intactRate *
|
||
// 100).toFixed(1) + "%");
|
||
// $("#faultRate").html(((1 - data.rows[0].intactRate) *
|
||
// 100).toFixed(1) + "%");
|
||
}, 'json');
|
||
};
|
||
|
||
// 搜索
|
||
var dosearch = function () {
|
||
$("#table1").bootstrapTable('refresh');
|
||
$("#table2").bootstrapTable('refresh');
|
||
$("#table3").bootstrapTable('refresh');
|
||
$('#calendar').fullCalendar('refetchEvents');
|
||
getEquipmentNumber();
|
||
// getDefectNumber();
|
||
getEquipmentFault();
|
||
patrolAbnormal();
|
||
getRepairNumber();
|
||
getMaintainNumber();
|
||
// equipmentTotalTime();
|
||
getIntactRate();
|
||
// getAlarmNum();
|
||
processSectionSelect();
|
||
};
|
||
|
||
|
||
|
||
$(function () {
|
||
companyId = unitId;
|
||
console.log(companyId);
|
||
initFun();
|
||
var flag = IsApp();
|
||
if (flag == true) {
|
||
|
||
} else {
|
||
$(".main-header").show();
|
||
$(".content-header").show();
|
||
$(".main-footer").show();
|
||
}
|
||
|
||
// 简易公司combotree
|
||
$.post(ext.contextPath + "/user/showCompanySelectTree.do", {}, function (data) {
|
||
$('#companySelectTree').html(data);
|
||
});
|
||
// 初始化时间
|
||
initDate();
|
||
});
|
||
|
||
function initFun() {
|
||
getEquipmentNumber();
|
||
// getIntactRate();
|
||
getEquipmentFault();
|
||
patrolAbnormal();
|
||
getRepairNumber();
|
||
getMaintainNumber();
|
||
// 设备列表
|
||
$("#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: 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,
|
||
unitId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
equipmentLevel: $("#equipmentLevel").val(),
|
||
equipmentClass: $("#equipmentClass").val()
|
||
}
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
onClickRow: function (row) {// 单击行事件,执行查看功能
|
||
equipmentViewFun(row.id);
|
||
},
|
||
columns: [
|
||
{
|
||
field: 'equipmentstatus', // 返回json数据中的name
|
||
title: '', // 表格表头显示文字
|
||
sortable: false,
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
formatter: function (value, row, index) {
|
||
switch (value) {
|
||
case '0':
|
||
return '<span class="fa fa-circle" style="color:#ff0000 ;"></span>';
|
||
case '1':
|
||
return '<span class="fa fa-circle" style="color:#00ff00;"></span>';
|
||
default:
|
||
return "";
|
||
}
|
||
}
|
||
}, {
|
||
field: 'equipmentcardid', // 返回json数据中的name
|
||
title: '设备编号', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'equipmentname', // 返回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 '0':
|
||
return "禁用";
|
||
case '1':
|
||
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("加载数据失败");
|
||
}
|
||
});
|
||
|
||
equipmentLevelSelect();
|
||
equipmentClassSelect();
|
||
getIntactRate();
|
||
processSectionSelect();
|
||
|
||
|
||
// 设备管理日历
|
||
$('#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);
|
||
}
|
||
});
|
||
}
|
||
|
||
// 查询设备的数量和在用数量
|
||
var getEquipmentNumber = function () {
|
||
$.post(ext.contextPath + "/equipment/getEquipmentNumber.do", {
|
||
companyId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
equipmentLevel: $("#equipmentLevel").val(),
|
||
equipmentClass: $("#equipmentClass").val(),
|
||
}, function (data) {
|
||
// console.info(data)
|
||
$("#equipmentNumber").text("");
|
||
$("#useEquipmentNumber").text("");
|
||
$("#equipmentNumber").text(data.equipmentNumber);
|
||
$("#useEquipmentNumber").text(data.useEquipmentNumber);
|
||
$("#useEquipmentNumber_a").text(data.useEquipmentNumber);
|
||
|
||
$("#installNumber").text(data.equipmentNumber);
|
||
$("#EquipmentWorth").text(toThousands(parseFloat(data.EquipmentWorth/10000).toFixed(2)));
|
||
$("#useRate").text(parseFloat(data.useEquipmentNumber/data.equipmentNumber*100).toFixed(2)+"%");
|
||
}, 'json');
|
||
};
|
||
|
||
// 累计消缺数量
|
||
/*
|
||
* var getDefectNumber = function () { $.post(ext.contextPath +
|
||
* "/maintenance/getDefectNumber.do", { companyId: companyId,
|
||
* pSectionId: $("#processSection").val(), sdt: beginTimeStore, edt:
|
||
* endTimeStore }, function (data) { //console.info(data)
|
||
* $("#defectNumber").html(data.defectNumber); }, 'json'); };
|
||
*/
|
||
|
||
var myChartFault;
|
||
// 设备故障统计柱状图
|
||
var getEquipmentFault = function (type) {
|
||
$.post(ext.contextPath + "/equipment/getEquipmentFaultsNumber.do", {
|
||
companyId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
sdt: beginTimeStore,
|
||
edt: endTimeStore,
|
||
type: type
|
||
}, function (data) {
|
||
option = {
|
||
/*
|
||
* title : { text: '设备故障统计', subtext: '济南南康水厂' },
|
||
*/
|
||
tooltip: {
|
||
trigger: 'axis'
|
||
},
|
||
legend: {
|
||
},
|
||
grid: {
|
||
left: '2%',
|
||
right: '15%',
|
||
top: '2%',
|
||
bottom: '2%',
|
||
containLabel: true
|
||
},
|
||
toolbox: {
|
||
show: true,
|
||
feature: {
|
||
// mark : {show: true},
|
||
// dataView : {show: true, readOnly: false},
|
||
magicType: { show: true, type: ['line', 'bar'] },
|
||
/*
|
||
* restore : {show: true}, saveAsImage : {show:
|
||
* 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'
|
||
}
|
||
},
|
||
}
|
||
]
|
||
};
|
||
myChartFault = echarts.init(document.getElementById("fault_chart"));
|
||
myChartFault.setOption(option);
|
||
}, 'json');
|
||
};
|
||
// 获取点击的导航标签
|
||
var chartStatus = 'chart1';
|
||
var chartOnclick = function (chart) {
|
||
chartStatus = chart;
|
||
}
|
||
// 导航条中的周月年点击触发
|
||
var dateOnclick = function (type) {
|
||
switch (chartStatus) {
|
||
case 'chart1':
|
||
patrolAbnormal(type);
|
||
break;
|
||
case 'chart2':
|
||
getRepairNumber(type);
|
||
break;
|
||
case 'chart3':
|
||
getMaintainNumber(type);
|
||
break;
|
||
}
|
||
}
|
||
|
||
// 巡检异常统计柱状图
|
||
var myChartAbnormal;
|
||
var patrolAbnormal = function (type) {
|
||
$.post(ext.contextPath + "/maintenance/abnormity/getPatrolAbnormal.do", {
|
||
companyId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
sdt: beginTimeStore,
|
||
edt: endTimeStore,
|
||
type: type
|
||
}, function (data) {
|
||
// console.info(data)
|
||
option = {
|
||
/*
|
||
* title : { text: '巡检异常统计', //subtext: '济南南康水厂' },
|
||
*/
|
||
tooltip: {
|
||
trigger: 'axis'
|
||
},
|
||
toolbox: {
|
||
show: true,
|
||
feature: {
|
||
mark: { show: true },
|
||
// dataView : {show: true, readOnly: false},
|
||
magicType: { show: true, type: ['line', 'bar'] },
|
||
// restore : {show: true},
|
||
// saveAsImage : {show: true}
|
||
}
|
||
},
|
||
grid: {
|
||
left: '5%',
|
||
// right:'10%',
|
||
top: '10%',
|
||
bottom: '5%',
|
||
containLabel: true
|
||
},
|
||
calculable: true,
|
||
xAxis: [
|
||
{
|
||
type: 'category',
|
||
data: data.name
|
||
}
|
||
],
|
||
yAxis: [
|
||
{
|
||
type: 'value',
|
||
name: '数量(个)',
|
||
minInterval: 1
|
||
}
|
||
],
|
||
series: [
|
||
{
|
||
name: '异常数量',
|
||
type: 'bar',
|
||
data: data.number,
|
||
/*
|
||
* markPoint : { data : [ {name : '年最高', value :
|
||
* 182.2, xAxis: 7, yAxis: 183, symbolSize:18},
|
||
* {name : '年最低', value : 2.3, xAxis: 11, yAxis: 3} ] },
|
||
*/
|
||
/*
|
||
* markLine : { data : [ {type : 'average', name :
|
||
* '平均值'} ] }
|
||
*/
|
||
itemStyle: {
|
||
normal: {
|
||
/*
|
||
* color: function(params) { // build a
|
||
* color map as your need. var colorList = [
|
||
* '#1C86EE', ]; return
|
||
* colorList[params.dataIndex] },
|
||
*/
|
||
color: '#1C86EE'
|
||
}
|
||
},
|
||
}
|
||
]
|
||
};
|
||
myChartAbnormal = echarts.init(document.getElementById("patrol_abnormal"));
|
||
myChartAbnormal.setOption(option);
|
||
}, 'json');
|
||
};
|
||
|
||
// 维修统计柱状图
|
||
var myChartRepair;
|
||
var getRepairNumber = function (type) {
|
||
$.post(ext.contextPath + "/maintenance/getMaintenanceNumber.do", {
|
||
companyId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
sdt: beginTimeStore,
|
||
edt: endTimeStore,
|
||
type: type,
|
||
maintenanceType: '${MAINTENANCE_TYPE_REPAIR}'
|
||
}, function (data) {
|
||
option = {
|
||
/*
|
||
* title : { text: '巡检异常统计', //subtext: '济南南康水厂' },
|
||
*/
|
||
tooltip: {
|
||
trigger: 'axis'
|
||
},
|
||
toolbox: {
|
||
show: true,
|
||
feature: {
|
||
mark: { show: true },
|
||
// dataView : {show: true, readOnly: false},
|
||
magicType: { show: true, type: ['line', 'bar'] },
|
||
// restore : {show: true},
|
||
// saveAsImage : {show: true}
|
||
}
|
||
},
|
||
grid: {
|
||
left: '5%',
|
||
// right:'10%',
|
||
top: '10%',
|
||
bottom: '5%',
|
||
containLabel: true
|
||
},
|
||
calculable: true,
|
||
xAxis: [
|
||
{
|
||
type: 'category',
|
||
data: data.name
|
||
}
|
||
],
|
||
yAxis: [
|
||
{
|
||
type: 'value',
|
||
name: '数量(个)',
|
||
minInterval: 1
|
||
}
|
||
],
|
||
series: [
|
||
{
|
||
name: '维修数量',
|
||
type: 'bar',
|
||
data: data.number,
|
||
/*
|
||
* markPoint : { data : [ {name : '年最高', value :
|
||
* 182.2, xAxis: 7, yAxis: 183, symbolSize:18},
|
||
* {name : '年最低', value : 2.3, xAxis: 11, yAxis: 3} ] },
|
||
*/
|
||
/*
|
||
* markLine : { data : [ {type : 'average', name :
|
||
* '平均值'} ] }
|
||
*/
|
||
itemStyle: {
|
||
normal: {
|
||
/*
|
||
* color: function(params) { // build a
|
||
* color map as your need. var colorList = [
|
||
* '#1C86EE', ]; return
|
||
* colorList[params.dataIndex] },
|
||
*/
|
||
color: '#1C86EE'
|
||
}
|
||
},
|
||
}
|
||
]
|
||
};
|
||
myChartRepair = echarts.init(document.getElementById("repair_number"));
|
||
myChartRepair.setOption(option);
|
||
}, 'json');
|
||
};
|
||
|
||
// 养护计划柱状图
|
||
var myChartMaintain;
|
||
var getMaintainNumber = function (type) {
|
||
$.post(ext.contextPath + "/maintenance/getMaintenanceNumber.do", {
|
||
companyId: companyId,
|
||
pSectionId: $("#processSection").val(),
|
||
sdt: beginTimeStore,
|
||
edt: endTimeStore,
|
||
type: type,
|
||
maintenanceType: '${MAINTENANCE_TYPE_MAINTAIN}'
|
||
}, function (data) {
|
||
option = {
|
||
/*
|
||
* title : { text: '巡检异常统计', //subtext: '济南南康水厂' },
|
||
*/
|
||
tooltip: {
|
||
trigger: 'axis'
|
||
},
|
||
toolbox: {
|
||
show: true,
|
||
feature: {
|
||
mark: { show: true },
|
||
// dataView : {show: true, readOnly: false},
|
||
magicType: { show: true, type: ['line', 'bar'] },
|
||
// restore : {show: true},
|
||
// saveAsImage : {show: true}
|
||
}
|
||
},
|
||
grid: {
|
||
left: '5%',
|
||
// right:'10%',
|
||
top: '10%',
|
||
bottom: '5%',
|
||
containLabel: true
|
||
},
|
||
calculable: true,
|
||
xAxis: [
|
||
{
|
||
type: 'category',
|
||
data: data.name,
|
||
|
||
}
|
||
],
|
||
yAxis: [
|
||
{
|
||
type: 'value',
|
||
name: '数量(个)',
|
||
minInterval: 1
|
||
}
|
||
],
|
||
series: [
|
||
{
|
||
name: '养护数量',
|
||
type: 'bar',
|
||
data: data.number,
|
||
/*
|
||
* markPoint : { data : [ {name : '年最高', value :
|
||
* 182.2, xAxis: 7, yAxis: 183, symbolSize:18},
|
||
* {name : '年最低', value : 2.3, xAxis: 11, yAxis: 3} ] },
|
||
*/
|
||
/*
|
||
* markLine : { data : [ {type : 'average', name :
|
||
* '平均值'} ] }
|
||
*/
|
||
itemStyle: {
|
||
normal: {
|
||
/*
|
||
* color: function(params) { // build a
|
||
* color map as your need. var colorList = [
|
||
* '#1C86EE', ]; return
|
||
* colorList[params.dataIndex] },
|
||
*/
|
||
color: '#1C86EE'
|
||
}
|
||
},
|
||
}
|
||
]
|
||
};
|
||
myChartMaintain = echarts.init(document.getElementById("maintain"));
|
||
myChartMaintain.setOption(option);
|
||
}, 'json');
|
||
};
|
||
|
||
// 核心设备综合效率
|
||
var myChartEfficiency = "";
|
||
var equipmentEfficiency = function (efficiencyType, topNum) {
|
||
// console.log("bizId", companyId);
|
||
if (efficiencyType != null && efficiencyType != "") {
|
||
setCookie('efficiencyType', efficiencyType);
|
||
} else {
|
||
efficiencyType = "";
|
||
}
|
||
if (topNum != null && topNum != "") {
|
||
setCookie('topNum', topNum);
|
||
} else {
|
||
topNum = "";
|
||
}
|
||
// console.log("topNum", topNum);
|
||
$.post(ext.contextPath + "/equipment/getEquipmentEfficiency.do", { bizId: companyId, efficiencyType: efficiencyType, topNum: topNum }, function (data) {
|
||
// console.log(data);
|
||
optionEfficiency = {
|
||
/*
|
||
* title : { text: '巡检异常统计', subtext: '济南南康水厂' },
|
||
*/
|
||
tooltip: {
|
||
trigger: 'axis'
|
||
},
|
||
toolbox: {
|
||
show: true,
|
||
/*
|
||
* feature : { mark : {show: true}, dataView : {show:
|
||
* true, readOnly: false}, magicType : {show: true,
|
||
* type: ['line', 'bar']}, restore : {show: true},
|
||
* saveAsImage : {show: true} }
|
||
*/
|
||
},
|
||
grid: {
|
||
left: '2%',
|
||
right: '10%',
|
||
top: '10%',
|
||
bottom: '2%',
|
||
containLabel: true
|
||
},
|
||
calculable: true,
|
||
xAxis: [
|
||
{
|
||
type: 'category',
|
||
data: data.xAis,// ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
|
||
name: '小时'
|
||
}
|
||
],
|
||
yAxis: [
|
||
{
|
||
type: 'value',
|
||
name: '效率(%)'
|
||
}
|
||
],
|
||
series: [
|
||
{
|
||
name: '效率(%)',
|
||
type: 'bar',
|
||
data: data.value,
|
||
/*
|
||
* markPoint : { data : [ {name : '年最高', value :
|
||
* 182.2, xAxis: 7, yAxis: 183, symbolSize:18},
|
||
* {name : '年最低', value : 2.3, xAxis: 11, yAxis: 3} ] },
|
||
*/
|
||
/*
|
||
* markLine : { data : [ {type : 'average', name :
|
||
* '平均值'} ] }
|
||
*/
|
||
itemStyle: {
|
||
normal: {
|
||
/*
|
||
* color: function(params) { // build a
|
||
* color map as your need. var colorList = [
|
||
* '#836FFF', ]; return
|
||
* colorList[params.dataIndex] },
|
||
*/
|
||
color: '#1C86EE'
|
||
}
|
||
},
|
||
}
|
||
]
|
||
};
|
||
myChartEfficiency = echarts.init(document.getElementById("equipment_efficiency"));
|
||
myChartEfficiency.setOption(optionEfficiency);
|
||
}, 'json');
|
||
};
|
||
|
||
// 主要设备无故障运行总台时
|
||
/*
|
||
* var myChartTotalTime; var equipmentTotalTime = function () { //
|
||
* $.post(ext.contextPath + "/equipment/getEquipmentFaultsNumber.do",
|
||
* {}, function(data){ option = { /* title : { text: '某地区蒸发量和降水量',
|
||
* subtext: '纯属虚构' }, tooltip: { trigger: 'axis' }, legend: { data:
|
||
* ['泵', '鼓风机', '脱水机'] }, /* toolbox: { show : true, feature : { mark :
|
||
* {show: true}, dataView : {show: true, readOnly: false}, magicType :
|
||
* {show: true, type: ['line', 'bar']}, restore : {show: true},
|
||
* saveAsImage : {show: true} } }, calculable: true, grid: { left: '2%',
|
||
* right: '10%', top: '10%', bottom: '2%', containLabel: true }, xAxis: [ {
|
||
* type: 'category', data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月',
|
||
* '8月', '9月', '10月', '11月', '12月'], name: '月份' } ], yAxis: [ { type:
|
||
* 'value', name: '时长(h)' } ], series: [ { name: '泵', type: 'bar', data:
|
||
* [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4,
|
||
* 3.3], markPoint: { data: [ { type: 'max', name: '最大值' }, { type:
|
||
* 'min', name: '最小值' } ] }, markLine: { data: [ { type: 'average',
|
||
* name: '平均值' } ] } }, { name: '鼓风机', type: 'bar', data: [4.6, 3.9,
|
||
* 2.0, 14.4, 30.7, 63.7, 200.6, 172.2, 35.7, 16.8, 9.0, 10.3],
|
||
* markPoint: { data: [ { type: 'max', name: '最大值' }, { type: 'min',
|
||
* name: '最小值' } ] /* data : [ {name : '年最高', value : 200.6, xAxis: 7,
|
||
* yAxis: 183, symbolSize:18}, {name : '年最低', value : 2.3, xAxis: 11,
|
||
* yAxis: 3} ] }, markLine: { data: [ { type: 'average', name: '平均值' } ] } }, {
|
||
* name: '脱水机', type: 'bar', data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7,
|
||
* 175.6, 182.2, 48.7, 18.8, 6.0, 2.3], markPoint: { data: [ { type:
|
||
* 'max', name: '最大值' }, { type: 'min', name: '最小值' } ] }, /* markPoint : {
|
||
* data : [ {name : '年最高', value : 182.2, xAxis: 7, yAxis: 183,
|
||
* symbolSize:18}, {name : '年最低', value : 2.3, xAxis: 11, yAxis: 3} ] },
|
||
* markLine: { data: [ { type: 'average', name: '平均值' } ] } } ] };
|
||
* myChartTotalTime =
|
||
* echarts.init(document.getElementById("total_time"));
|
||
* myChartTotalTime.setOption(option); //},'json'); }
|
||
*/
|
||
|
||
function toThousands(num) {
|
||
var num = (num || 0).toString(), result = '';
|
||
while (num.length > 3) {
|
||
result = ',' + num.slice(-6) + result;
|
||
num = num.slice(0, num.length - 6);
|
||
}
|
||
if (num) { result = num + result; }
|
||
return result;
|
||
}
|
||
|
||
// 查看设备详情
|
||
var equipmentViewFun = function (id) {
|
||
$.post(ext.contextPath + '/equipment/doview.do', { id: id }, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
// 保养单
|
||
var maintenanceViewFun = function (id) {
|
||
$.post(ext.contextPath + '/maintenance/viewMaintain.do', { id: id }, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subMaintainModal');
|
||
});
|
||
}
|
||
|
||
var patrolRecordViewFun = function (id) {
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/view.do', { id: id }, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var showDetailView = function (id) {
|
||
if (${ PatrolType_Equipment == patrolRecord.type }) {
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/viewDetial_Equipment.do', { id: id }, function (data) {
|
||
$("#subDiv_recordDetail").html(data);
|
||
openModal('subModal_recordDetail');
|
||
});
|
||
}else {
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/viewDetial.do', { id: id }, function (data) {
|
||
$("#subDiv_recordDetail").html(data);
|
||
openModal('subModal_recordDetail');
|
||
});
|
||
}
|
||
|
||
};
|
||
</script>
|
||
</head>
|
||
|
||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
<div class="wrapper">
|
||
<!-- 引用top -->
|
||
<%--<jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||
<!-- 菜单栏 -->
|
||
<%--<jsp:include page="/jsp/left.jsp"></jsp:include>--%>
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1 id="head_title"></h1>
|
||
<ol class="breadcrumb">
|
||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||
<!-- <li class="active">Here</li> -->
|
||
</ol>
|
||
</section>
|
||
<!-- Main content -->
|
||
<section class="content container-fluid">
|
||
<div id="mainAlertdiv"></div>
|
||
<div id="subDiv"></div>
|
||
<div id="subDetailDiv"></div>
|
||
<div id="subAbnormalDiv"></div>
|
||
<div id="traceDiv"></div>
|
||
<div id="handleDetailDiv"></div>
|
||
<div id="fileInputDiv"></div>
|
||
<div id="fault4SelectDiv"></div>
|
||
<div id="subDiv_recordDetail"></div>
|
||
<!-- 公司树 -->
|
||
<!-- <div id="companySelectTree"></div> -->
|
||
<div class="form-inline" style="margin-bottom: 40px;">
|
||
<div class="form-group" style="margin-top: 10px;">
|
||
<label class="form-label">工艺区段</label>
|
||
<select class="form-control select2 " id="processSection" name="processSection"
|
||
style="width: 200px;"></select>
|
||
</div>
|
||
<div class="form-group" style="margin-top: 10px;">
|
||
<label class="form-label">设备等级</label>
|
||
<select class="form-control select2 " id="equipmentLevel" name="equipmentLevel"
|
||
style="width: 200px;"></select>
|
||
</div>
|
||
<div class="form-group" style="margin-top: 10px;">
|
||
<label class="form-label">设备类型</label>
|
||
<select class="form-control select2 " id="equipmentClass" name="equipmentClass"
|
||
style="width: 200px;"></select>
|
||
</div>
|
||
<div class="input-group" style="margin-top: 10px;">
|
||
<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>
|
||
<!-- 设备数量统计 -->
|
||
<section class="col-lg-6 col-md-6 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">设备数量</h3>
|
||
</div>
|
||
<div class="box-body">
|
||
<div class="col-lg-12 col-md-12 col-xs-6">
|
||
<div class="small-box bg-aqua top-card">
|
||
<div class="inner" style="width: 100%;height: 100px;">
|
||
|
||
<div style="width: 50%;float: left">
|
||
<i class="fa fa-tv"></i>
|
||
<span style="font-size:15px;">设备总台套数</span>
|
||
<h3 style="color:#292929;font-size:40px;"><span
|
||
id="equipmentNumber"></span><span
|
||
style="font-size:14px;font-weight:normal">台</span></h3>
|
||
</div>
|
||
|
||
<div style="width: 50%;float: left;">
|
||
<i class="fa fa-tv"></i>
|
||
<span style="font-size:15px;">装机容量</span>
|
||
<h3 style="color:#292929;font-size:40px;"><span
|
||
id="installNumber"></span><span
|
||
style="font-size:14px;font-weight:normal">台</span></h3>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-12 col-md-12 col-xs-6">
|
||
<div class="small-box bg-green top-card">
|
||
<div class="inner" style="height: 100px;width: 100%;">
|
||
|
||
<div style="width: 50%;float: left;">
|
||
<i class="fa fa-tv"></i>
|
||
<span style="font-size:15px;">设备在用台套数</span>
|
||
<h3 style="color:#292929;font-size:40px;"><span
|
||
id="useEquipmentNumber"></span><span
|
||
style="font-size:14px;font-weight:normal">台</span></h3>
|
||
</div>
|
||
|
||
<div style="width: 50%;float: left;">
|
||
<i class="fa fa-tv"></i>
|
||
<span style="font-size:15px;">设备在用套数</span>
|
||
<h3 style="color:#292929;font-size:40px;"><span
|
||
id="useEquipmentNumber_a"></span><span
|
||
style="font-size:14px;font-weight:normal">台</span></h3>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-12 col-md-12 col-xs-6">
|
||
<div class="small-box bg-yellow top-card">
|
||
<div class="inner" style="height: 100px;">
|
||
<i class="fa fa-tv"></i>
|
||
<span style="font-size:15px;">设备总价值</span>
|
||
<h3 style="color:#292929;font-size:40px;"><span
|
||
id="EquipmentWorth"></span><span
|
||
style="font-size:14px;font-weight:normal">万元</span></h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- 设备关键KPI统计 -->
|
||
<!-- -->
|
||
<!-- -->
|
||
<!-- <section class=" col-lg-4 col-md-4 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">设备关键KPI</h3>
|
||
</div> -->
|
||
|
||
<!-- <div class="box-body" style=""> -->
|
||
<!--<div class="col-lg-6 col-md-6 col-xs-6">
|
||
<div class="small-box bg-green top-card">
|
||
<div class="inner">
|
||
<i class="fa fa-database"></i>
|
||
<span style="font-size:15px;">累计消缺数量</span>
|
||
<h3 style="color:#292929;font-size:40px;"><span id="defectNumber"></span><span
|
||
style="font-size:14px;font-weight:normal">个</span></h3>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<!-- <div class="col-lg-12 col-md-12 col-xs-12">
|
||
small box
|
||
<div class="small-box bg-red
|
||
top-card">
|
||
<div class="inner">
|
||
<i class="fa fa-bell"></i>
|
||
<span style="font-size:15px;">报警累计量</span>
|
||
<h3 style="color:#292929;font-size:40px;" id="equipmentsNum">21<span
|
||
style="font-size:14px;font-weight:normal">个</span></h3>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<!-- <div class="col-lg-12 col-md-12 col-xs-12">
|
||
small box
|
||
<div class="small-box bg-yellow top-card">
|
||
<div class="inner">
|
||
<i class="fa fa-hourglass"></i>
|
||
<span style="font-size:15px;">设备运行总台时</span>
|
||
<h3 style="color:#292929;font-size:40px;" id="mpointsNum">800<span
|
||
style="font-size:14px;font-weight:normal">h</span></h3>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<!-- ./col -->
|
||
<!--<div class=" col-lg-6 col-md-6 col-xs-6">
|
||
<div class="small-box bg-blue top-card">
|
||
<div class="inner">
|
||
<i class="fa fa-institution"></i>
|
||
<span style="font-size:15px;">故障停机率</span>
|
||
<h3 style="color:#292929;font-size:40px;" id="citesNum">3.1<span
|
||
style="font-size:14px;font-weight:normal">%</span></h3>
|
||
</div>
|
||
</div>
|
||
</div>-->
|
||
|
||
<!-- </div>
|
||
</div>
|
||
</section> -->
|
||
<!-- -->
|
||
<!-- -->
|
||
<!-- 设备关键KPI统计 -->
|
||
<section class=" col-lg-6 col-md-6 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">设备统计</h3>
|
||
</div>
|
||
<div class="box-body">
|
||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||
<!-- small box -->
|
||
<div class="small-box bg-green
|
||
top-card">
|
||
<div class="inner" style="height: 100px;">
|
||
<i class="fa fa-bell"></i>
|
||
<span style="font-size:15px;">设备完好率</span>
|
||
<h3 style="color:#292929;font-size:40px;" id="intactRate"><span
|
||
style="font-size:14px;font-weight:normal">%</span></h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||
<!-- small box -->
|
||
<div class="small-box bg-yellow top-card">
|
||
<div class="inner" style="height: 100px;">
|
||
<i class="fa fa-hourglass"></i>
|
||
<span style="font-size:15px;">设备故障率</span>
|
||
<h3 style="color:#292929;font-size:40px;" id="faultRate"><span
|
||
style="font-size:14px;font-weight:normal">%</span></h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||
<!-- small box -->
|
||
<div class="small-box bg-aqua top-card">
|
||
<div class="inner" style="height: 100px;">
|
||
<i class="fa fa-hourglass"></i>
|
||
<span style="font-size:15px;">设备利用率</span>
|
||
<h3 style="color:#292929;font-size:40px;" id="useRate"><span
|
||
style="font-size:14px;font-weight:normal">%</span></h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!--设备故障统计 -->
|
||
<section class=" col-lg-6 col-md-6 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">设备故障统计</h3>
|
||
<div class="box-tools pull-right" data-toggle="tooltip">
|
||
<div class="btn-group" data-toggle="btn-toggle">
|
||
<button type="button" class="btn btn-default btn-xs "
|
||
onclick="getEquipmentFault('week')">周</button>
|
||
<button type="button" class="btn btn-default btn-xs "
|
||
onclick="getEquipmentFault('month')">月</button>
|
||
<button type="button" class="btn btn-default btn-xs "
|
||
onclick="getEquipmentFault('year')">年</button>
|
||
</div>
|
||
</div>
|
||
<div class="box-body">
|
||
<div id="fault_chart"
|
||
style="height: 299px; overflow:auto; padding: 0px; position: relative;"></div>
|
||
</div>
|
||
<!-- /.box-body-->
|
||
</div>
|
||
</section>
|
||
|
||
<!--巡检异常、维修统计、养护计划 -->
|
||
<section class="col-lg-6 col-md-6 col-xs-12 connectedSortable ui-sortable" style="font-size:16px;">
|
||
<div class="nav-tabs-custom" style="background-color:white;">
|
||
<ul class="nav nav-tabs" id="mytabs" style="">
|
||
<li class="active"><a href="#chart1" onclick="chartOnclick('chart1')"
|
||
data-toggle="tab">异常统计</a></li>
|
||
<li class=""><a href="#chart2" onclick="chartOnclick('chart2')" data-toggle="tab">维修统计</a>
|
||
</li>
|
||
<li class=""><a href="#chart3" onclick="chartOnclick('chart3')" data-toggle="tab">养护计划</a>
|
||
</li>
|
||
<div class="box-tools pull-right" style="margin-top:4px;margin-right:4px;">
|
||
<div class="btn-group" data-toggle="btn-toggle">
|
||
<button type="button" class="btn btn-default btn-xs "
|
||
onclick="dateOnclick('week')">周</button>
|
||
<button type="button" class="btn btn-default btn-xs "
|
||
onclick="dateOnclick('month')">月</button>
|
||
<button type="button" class="btn btn-default btn-xs "
|
||
onclick="dateOnclick('year')">年</button>
|
||
</div>
|
||
</div>
|
||
</ul>
|
||
<div class="tab-content">
|
||
<div class=" tab-pane active" id="chart1">
|
||
<div id="patrol_abnormal" style="height:299px;">
|
||
</div>
|
||
</div>
|
||
<div class=" tab-pane" id="chart2">
|
||
<div id="repair_number" style="height:299px;">
|
||
</div>
|
||
</div>
|
||
<div class=" tab-pane " id="chart3">
|
||
<div id="maintain" style="height:299px;">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!--核心设备综合效率统计 -->
|
||
<!--
|
||
<section id="equEfficiencySection" class=" col-lg-6 col-md-6 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">核心设备综合效率</h3>
|
||
<div class="box-tools pull-right" data-toggle="tooltip" style="float:right">
|
||
<div class="btn-group" data-toggle="btn-toggle">
|
||
<button type="button" class="btn btn-default btn-xs " style="height:25px"
|
||
onclick="equipmentEfficiency('${EquipmentEfficiency_1H}', $('#topNumInput').val());">1小时</button>
|
||
<button type="button" class="btn btn-default btn-xs " style="height:25px"
|
||
onclick="equipmentEfficiency('${EquipmentEfficiency_8H}', $('#topNumInput').val());">8小时</button>
|
||
</div>
|
||
|
||
<div style="float:right">
|
||
<span style="font-size: 12">列数:</span>
|
||
<input id="topNumInput" type="number" value="12" style="width:45px;height:25px">
|
||
</div>
|
||
</div>
|
||
-->
|
||
<!--
|
||
<div class="box-tools pull-right">
|
||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||
</button>
|
||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||
</div>
|
||
-->
|
||
<!--
|
||
</div>
|
||
<div class="box-body">
|
||
<div id="equipment_efficiency" style="height: 300px; padding: 0px; position: relative;">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
-->
|
||
</section>
|
||
<!-- -->
|
||
<!--主要设备无故障运行总台时统计 -->
|
||
<!--<section class=" col-lg-6 col-md-6 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">主要设备无故障运行总台时</h3>
|
||
<div class="box-tools pull-right" data-toggle="tooltip">
|
||
<div class="btn-group" data-toggle="btn-toggle">
|
||
<button type="button" class="btn btn-default btn-xs " onclick="">周</button>
|
||
<button type="button" class="btn btn-default btn-xs " onclick="">月</button>
|
||
<button type="button" class="btn btn-default btn-xs " onclick="">年</button>
|
||
</div>
|
||
</div>
|
||
<!-- <div class="box-tools pull-right">
|
||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||
</button>
|
||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="box-body">
|
||
<div id="total_time" style="height: 300px; "></div>
|
||
</div>-->
|
||
<!-- /.box-body
|
||
</div>
|
||
</section>-->
|
||
<section class="col-lg-12 col-md-12 col-xs-12 connectedSortable ui-sortable">
|
||
<div class="box box-primary">
|
||
<div class="box-body no-padding">
|
||
<!-- THE CALENDAR -->
|
||
<div id="calendar"></div>
|
||
</div>
|
||
<!-- /.box-body -->
|
||
</div>
|
||
</section>
|
||
<!-- 设备台账、设备巡检、设备保养记录统计 -->
|
||
<section id="calendarSection" class="col-lg-12 col-md-12 col-xs-12 connectedSortable ui-sortable"
|
||
style="font-size:16px;">
|
||
<div style="background-color:white;">
|
||
<div class="nav-tabs-custom">
|
||
<ul class="nav nav-tabs" id="">
|
||
<li class="active"><a href="#tabFir" data-toggle="tab" index="0"
|
||
aria-expanded="true">设备台账</a>
|
||
</li>
|
||
<li class=""><a href="#tabSec" data-toggle="tab" index="1" aria-expanded="false">设备维护报养</a>
|
||
</li>
|
||
<li class=""><a href="#tabThird" data-toggle="tab" index="2" aria-expanded="false">设备巡检</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</div>
|
||
<div class="tab-content">
|
||
<div class=" tab-pane active" id="tabFir">
|
||
<table id="table1"></table>
|
||
</div>
|
||
<div class=" tab-pane " id="tabSec">
|
||
<table id="table2"></table>
|
||
</div>
|
||
<div class=" tab-pane " id="tabThird">
|
||
<table id="table3"></table>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
<!-- /.content -->
|
||
</div>
|
||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||
</div>
|
||
</body>
|
||
<!-- echarts-->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.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>
|
||
<!-- 本ak仅限珠海水控自来水项目临时使用,公司申请商业ak后替换更新。后续项目请使用公司商业ak -->
|
||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=NZhMekYms7kucYQ2ZeSlauu1E868uS4F"></script>
|
||
</html> |