1555 lines
59 KiB
Plaintext
1555 lines
59 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|||
|
|
<!DOCTYPE html>
|
|||
|
|
<html>
|
|||
|
|
<head>
|
|||
|
|
<meta charset="utf-8">
|
|||
|
|
<title>Layui</title>
|
|||
|
|
<meta name="renderer" content="webkit">
|
|||
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|||
|
|
|
|||
|
|
<!-- 引用页头及CSS页-->
|
|||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|||
|
|
<!-- echarts-->
|
|||
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/iconfontGroup/font_shakou/iconfont.css"/>
|
|||
|
|
<!-- 引入daterangepicker-->
|
|||
|
|
<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>
|
|||
|
|
|
|||
|
|
<!-- 文件上传-->
|
|||
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
|||
|
|
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
|||
|
|
</script>
|
|||
|
|
<%--文件上传 minio--%>
|
|||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.js" charset="utf-8"></script>
|
|||
|
|
|
|||
|
|
<style>
|
|||
|
|
|
|||
|
|
/*body {*/
|
|||
|
|
/* -webkit-text-size-adjust: none;*/
|
|||
|
|
/*}*/
|
|||
|
|
p {
|
|||
|
|
margin: 0px 0px 1px;
|
|||
|
|
}
|
|||
|
|
.box {
|
|||
|
|
margin-bottom: 0px;
|
|||
|
|
}
|
|||
|
|
.box-footer {
|
|||
|
|
padding: 5px;
|
|||
|
|
}
|
|||
|
|
.label-info {
|
|||
|
|
padding: 4px 1px;
|
|||
|
|
}
|
|||
|
|
.bgcolor-grey {
|
|||
|
|
background-color: #FF9900;
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
内部div
|
|||
|
|
*/
|
|||
|
|
.insideDiv {
|
|||
|
|
height: 98%;
|
|||
|
|
/*border: 1px solid red;*/
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
标题样式
|
|||
|
|
*/
|
|||
|
|
.titleStyle {
|
|||
|
|
font-size: 20px;
|
|||
|
|
font-weight: bold;
|
|||
|
|
color: #428ECB;
|
|||
|
|
}
|
|||
|
|
.element-calendar{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
日历样式
|
|||
|
|
*/
|
|||
|
|
.datepicker-inline {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.datepicker > div {
|
|||
|
|
height: 100%;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.box-body {
|
|||
|
|
padding: 0px 2px;
|
|||
|
|
}
|
|||
|
|
.box-header {
|
|||
|
|
padding: 10px;
|
|||
|
|
}
|
|||
|
|
.datepicker-inline .datepicker-days > table {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
}
|
|||
|
|
.box-body .fc {
|
|||
|
|
margin-top: 0px;
|
|||
|
|
}
|
|||
|
|
.fc-toolbar.fc-header-toolbar {
|
|||
|
|
margin-bottom: 0;
|
|||
|
|
}
|
|||
|
|
.fc-center> h2{
|
|||
|
|
font-size:15px;
|
|||
|
|
font-weight: bold;
|
|||
|
|
}
|
|||
|
|
.fixed-table-container thead th .th-inner, .fixed-table-container tbody td .th-inner {
|
|||
|
|
padding: 4px 8px;
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
解决了右边框每次加17px问题
|
|||
|
|
*/
|
|||
|
|
body.modal-open {
|
|||
|
|
overflow-y: auto !important;
|
|||
|
|
padding-right: 0 !important;
|
|||
|
|
}
|
|||
|
|
.fc-basic-view .fc-day-number, .fc-basic-view .fc-week-number {
|
|||
|
|
padding: 1px;
|
|||
|
|
}
|
|||
|
|
.fc-day-number {
|
|||
|
|
font-size: 12px;
|
|||
|
|
}
|
|||
|
|
.fc-event {
|
|||
|
|
border: 0;
|
|||
|
|
background-color: transparent;
|
|||
|
|
}
|
|||
|
|
.fc-toolbar {
|
|||
|
|
padding: 5px;
|
|||
|
|
}
|
|||
|
|
.fc-event, .fc-event:hover {
|
|||
|
|
color: #000;
|
|||
|
|
}
|
|||
|
|
.fixed-table-pagination div.pagination, .fixed-table-pagination .pagination-detail {
|
|||
|
|
margin-top: 2px;
|
|||
|
|
margin-bottom: 2px;
|
|||
|
|
}
|
|||
|
|
.fc button {
|
|||
|
|
height: 1.5em;
|
|||
|
|
}
|
|||
|
|
.margin-top-25{
|
|||
|
|
margin-top:25px
|
|||
|
|
}
|
|||
|
|
.margin-bottom-10{
|
|||
|
|
margin-bottom:10px
|
|||
|
|
}
|
|||
|
|
.text-title{
|
|||
|
|
font-size: 15px;
|
|||
|
|
font-weight: bold;
|
|||
|
|
}
|
|||
|
|
.text-content {
|
|||
|
|
font-size: 30px;
|
|||
|
|
font-weight: bold;
|
|||
|
|
}
|
|||
|
|
.text-color-red{
|
|||
|
|
color: #FF0000;
|
|||
|
|
}
|
|||
|
|
.text-color-blue{
|
|||
|
|
color: #0089F2;
|
|||
|
|
}
|
|||
|
|
.text-color-grey{
|
|||
|
|
color: #9F9F9F;
|
|||
|
|
}
|
|||
|
|
.bgcolor-red{
|
|||
|
|
background-color: #F54040;
|
|||
|
|
}
|
|||
|
|
.bgcolor-green{
|
|||
|
|
background-color: #3ABA64;
|
|||
|
|
}
|
|||
|
|
.text-color-red2{
|
|||
|
|
color: #F54040;
|
|||
|
|
}
|
|||
|
|
.text-color-green2{
|
|||
|
|
color: #3ABA64;
|
|||
|
|
}
|
|||
|
|
.text-color-grey2{
|
|||
|
|
color: #FF9900;
|
|||
|
|
}
|
|||
|
|
.cursor-pointer{
|
|||
|
|
cursor: pointer;
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
KPI左边
|
|||
|
|
*/
|
|||
|
|
.KPI_Left {
|
|||
|
|
width: 50%;
|
|||
|
|
height: 100%;
|
|||
|
|
float: left;
|
|||
|
|
overflow: hidden;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
KPI右边
|
|||
|
|
*/
|
|||
|
|
.KPI_Right {
|
|||
|
|
width: 50%;
|
|||
|
|
height: 100%;
|
|||
|
|
float: left;
|
|||
|
|
padding: 30px 0px 0px 30px;
|
|||
|
|
font-weight: bold;
|
|||
|
|
color: #195627;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
KPI图标
|
|||
|
|
*/
|
|||
|
|
.KPI_Img {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 50%;
|
|||
|
|
float: left;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
KPI名称
|
|||
|
|
*/
|
|||
|
|
.KPI_Title {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 50%;
|
|||
|
|
float: left;
|
|||
|
|
font-size: 16px;
|
|||
|
|
color: #ffffff;
|
|||
|
|
}
|
|||
|
|
.top_left {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 25%;
|
|||
|
|
border-bottom: 1px solid #eaeaea;
|
|||
|
|
border-top: 3px solid #eaeaea;
|
|||
|
|
background-color: #ffffff;
|
|||
|
|
padding-top: 10px;
|
|||
|
|
text-align: center;
|
|||
|
|
font-size: 12px;
|
|||
|
|
}
|
|||
|
|
@media (min-width: 768px) {
|
|||
|
|
.KPI_Title {
|
|||
|
|
/*color: pink;*/
|
|||
|
|
font-size: 2px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.titleStyle {
|
|||
|
|
font-size: 16px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.KPI_Right {
|
|||
|
|
font-size: 12px;
|
|||
|
|
padding: 10px 0px 0px 20px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-shujuku1 {
|
|||
|
|
font-size: 15px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-baojing {
|
|||
|
|
font-size: 15px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-lishijilu {
|
|||
|
|
font-size: 15px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-tingji {
|
|||
|
|
font-size: 15px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@media (min-width: 992px) {
|
|||
|
|
.KPI_Title {
|
|||
|
|
/*color: blue;*/
|
|||
|
|
font-size: 14px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.titleStyle {
|
|||
|
|
font-size: 16px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.KPI_Right {
|
|||
|
|
font-size: 17px;
|
|||
|
|
padding: 10px 0px 0px 20px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-shujuku1 {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-baojing {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-lishijilu {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-tingji {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@media (min-width: 1200px) {
|
|||
|
|
.KPI_Title {
|
|||
|
|
/*color: yellow;*/
|
|||
|
|
font-size: 18px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.titleStyle {
|
|||
|
|
font-size: 18px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.KPI_Right {
|
|||
|
|
font-size: 27px;
|
|||
|
|
padding: 10px 0px 0px 20px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-shujuku1 {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-baojing {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-lishijilu {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-tingji {
|
|||
|
|
font-size: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.top_left {
|
|||
|
|
padding-top: 5px;
|
|||
|
|
font-size: 14px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@media (min-width: 1400px) {
|
|||
|
|
.KPI_Title {
|
|||
|
|
/*color: red;*/
|
|||
|
|
font-size: 18px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.titleStyle {
|
|||
|
|
font-size: 18px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.KPI_Right {
|
|||
|
|
font-size: 36px;
|
|||
|
|
padding: 15px 0px 0px 15px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-shujuku1 {
|
|||
|
|
font-size: 40px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-baojing {
|
|||
|
|
font-size: 40px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-lishijilu {
|
|||
|
|
font-size: 40px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.icon-tingji {
|
|||
|
|
font-size: 40px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.top_left {
|
|||
|
|
padding-top: 8px;
|
|||
|
|
font-size: 14px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.markedDay {
|
|||
|
|
background-color: #FFC1E0;
|
|||
|
|
}
|
|||
|
|
.typeSelect{
|
|||
|
|
position: absolute;
|
|||
|
|
left: 20px;
|
|||
|
|
z-index: 11;
|
|||
|
|
}
|
|||
|
|
.datetimepicker {
|
|||
|
|
min-width: 220px;
|
|||
|
|
}
|
|||
|
|
.datetimepicker table {
|
|||
|
|
width: 100%;
|
|||
|
|
}
|
|||
|
|
.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9,
|
|||
|
|
.col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9,
|
|||
|
|
.col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9,
|
|||
|
|
.col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {
|
|||
|
|
padding-right: 10px;
|
|||
|
|
padding-left: 10px;
|
|||
|
|
}
|
|||
|
|
.col-md-2-5{
|
|||
|
|
float: left;
|
|||
|
|
width: 20%;
|
|||
|
|
position: relative;
|
|||
|
|
min-height: 1px;
|
|||
|
|
padding-right: 10px;
|
|||
|
|
padding-left: 10px;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
|
|||
|
|
</head>
|
|||
|
|
<body>
|
|||
|
|
|
|||
|
|
<div style="background-color: #EAEAEA;padding:5px 15px;" id="mainDiv">
|
|||
|
|
|
|||
|
|
<div id="subDiv"></div>
|
|||
|
|
<div id="subDiv_view"></div>
|
|||
|
|
<div id="subDiv_recordDetail"></div>
|
|||
|
|
<div id="subDiv_contents"></div>
|
|||
|
|
|
|||
|
|
<div id="subDiv_workorder"></div>
|
|||
|
|
<div id="subDiv_workorder_view"></div>
|
|||
|
|
|
|||
|
|
<input type="hidden" id="proPage" value="1">
|
|||
|
|
<input type="hidden" id="levelPage" value="1">
|
|||
|
|
<input type="hidden" id="classPage" value="1">
|
|||
|
|
|
|||
|
|
<input type="hidden" id="proId" value="">
|
|||
|
|
<input type="hidden" id="levelId" value="">
|
|||
|
|
<input type="hidden" id="classId" value="">
|
|||
|
|
<div class="row" style="padding-bottom: 5px;">
|
|||
|
|
<div class="col-lg-1">
|
|||
|
|
<input id="monthDt" name="monthDt" type="text" placeholder="点击选择" class="form-control input-sm" value="${nowdate.substring(0,7)}" readonly/>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-2">
|
|||
|
|
<div class="input-group">
|
|||
|
|
<span class="input-group-addon" id="basic-addon1">工艺段</span>
|
|||
|
|
<select id ="process" class="form-control select2 input-sm" style="width: 100%;"></select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-2">
|
|||
|
|
<!-- <select id ="equClass" class="form-control select2 input-sm " style="width: 100%;"></select> -->
|
|||
|
|
<div id="div1" class="input-group input-group-sm pull-left">
|
|||
|
|
<input id="equClass" name="equClass" type="hidden"/>
|
|||
|
|
<span id="companyName1" style="width:220px;border: none;background: transparent;"></span>
|
|||
|
|
<ul id="companyselect1"
|
|||
|
|
style="list-style-type:none;padding-left:0px;margin:0;width:100%;">
|
|||
|
|
<li class="dropdown messages-menu">
|
|||
|
|
<!-- Menu toggle button -->
|
|||
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:80px;"
|
|||
|
|
onclick="document.getElementById('company_select1').style.display = 'block';">
|
|||
|
|
<div class="input-group">
|
|||
|
|
<span class="input-group-addon">设备类型:</span>
|
|||
|
|
<input class="form-control input-sm " id="cname_input1" name="cname_input1" readonly/>
|
|||
|
|
</div>
|
|||
|
|
</a>
|
|||
|
|
<ul id="company_select1" class="dropdown-menu" data-stopPropagation="true" style="border: 1px solid #ccc;">
|
|||
|
|
<li>
|
|||
|
|
<div id="companytree1" style="width: 275px;overflow:auto;max-height:500px;">
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</li>
|
|||
|
|
</ul>
|
|||
|
|
</li>
|
|||
|
|
</ul>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row ">
|
|||
|
|
<div class="col-lg-7">
|
|||
|
|
<div class="box box-solid">
|
|||
|
|
<div class="box-header ui-sortable-handle">
|
|||
|
|
<small class="label label-info"> </small>
|
|||
|
|
<h3 class="box-title">关键指标</h3>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-header -->
|
|||
|
|
<div class="box-body no-padding text-center">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-4 element-Basics">
|
|||
|
|
<div class="col-lg-6 text-title">设备总数(个)</div>
|
|||
|
|
<div class="col-lg-6 text-title">设备在用率</div>
|
|||
|
|
<div class="col-lg-6 text-content text-color-blue equipment_total cursor-pointer"
|
|||
|
|
onclick="parent.addTab('89a72045ccff45649e1401a43e204c6c','设备台账','equipment/showEquipmentCard.do')" >0</div>
|
|||
|
|
<div class="col-lg-6 text-content text-color-blue equipment_utilization_rate">0%</div>
|
|||
|
|
<div class="col-md-2-5 margin-top-25">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">闲置</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 equipment_leaveUnused">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-2-5 margin-top-25">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">在用</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-blue equipment_inUse">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-2-5 margin-top-25">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">库存</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 equipment_stock">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-2-5 margin-top-25">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">待报废</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 equipment_scrap">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-2-5 margin-top-25">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">其他</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 not_config_status_num">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-12 margin-top-25 progressBar" id="equipment_class_number"></div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 element-Basics">
|
|||
|
|
<div class="col-lg-12 text-title">设备完好率</div>
|
|||
|
|
<div class="col-lg-6">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">完好设备</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-blue equipment_inspection_intact">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-6">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">总数</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 equipment_total">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 annular" id="equipment_intact_rate">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 element-Basics">
|
|||
|
|
<div class="col-lg-12 text-title">异常上报数(个)</div>
|
|||
|
|
<div class="col-lg-12 text-content text-color-red abnormal_reporting cursor-pointer"
|
|||
|
|
onclick="parent.addTab('04393e5655a04e8a860ad73f7636104d','异常上报工单','maintenance/abnormity/showList_new.do')" >0</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 annular" id="abnormal_reporting">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-body -->
|
|||
|
|
</div>
|
|||
|
|
<div class="box box-solid">
|
|||
|
|
<div class="box-header ui-sortable-handle">
|
|||
|
|
<small class="label label-info"> </small>
|
|||
|
|
<h3 class="box-title">任务完成情况</h3>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-header -->
|
|||
|
|
<div class="box-body no-padding text-center">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-4 element-Basics cursor-pointer"
|
|||
|
|
onclick="jump4url('0d9debe02623454dbd2b5999f1977d7b','设备巡检日历','timeEfficiency/patrolRecord/showCalendar_Equipment.do')" >
|
|||
|
|
<div class="row margin-bottom-10" >
|
|||
|
|
<div class="col-lg-12 annular" id="patrol_inspection_completion_rate">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">总数</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 patrol_inspection_total">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">已完成</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-blue patrol_inspection_complete">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">待处理</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 patrol_inspection_pending">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 element-Basics" >
|
|||
|
|
<div class="row margin-bottom-10">
|
|||
|
|
<div class="col-lg-12 annular" id="repair_completion_rate">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">总数</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 repair_total">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 cursor-pointer"
|
|||
|
|
onclick="jump4url('fcb3633640994d9f99d96b0bd7cd0ec4','设备维修记录','workorder/workorderDetail/showEndRepairList.do')" >
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">已完成</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-blue repair_complete">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 cursor-pointer"
|
|||
|
|
onclick="jump4url('83878c3b010047c19cd6fa70769ff1d8','设备维修工单','workorder/workorderDetail/showRepairList.do')" >
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">待处理</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 repair_pending">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 element-Basics" >
|
|||
|
|
<div class="row margin-bottom-10">
|
|||
|
|
<div class="col-lg-12 annular" id="maintain_completion_rate">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">总数</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 maintain_total">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 cursor-pointer"
|
|||
|
|
onclick="jump4url('4db6e2c8a29d4c10a85753512e8f61a6','设备保养记录','workorder/workorderDetail/showEndMaintainList.do')">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">已完成</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-blue maintain_complete">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-4 cursor-pointer"
|
|||
|
|
onclick="jump4url('e4ba209c9f624c0e9d68fb4c4d2d68fd','设备保养工单','workorder/workorderDetail/showMaintainList.do')">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 text-color-grey">待处理</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12 maintain_pending">0</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-body -->
|
|||
|
|
<div class="box-footer">
|
|||
|
|
<select id ="typeSelect" class="form-control select2 input-sm typeSelect" style="width: 100px;" onchange="changeEchartsbars(this.value)" >
|
|||
|
|
<option value="patrol_inspection" selected>设备巡检</option>
|
|||
|
|
<option value="repair">设备维修</option>
|
|||
|
|
<option value="maintain">设备保养</option>
|
|||
|
|
</select>
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-lg-12">
|
|||
|
|
<div id="echarts-bars" class="element-Basics"></div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-lg-5">
|
|||
|
|
<div class="box box-solid">
|
|||
|
|
<div class="box-header ui-sortable-handle">
|
|||
|
|
<small class="label label-info"> </small>
|
|||
|
|
<h3 class="box-title">设备日历</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<ol class="breadcrumb" style="background-color: transparent; margin-bottom: 0; padding: 5px;">
|
|||
|
|
<li><i class="fa fa-square text-color-green2"></i>已完成</li>
|
|||
|
|
<li><i class="fa fa-square text-color-red2"></i>未完成 </li>
|
|||
|
|
<li><i class="fa fa-square text-color-grey2"></i>已下发 </li>
|
|||
|
|
</ol>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-header -->
|
|||
|
|
<div class="box-body">
|
|||
|
|
<div id='calendar'>
|
|||
|
|
</div>
|
|||
|
|
<!--The calendar -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-body -->
|
|||
|
|
<div class="box-footer">
|
|||
|
|
<table id="table2" style="table-layout:fixed" class="table table-condensed"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
|
|||
|
|
var conpanyId = "${param.unitId}";
|
|||
|
|
$(function () {
|
|||
|
|
height = $(window).height();
|
|||
|
|
width = $(window).width();
|
|||
|
|
if(height<(global_height*0.1)){
|
|||
|
|
height = global_height;
|
|||
|
|
}
|
|||
|
|
if(width<(global_width*0.1)){
|
|||
|
|
width = global_width;
|
|||
|
|
}
|
|||
|
|
$('.element-calendar').height(height*0.53);
|
|||
|
|
$('.element-Basics').height(height*0.28);
|
|||
|
|
$('.annular').height(height*0.2);
|
|||
|
|
$('.progressBar').height(height*0.1);
|
|||
|
|
|
|||
|
|
$("#monthDt").datetimepicker({
|
|||
|
|
keyboardNavigation: false,
|
|||
|
|
language: 'zh-CN',
|
|||
|
|
forceParse: false,
|
|||
|
|
autoclose: true,
|
|||
|
|
todayBtn: true,
|
|||
|
|
clearBtn: true,
|
|||
|
|
startView: 3,
|
|||
|
|
minView : 3,
|
|||
|
|
maxView : 4,
|
|||
|
|
format: 'yyyy-mm',
|
|||
|
|
endDate: new Date(),
|
|||
|
|
}).on('changeDate', function () {
|
|||
|
|
firstFun();
|
|||
|
|
});
|
|||
|
|
if(unitId==null || unitId==undefined || unitId==''){
|
|||
|
|
unitId = conpanyId;
|
|||
|
|
}
|
|||
|
|
//工艺
|
|||
|
|
getProcessSection();
|
|||
|
|
//设备类型
|
|||
|
|
getEquipmentClass();
|
|||
|
|
firstFun();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
window.onresize = function () {
|
|||
|
|
firstFun();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var color_blueSystem = ['#0C4F9D','#0089F2','#68B4FF','#95DEFF','#CBEFFF','#BBDEFF'];
|
|||
|
|
var color_bars = ['#D4D4D4','#3ABA64','#CB70EC'];
|
|||
|
|
var calendarDt = "";
|
|||
|
|
var equipmentClassId = "";
|
|||
|
|
var processSectionId = "";
|
|||
|
|
var tableType = "repair,maintain";
|
|||
|
|
function firstFun() {
|
|||
|
|
var height = $(window).height();
|
|||
|
|
$('#mainDiv').css('height', height);//页面加载先给高度
|
|||
|
|
monthDt = $("#monthDt").val();
|
|||
|
|
var day = new Date();
|
|||
|
|
var todayformat = day.format("yyyy-MM-dd");
|
|||
|
|
calendarDt = todayformat;
|
|||
|
|
equipmentClassId = $("#equClass").val();
|
|||
|
|
processSectionId = $("#process").val();
|
|||
|
|
//初始化日历
|
|||
|
|
initCalendar();
|
|||
|
|
//设备维修table
|
|||
|
|
tableType3(unitId, '0', '2021-04-11');
|
|||
|
|
|
|||
|
|
$.post(ext.contextPath + "/equipment/getEquipmentOverview_Target.do",
|
|||
|
|
{unitId:unitId,date:monthDt,equipmentClassId:equipmentClassId,processSectionId:processSectionId},
|
|||
|
|
function(data) {
|
|||
|
|
var result = data.result;
|
|||
|
|
var all_num = result.all_num;//所有设备-数量
|
|||
|
|
$('.equipment_total').html(all_num);
|
|||
|
|
var intact_num = result.intact_num;//完好设备-数量
|
|||
|
|
$('.equipment_inspection_intact').html(intact_num);
|
|||
|
|
var daibaofei_num = result.daibaofei_num;//待报废设备-数量
|
|||
|
|
$('.equipment_scrap').html(daibaofei_num);
|
|||
|
|
var zaiyong_num = result.zaiyong_num;//在用设备-数量
|
|||
|
|
$('.equipment_inUse').html(zaiyong_num);
|
|||
|
|
var xianzhi_num = result.xianzhi_num;//闲置设备-数量
|
|||
|
|
$('.equipment_leaveUnused').html(xianzhi_num);
|
|||
|
|
var kucun_num = result.kucun_num;//库存设备-数量
|
|||
|
|
$('.equipment_stock').html(kucun_num);
|
|||
|
|
var not_config_status_num = result.not_config_status_num;//其他设备-数量
|
|||
|
|
$('.not_config_status_num').html(not_config_status_num);
|
|||
|
|
|
|||
|
|
var level_a_num = result.level_a_num;//A类设备-数量
|
|||
|
|
var level_b_num = result.level_b_num;//B类设备-数量
|
|||
|
|
var level_c_num = result.level_c_num;//C类设备-数量
|
|||
|
|
var not_config_level_num = result.not_config_level_num;//其他设备-数量
|
|||
|
|
//在用率
|
|||
|
|
var equipment_utilization_rate = 100;
|
|||
|
|
if(all_num>0){
|
|||
|
|
equipment_utilization_rate = zaiyong_num/all_num*100;
|
|||
|
|
equipment_utilization_rate = Math.floor((equipment_utilization_rate));
|
|||
|
|
}
|
|||
|
|
$('.equipment_utilization_rate').html(equipment_utilization_rate+"%");
|
|||
|
|
var equipment_intact_rate = 100;
|
|||
|
|
if(result.intact_rate!=null && result.intact_rate!=undefined && result.intact_rate!=''){
|
|||
|
|
equipment_intact_rate = result.intact_rate;
|
|||
|
|
}
|
|||
|
|
/* if(all_num>0){
|
|||
|
|
equipment_intact_rate = intact_num/all_num*100;
|
|||
|
|
equipment_intact_rate = Math.round((equipment_intact_rate));
|
|||
|
|
} */
|
|||
|
|
doAnnular('equipment_intact_rate',equipment_intact_rate,"设备完好率",color_blueSystem[1]);
|
|||
|
|
var abnormity_json = 0;//异常上报
|
|||
|
|
if(result.abnormity_json!=null && result.abnormity_json!=undefined && result.abnormity_json!=''){
|
|||
|
|
abnormity_json = result.abnormity_json;
|
|||
|
|
}
|
|||
|
|
echartspie('abnormal_reporting',abnormity_json,null);
|
|||
|
|
var abnormal_reporting = 0;
|
|||
|
|
if(abnormity_json.length>0){
|
|||
|
|
for(var i=0;i<abnormity_json.length;i++){
|
|||
|
|
abnormal_reporting += abnormity_json[i].value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
$('.abnormal_reporting').html(abnormal_reporting);
|
|||
|
|
var data = [
|
|||
|
|
{ value: level_a_num, name: 'A类' },
|
|||
|
|
{ value: level_b_num, name: 'B类' },
|
|||
|
|
{ value: level_c_num, name: 'C类' },
|
|||
|
|
{ value: not_config_level_num, name: '其他' },
|
|||
|
|
];
|
|||
|
|
progressBar('equipment_class_number',data,['#00A5FF','#2DC85F','#3ED7D4','#BBDEFF']);
|
|||
|
|
},'json');
|
|||
|
|
$.post(ext.contextPath + "/equipment/getEquipmentOverview_Completion.do",
|
|||
|
|
{unitId:unitId,date:monthDt,equipmentClassId:equipmentClassId,processSectionId:processSectionId},
|
|||
|
|
function(data) {
|
|||
|
|
var result = data.result;
|
|||
|
|
var all_patrol_num = result.all_patrol_num; //设备巡检总数
|
|||
|
|
$('.patrol_inspection_total').html(all_patrol_num);
|
|||
|
|
var finish_patrol_num = result.finish_patrol_num ; //设备巡检完成数
|
|||
|
|
$('.patrol_inspection_complete').html(finish_patrol_num);
|
|||
|
|
var handle_patrol_num = result.handle_patrol_num; //设备巡检待处理数
|
|||
|
|
$('.patrol_inspection_pending').html(handle_patrol_num);
|
|||
|
|
var all_repair_num = result.all_repair_num ; //维修工单总数
|
|||
|
|
$('.repair_total').html(all_repair_num);
|
|||
|
|
var finish_repair_num = result.finish_repair_num; //维修工单完成数
|
|||
|
|
$('.repair_complete').html(finish_repair_num);
|
|||
|
|
var handle_repair_num = result.handle_repair_num; //维修工单待处理数
|
|||
|
|
$('.repair_pending').html(handle_repair_num);
|
|||
|
|
var all_main_num = result.all_main_num //保养工单总数
|
|||
|
|
$('.maintain_total').html(all_main_num);
|
|||
|
|
var finish_main_num = result.finish_main_num; //保养工单完成数
|
|||
|
|
$('.maintain_complete').html(finish_main_num);
|
|||
|
|
var handle_main_num = result.handle_main_num ; //保养工单待处理数
|
|||
|
|
$('.maintain_pending').html(handle_main_num);
|
|||
|
|
var patrol_inspection_completion_rate = 100;
|
|||
|
|
if(all_patrol_num>0){
|
|||
|
|
patrol_inspection_completion_rate = finish_patrol_num/all_patrol_num*100;
|
|||
|
|
}
|
|||
|
|
patrol_inspection_completion_rate = Math.floor(patrol_inspection_completion_rate);
|
|||
|
|
var repair_completion_rate = 100;
|
|||
|
|
if(all_repair_num>0){
|
|||
|
|
repair_completion_rate = finish_repair_num/all_repair_num*100;
|
|||
|
|
}
|
|||
|
|
repair_completion_rate = Math.floor(repair_completion_rate);
|
|||
|
|
var maintain_completion_rate = 100;
|
|||
|
|
if(all_main_num>0){
|
|||
|
|
maintain_completion_rate = finish_main_num/all_main_num*100;
|
|||
|
|
}
|
|||
|
|
maintain_completion_rate = Math.floor(maintain_completion_rate*100)/100;
|
|||
|
|
doAnnular('patrol_inspection_completion_rate',patrol_inspection_completion_rate,"巡检完成率",color_blueSystem[1]);
|
|||
|
|
doAnnular('repair_completion_rate',repair_completion_rate,"维修完成率",color_blueSystem[1]);
|
|||
|
|
doAnnular('maintain_completion_rate',maintain_completion_rate,"保养完成率",color_blueSystem[1]);
|
|||
|
|
},'json');
|
|||
|
|
changeEchartsbars("patrol_inspection");
|
|||
|
|
}
|
|||
|
|
function getProcessSection(){
|
|||
|
|
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:unitId}, function(data) {
|
|||
|
|
var selelct_ =$("#process").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'});
|
|||
|
|
selelct_.val("").trigger("change");
|
|||
|
|
selelct_.on("change",function(e){
|
|||
|
|
firstFun();
|
|||
|
|
});
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
function getEquipmentClass(){
|
|||
|
|
//设备类型树
|
|||
|
|
$.post(ext.contextPath + '/equipment/equipmentClass/getEquipmentClassJsonForTree.do', {
|
|||
|
|
ng: '',
|
|||
|
|
unitId: unitId
|
|||
|
|
}, function (data) {
|
|||
|
|
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
|||
|
|
$("#equClass").val(data[0].id);
|
|||
|
|
$("#companyselect1").hide();
|
|||
|
|
$("#companyName1").text("设备类型:" + data[0].text);
|
|||
|
|
// showtable();
|
|||
|
|
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
|||
|
|
$('#companytree1').treeview({
|
|||
|
|
data: data,
|
|||
|
|
showBorder: false,
|
|||
|
|
showCheckbox: false,
|
|||
|
|
levels: 1
|
|||
|
|
});
|
|||
|
|
$('#companytree1').on('nodeSelected', function (event, data) {
|
|||
|
|
$("#equClass").val(data.id);
|
|||
|
|
$("#cname_input1").val(data.text);
|
|||
|
|
document.getElementById('company_select1').style.display = "none";
|
|||
|
|
$("ul#company_select1").hide();
|
|||
|
|
firstFun();
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
//待完善
|
|||
|
|
}
|
|||
|
|
;
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
//防止点击树收起下拉框
|
|||
|
|
$("#company_select1").on("click", function (e) {
|
|||
|
|
event.stopPropagation();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
//点击树之外其他区域收起
|
|||
|
|
$(document).click(function () {
|
|||
|
|
$("#company_select1").hide();
|
|||
|
|
});
|
|||
|
|
/* //设备类型搜索
|
|||
|
|
$.post(ext.contextPath + "/equipment/equipmentClass/getEquipmentClassForSelect.do", {class_pid:'-1'}, function(data) {
|
|||
|
|
var selelct =$("#equClass").select2({
|
|||
|
|
data: data,
|
|||
|
|
placeholder:'设备类型',//默认文字提示
|
|||
|
|
allowClear: true,//允许清空
|
|||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,//数据大于10个启用搜索框
|
|||
|
|
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
|||
|
|
selelct.val('').trigger("change");
|
|||
|
|
selelct.on("change",function(e){
|
|||
|
|
firstFun();
|
|||
|
|
});
|
|||
|
|
},'json'); */
|
|||
|
|
}
|
|||
|
|
function changeEchartsbars(value){
|
|||
|
|
var type = 0;
|
|||
|
|
if(value=='patrol_inspection'){
|
|||
|
|
type = 0;
|
|||
|
|
}
|
|||
|
|
if(value=='repair'){
|
|||
|
|
type = 1;
|
|||
|
|
}
|
|||
|
|
if(value=='maintain'){
|
|||
|
|
type = 2;
|
|||
|
|
}
|
|||
|
|
$.post(ext.contextPath + "/equipment/getEquipmentOverview_Statistics.do",
|
|||
|
|
{unitId:unitId,date:monthDt,equipmentClassId:equipmentClassId,processSectionId:processSectionId,type:type},
|
|||
|
|
function(data) {
|
|||
|
|
var result = data.result;
|
|||
|
|
var data_legend = ['计划数', '实际完成', '临时'];
|
|||
|
|
var data_xAxis = ['1','2','3','4','5','6','7','8','9','10','11','12'];
|
|||
|
|
var temporary= [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|||
|
|
var data_series =[
|
|||
|
|
{
|
|||
|
|
name: '计划数',
|
|||
|
|
type: 'bar',
|
|||
|
|
barGap: 0,
|
|||
|
|
data: result.plan
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
name: '实际完成',
|
|||
|
|
type: 'bar',
|
|||
|
|
data: result.finish
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
name: '临时',
|
|||
|
|
type: 'bar',
|
|||
|
|
data: temporary
|
|||
|
|
},
|
|||
|
|
];
|
|||
|
|
echartsbars("echarts-bars",data_xAxis,data_series,data_legend,color_bars);
|
|||
|
|
},'json');
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
function doAnnular(id,data,title,color){
|
|||
|
|
var lifeChart = echarts.getInstanceByDom(document.getElementById(id));
|
|||
|
|
//有的话就获取已有echarts实例的DOM节点。
|
|||
|
|
if (lifeChart != null) { // 如果存在,就进行销毁。
|
|||
|
|
lifeChart.dispose();
|
|||
|
|
}
|
|||
|
|
var option = {
|
|||
|
|
color:[color],
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
type: 'gauge',
|
|||
|
|
startAngle: 90,
|
|||
|
|
endAngle: -270,
|
|||
|
|
radius: '95%',
|
|||
|
|
pointer: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
progress: {
|
|||
|
|
show: true,
|
|||
|
|
roundCap: true,
|
|||
|
|
clip: false,
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: false,
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisLabel: {
|
|||
|
|
show: false,
|
|||
|
|
distance: 50
|
|||
|
|
},
|
|||
|
|
axisLine: {
|
|||
|
|
lineStyle: {
|
|||
|
|
width: 8
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
data: [
|
|||
|
|
{
|
|||
|
|
value: data,
|
|||
|
|
name: title,
|
|||
|
|
title: {
|
|||
|
|
offsetCenter: ['0%', '-35%']
|
|||
|
|
},
|
|||
|
|
detail: {
|
|||
|
|
valueAnimation: true,
|
|||
|
|
offsetCenter: ['0%', '30%']
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
title: {
|
|||
|
|
fontSize: 14
|
|||
|
|
},
|
|||
|
|
detail: {
|
|||
|
|
fontSize: 35,
|
|||
|
|
fontWeight:500,
|
|||
|
|
color: '#000',
|
|||
|
|
formatter: '{value}%'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
};
|
|||
|
|
lifeChart = echarts.init(document.getElementById(id));
|
|||
|
|
lifeChart.setOption(option,true);
|
|||
|
|
}
|
|||
|
|
function progressBar(id,data,color){
|
|||
|
|
var myChart = echarts.init(document.getElementById(id));
|
|||
|
|
var option={
|
|||
|
|
grid: {
|
|||
|
|
top: 0,
|
|||
|
|
bottom: 0,
|
|||
|
|
left: '2%',
|
|||
|
|
right: '0'
|
|||
|
|
},
|
|||
|
|
legend: {
|
|||
|
|
x:'left',
|
|||
|
|
icon:'circle',
|
|||
|
|
padding: [5, 1],
|
|||
|
|
itemGap: 5 ,
|
|||
|
|
data: [data[0].name,data[1].name,data[2].name,data[3].name],
|
|||
|
|
formatter:function(name){
|
|||
|
|
let target;
|
|||
|
|
for(let i=0;i<data.length;i++){
|
|||
|
|
if(data[i].name===name){
|
|||
|
|
target=data[i].value
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
let arr=[""+name+":"+target+""]
|
|||
|
|
return arr;
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
xAxis: {
|
|||
|
|
show: false,
|
|||
|
|
type: "value",
|
|||
|
|
boundaryGap: [0, 0]
|
|||
|
|
},
|
|||
|
|
yAxis: [
|
|||
|
|
{
|
|||
|
|
type: "category",
|
|||
|
|
data: [""],
|
|||
|
|
axisLine: { show: false },
|
|||
|
|
axisTick: [
|
|||
|
|
{
|
|||
|
|
show: false
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
name: data[0].name,
|
|||
|
|
type: "bar",
|
|||
|
|
stack: 'total',
|
|||
|
|
itemStyle: {
|
|||
|
|
normal: {
|
|||
|
|
//barBorderRadius: 9,
|
|||
|
|
color: color[0]
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
barWidth: 20,
|
|||
|
|
data: [data[0].value]
|
|||
|
|
}, {
|
|||
|
|
name: data[1].name,
|
|||
|
|
type: "bar",
|
|||
|
|
stack: 'total',
|
|||
|
|
itemStyle: {
|
|||
|
|
normal: {
|
|||
|
|
//barBorderRadius: 9,
|
|||
|
|
color: color[1]
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
barWidth: 20,
|
|||
|
|
data: [data[1].value]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
name: data[2].name,
|
|||
|
|
type: "bar",
|
|||
|
|
stack: 'total',
|
|||
|
|
barWidth: 20,
|
|||
|
|
barGap: "-100%",
|
|||
|
|
data: [data[2].value],
|
|||
|
|
itemStyle: {
|
|||
|
|
normal: {
|
|||
|
|
color: color[2],
|
|||
|
|
//barBorderRadius: 9
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
name: data[3].name,
|
|||
|
|
type: "bar",
|
|||
|
|
stack: 'total',
|
|||
|
|
barWidth: 20,
|
|||
|
|
barGap: "-100%",
|
|||
|
|
data: [data[3].value],
|
|||
|
|
itemStyle: {
|
|||
|
|
normal: {
|
|||
|
|
color: color[3],
|
|||
|
|
//barBorderRadius: 9
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
myChart.clear();
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
}
|
|||
|
|
//添加千分位符合
|
|||
|
|
function toThousands(num) {
|
|||
|
|
var nums =num;
|
|||
|
|
var re=/\d{1,3}(?=(\d{3})+$)/g;
|
|||
|
|
var n1=0;
|
|||
|
|
if(nums!=null && nums!='' && nums!=undefined){
|
|||
|
|
n1=nums.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;});
|
|||
|
|
}
|
|||
|
|
return n1;
|
|||
|
|
}
|
|||
|
|
function initCalendar(){
|
|||
|
|
var nowdate = $("#monthDt").val();
|
|||
|
|
if (nowdate != null && nowdate != '') {
|
|||
|
|
|
|||
|
|
} else {
|
|||
|
|
nowdate = '${nowdate}';
|
|||
|
|
}
|
|||
|
|
$('#calendar').fullCalendar({
|
|||
|
|
header: {
|
|||
|
|
//left: 'prev',
|
|||
|
|
left: '',
|
|||
|
|
center: 'title',
|
|||
|
|
//right: 'next today'
|
|||
|
|
right: ''
|
|||
|
|
},
|
|||
|
|
//defaultDate: nowdate,
|
|||
|
|
timeFormat: 'HH:mm', //定义表格中显示的时间格式如:22:30,默认格式为HH(:mm)效果是整点的时候自动隐藏分钟,例如23:00会显示成23
|
|||
|
|
displayEventEnd: true, //显示事件的结束时间,默认是false
|
|||
|
|
aspectRatio: 1.64, //设置日历单元格显示的宽高比,数值越小越窄高
|
|||
|
|
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 = [];
|
|||
|
|
$.post(ext.contextPath + '/equipment/getEquipmentOverview_WorkPlan.do', {
|
|||
|
|
unitId:unitId,date:monthDt,equipmentClassId:equipmentClassId,processSectionId:processSectionId
|
|||
|
|
}, function (data) {
|
|||
|
|
var changeNum = -1;
|
|||
|
|
var lastPatrolPlanId = "";
|
|||
|
|
|
|||
|
|
var str = data.result;
|
|||
|
|
|
|||
|
|
//获取今天的时间
|
|||
|
|
var day1 = new Date();
|
|||
|
|
day1.setDate(day1.getDate());
|
|||
|
|
var todayformat = day1.format("yyyy-MM-dd");
|
|||
|
|
var todayStr = todayformat;
|
|||
|
|
|
|||
|
|
if(str.length>0){
|
|||
|
|
for (var i = 0; i < str.length; i++) {
|
|||
|
|
var obj = new Object();
|
|||
|
|
|
|||
|
|
var imgstr = '';
|
|||
|
|
if (str[i].doRate != null && str[i].doRate == '100') {
|
|||
|
|
imgstr = 'workrecord1';
|
|||
|
|
} else {
|
|||
|
|
imgstr = 'workrecord2';
|
|||
|
|
}
|
|||
|
|
var title = "";
|
|||
|
|
if (str[i].repair_num != null && str[i].repair_num != '0') {
|
|||
|
|
var bgcolor = "";
|
|||
|
|
if(str[i].repair_num_color == '0'){
|
|||
|
|
bgcolor = "bgcolor-grey";
|
|||
|
|
}
|
|||
|
|
if(str[i].repair_num_color == '1'){
|
|||
|
|
bgcolor = "bgcolor-red";
|
|||
|
|
}
|
|||
|
|
if(str[i].repair_num_color == '2'){
|
|||
|
|
bgcolor = "bgcolor-green";
|
|||
|
|
}
|
|||
|
|
title += '<p style="text-align:center;cursor:pointer;border-radius: 10px;" class="'+bgcolor
|
|||
|
|
+' text-primary " data-type="repair"><i class="iconfont icon-weixiu"></i>'+
|
|||
|
|
str[i].repair_num+'</p>';
|
|||
|
|
}
|
|||
|
|
if (str[i].main_num != null && str[i].main_num != '0') {
|
|||
|
|
var bgcolor = "";
|
|||
|
|
if(str[i].main_num_color == '0'){
|
|||
|
|
bgcolor = "bgcolor-grey";
|
|||
|
|
}
|
|||
|
|
if(str[i].main_num_color == '1'){
|
|||
|
|
bgcolor = "bgcolor-red";
|
|||
|
|
}
|
|||
|
|
if(str[i].main_num_color == '2'){
|
|||
|
|
bgcolor = "bgcolor-green";
|
|||
|
|
}
|
|||
|
|
title += '<p style="text-align:center;cursor:pointer;border-radius: 10px;" class="'+bgcolor
|
|||
|
|
+' text-primary " data-type="maintain" ><i class="iconfont icon-baoyang"></i>'+
|
|||
|
|
str[i].main_num+'</p>';
|
|||
|
|
}
|
|||
|
|
/* if (str[i].patrol_num != null && str[i].patrol_num != '0') {
|
|||
|
|
var bgcolor = "";
|
|||
|
|
if(str[i].patrol_num_color != '0'){
|
|||
|
|
bgcolor = "bgcolor-grey";
|
|||
|
|
}
|
|||
|
|
if(str[i].patrol_num_color != '1'){
|
|||
|
|
bgcolor = "bgcolor-red";
|
|||
|
|
}
|
|||
|
|
if(str[i].patrol_num_color != '2'){
|
|||
|
|
bgcolor = "bgcolor-green";
|
|||
|
|
}
|
|||
|
|
title += '<p style="text-align:center;cursor:pointer;border-radius: 10px;" class="'+bgcolor+' text-primary "><i class="iconfont icon-xunjian"></i>'+str[i].patrol_num+'</p>';
|
|||
|
|
} */
|
|||
|
|
obj.title = title;
|
|||
|
|
if (str[i].sdt == todayStr) {
|
|||
|
|
obj.color = '#FCF8E3';
|
|||
|
|
} else {
|
|||
|
|
obj.color = '#FFFFFF';
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
obj.start = str[i].sdt;
|
|||
|
|
events.push(obj);
|
|||
|
|
}
|
|||
|
|
}else{
|
|||
|
|
var obj = new Object();
|
|||
|
|
/* obj.start = nowdate;
|
|||
|
|
obj.title = '<p style="text-align:center;cursor:pointer;border-radius: 10px;" class="bgcolor-green text-primary "><i class="iconfont icon-xunjian"></i> 0</p>'+
|
|||
|
|
'<p style="text-align:center;cursor:pointer;border-radius: 10px;" class="bgcolor-grey text-primary" data-type="maintain"><i class="iconfont icon-weixiu"></i> 0</p>'+
|
|||
|
|
'<p style="text-align:center;cursor:pointer;border-radius: 10px;" class="bgcolor-red text-primary" data-type="repair"><i class="iconfont icon-baoyang"></i> 0</p>';
|
|||
|
|
events.push(obj); */
|
|||
|
|
}
|
|||
|
|
callback(events);
|
|||
|
|
}, 'json'); //把从后台取出的数据进行封装以后在页面上以fullCalendar的方式进行显示
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
eventClick: function (event, jsEvent, view) {
|
|||
|
|
calendarDt= moment(event.start).format('YYYY-MM-DD');
|
|||
|
|
tableType3(unitId, '0', calendarDt);
|
|||
|
|
},
|
|||
|
|
dayClick: function (date, jsEvent, view) {
|
|||
|
|
//点击空白日期调用
|
|||
|
|
},
|
|||
|
|
eventRender: function (event, element) {//title以HTML显示(换行)
|
|||
|
|
//element.html(moment(event.start).format('MM-DD')+'~'+moment(event.end).format('MM-DD')+' '+event.title);
|
|||
|
|
element.html(event.title);
|
|||
|
|
},
|
|||
|
|
eventMouseover: function (event, element, view) {//鼠标在日程区块上时触发
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
$('#calendar').fullCalendar( 'gotoDate', nowdate )
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
*对Date的扩展,将 Date 转化为指定格式的String
|
|||
|
|
*月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
|
|||
|
|
*年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
|
|||
|
|
*例子:
|
|||
|
|
*(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
|
|||
|
|
*(new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
|
|||
|
|
*/
|
|||
|
|
Date.prototype.format = function (fmt) {
|
|||
|
|
var o = {
|
|||
|
|
"M+": this.getMonth() + 1, //月份
|
|||
|
|
"d+": this.getDate(), //日
|
|||
|
|
"h+": this.getHours(), //小时
|
|||
|
|
"m+": this.getMinutes(), //分
|
|||
|
|
"s+": this.getSeconds(), //秒
|
|||
|
|
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|||
|
|
"S": this.getMilliseconds() //毫秒
|
|||
|
|
};
|
|||
|
|
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|||
|
|
for (var k in o)
|
|||
|
|
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|||
|
|
return fmt;
|
|||
|
|
}
|
|||
|
|
function tableType3(bizid, dateType, selectDate) {
|
|||
|
|
var heightstr = height* 0.37;
|
|||
|
|
|
|||
|
|
$('#table2').bootstrapTable('destroy');
|
|||
|
|
var tableData = getTableData();
|
|||
|
|
if(tableData!=null && tableData.length>0){
|
|||
|
|
$("#table2").bootstrapTable({ // 对应table标签的id
|
|||
|
|
data: tableData,
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [5,10,20,30], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 10, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
height: heightstr,
|
|||
|
|
sidePagination: 'client', // 设置为服务器端分页
|
|||
|
|
/* queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order
|
|||
|
|
}
|
|||
|
|
}, */
|
|||
|
|
onClickRow: function (row) {//单击行事件,执行查看功能
|
|||
|
|
viewFun(row.id,row.type);
|
|||
|
|
},
|
|||
|
|
/* responseHandler: function(res){//数据预处理
|
|||
|
|
var result = res.result;
|
|||
|
|
var total = 0;
|
|||
|
|
var rows = [];
|
|||
|
|
if(result!=null && result.length>0){
|
|||
|
|
total = result.length;
|
|||
|
|
rows = result;
|
|||
|
|
}
|
|||
|
|
console.log(total);
|
|||
|
|
console.log(rows);
|
|||
|
|
return {
|
|||
|
|
"total":total,
|
|||
|
|
"rows": rows,
|
|||
|
|
}
|
|||
|
|
}, */
|
|||
|
|
sortName: 'time', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
|
|||
|
|
//导出配置,使用需要单独引用js
|
|||
|
|
//是否显示导出按钮
|
|||
|
|
showExport: false,
|
|||
|
|
//导出表格方式(默认basic:只导出当前页的表格数据;all:导出所有数据;selected:导出选中的数据)
|
|||
|
|
exportDataType: "all",
|
|||
|
|
//导出文件类型
|
|||
|
|
exportTypes: ['excel'],
|
|||
|
|
exportOptions: {
|
|||
|
|
worksheetName: '工单列表', //表格工作区名称
|
|||
|
|
fileName: '工单列表'
|
|||
|
|
},
|
|||
|
|
//end
|
|||
|
|
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'type', // 返回json数据中的name
|
|||
|
|
title: '任务类型', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
switch (value) {
|
|||
|
|
case 'repair' :
|
|||
|
|
return '设备维修';
|
|||
|
|
break;
|
|||
|
|
case 'maintain' :
|
|||
|
|
return "设备保养";
|
|||
|
|
break;
|
|||
|
|
case 'patrol' :
|
|||
|
|
return "设备巡检";
|
|||
|
|
break;
|
|||
|
|
default :
|
|||
|
|
return "维修保养";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'userName', // 返回json数据中的name
|
|||
|
|
title: '责任人', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'time', // 返回json数据中的name
|
|||
|
|
title: '时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
, {
|
|||
|
|
field: 'content', // 返回json数据中的name
|
|||
|
|
title: '内容', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width:'35%',
|
|||
|
|
}
|
|||
|
|
, {
|
|||
|
|
field: 'status', // 返回json数据中的name
|
|||
|
|
title: '状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function () { //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table2");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
}else{
|
|||
|
|
$("#table2").empty();
|
|||
|
|
heightstr = height* 0.335;
|
|||
|
|
$("#table2").html('<tr><td class="text-center"> <img src="<%=request.getContextPath()%>/IMG/equipment/tableNoData.jpg" style="height:'+heightstr+'px;"></td></tr>');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
function getTableData(){
|
|||
|
|
var data = [];
|
|||
|
|
$.ajax({url:ext.contextPath + '/equipment/getEquipmentOverview_WorkList.do',
|
|||
|
|
async:false,dataType:"json",
|
|||
|
|
data: {unitId:unitId,date:calendarDt,equipmentClassId:equipmentClassId,processSectionId:processSectionId,type:tableType},
|
|||
|
|
success:function(result){
|
|||
|
|
data = result.result;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
console.log(data);
|
|||
|
|
return data;
|
|||
|
|
}
|
|||
|
|
function echartsbars(id,data_xAxis,data_series,data_legend,color){
|
|||
|
|
var lifeChart = echarts.getInstanceByDom(document.getElementById(id));
|
|||
|
|
//有的话就获取已有echarts实例的DOM节点。
|
|||
|
|
if (lifeChart != null) { // 如果存在,就进行销毁。
|
|||
|
|
lifeChart.dispose();
|
|||
|
|
}
|
|||
|
|
var option = {
|
|||
|
|
color:color,
|
|||
|
|
grid: {
|
|||
|
|
top: '20%',
|
|||
|
|
bottom: '10%',
|
|||
|
|
left: '5%',
|
|||
|
|
right: '5%'
|
|||
|
|
},
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'axis',
|
|||
|
|
axisPointer: {
|
|||
|
|
type: 'shadow'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
legend: {
|
|||
|
|
x:'right',
|
|||
|
|
data: data_legend
|
|||
|
|
},
|
|||
|
|
xAxis: [
|
|||
|
|
{
|
|||
|
|
type: 'category',
|
|||
|
|
axisTick: { show: false },
|
|||
|
|
data: data_xAxis,
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
yAxis: [
|
|||
|
|
{
|
|||
|
|
type: 'value'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
series: data_series
|
|||
|
|
};
|
|||
|
|
lifeChart = echarts.init(document.getElementById(id));
|
|||
|
|
lifeChart.setOption(option,true);
|
|||
|
|
}
|
|||
|
|
function echartspie(id,data_series,color){
|
|||
|
|
var lifeChart = echarts.getInstanceByDom(document.getElementById(id));
|
|||
|
|
//有的话就获取已有echarts实例的DOM节点。
|
|||
|
|
if (lifeChart != null) { // 如果存在,就进行销毁。
|
|||
|
|
lifeChart.dispose();
|
|||
|
|
}
|
|||
|
|
var option = {
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'item'
|
|||
|
|
},
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
name: '异常上报数',
|
|||
|
|
type: 'pie',
|
|||
|
|
radius: ['60%', '95%'],
|
|||
|
|
avoidLabelOverlap: false,
|
|||
|
|
label: {
|
|||
|
|
position: 'inner',
|
|||
|
|
fontSize: 14
|
|||
|
|
},
|
|||
|
|
emphasis: {
|
|||
|
|
label: {
|
|||
|
|
show: true,
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
data: data_series
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
};
|
|||
|
|
lifeChart = echarts.init(document.getElementById(id));
|
|||
|
|
lifeChart.setOption(option,true);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var viewFun = function (id,type) {
|
|||
|
|
stopBubbleDefaultEvent();
|
|||
|
|
if(type == 'repair'){
|
|||
|
|
$.post(ext.contextPath + '/workorder/workorderDetail/doViewRepair.do', {id: id}, function (data) {
|
|||
|
|
$("#subDiv").html(data);
|
|||
|
|
openModal('subModal');
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
if(type == 'maintain'){
|
|||
|
|
$.post(ext.contextPath + '/workorder/workorderDetail/doViewMaintain.do', {id: id}, function (data) {
|
|||
|
|
$("#subDiv").html(data);
|
|||
|
|
openModal('subModal');
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
function jump4url(id,name,url){
|
|||
|
|
parent.delTab(id);
|
|||
|
|
url = url+"?monthDt="+$("#monthDt").val();
|
|||
|
|
parent.addTab(id,name,url);
|
|||
|
|
};
|
|||
|
|
</script>
|
|||
|
|
</body>
|
|||
|
|
</html>
|