706 lines
36 KiB
Plaintext
706 lines
36 KiB
Plaintext
<%@ 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" %>
|
||
<%@page import="com.sipai.entity.scada.ProAlarm" %>
|
||
<%request.setAttribute("STATUS_ALARM", ProAlarm.STATUS_ALARM); %>
|
||
<%request.setAttribute("STATUS_ALARM_CONFIRM", ProAlarm.STATUS_ALARM_CONFIRM); %>
|
||
<%request.setAttribute("STATUS_ALARM_RECOVER", ProAlarm.STATUS_ALARM_RECOVER); %>
|
||
|
||
<!DOCTYPE html>
|
||
<!-- <html lang="zh-CN"> -->
|
||
<!-- BEGIN HEAD -->
|
||
<head>
|
||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||
</title>
|
||
|
||
<!-- 引用页头及CSS页-->
|
||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
|
||
<!-- 文件上传-->
|
||
<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>
|
||
<%--文件上传 minio--%>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.js" charset="utf-8"></script>
|
||
<!-- bootstrap switch -->
|
||
<link rel="stylesheet"
|
||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||
charset="utf-8"></script>
|
||
|
||
<%--文件上传 minio--%>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.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>
|
||
|
||
<style type="text/css">
|
||
/*.main-header {
|
||
display: none;
|
||
}
|
||
|
||
.content-header {
|
||
display: none;
|
||
}
|
||
|
||
.main-footer {
|
||
display: none;
|
||
}
|
||
|
||
.select2-container .select2-selection--single {
|
||
height: 34px;
|
||
line-height: 34px;
|
||
}
|
||
|
||
.select2-selection__arrow {
|
||
margin-top: 3px;
|
||
}*/
|
||
|
||
.my-skin .layui-layer-btn1 {
|
||
border-color: #04B431 !important;
|
||
background-color: #04B431 !important;;
|
||
color: #fff !important;;
|
||
}
|
||
|
||
.my-skin .layui-layer-btn2 {
|
||
border-color: #5E610B !important;
|
||
background-color: #5E610B !important;;
|
||
color: #fff !important;;
|
||
}
|
||
|
||
|
||
</style>
|
||
<script type="text/javascript">
|
||
var dosearch = function () {
|
||
$("#table").bootstrapTable('refresh');
|
||
};
|
||
$(function () {
|
||
// var flag = IsApp();
|
||
// if (flag==true){
|
||
|
||
// }else{
|
||
// $(".main-header").show();
|
||
// $(".content-header").show();
|
||
// $(".main-footer").show();
|
||
// }
|
||
initDate();
|
||
|
||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: unitId}, function (data) {
|
||
$("#processSection").empty();
|
||
var selelct_ = $("#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;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
selelct_.val('').trigger("change");
|
||
selelct_.on("change", function (e) {
|
||
$("#table").bootstrapTable('refresh');
|
||
});
|
||
}, 'json');
|
||
|
||
var selelct_2Data = jQuery.parseJSON('${AlarmMoldCodeEnum}');
|
||
var selelct_2 = $("#alarmType").select2({
|
||
data: selelct_2Data,
|
||
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;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
selelct_2.val('').trigger("change");
|
||
selelct_2.on("change", function (e) {
|
||
$("#table").bootstrapTable('refresh');
|
||
});
|
||
|
||
var alarmLevelsData = jQuery.parseJSON('${AlarmLevelsCodeEnum}');
|
||
var alarmLevelsSelect = $("#alarmLevels").select2({
|
||
data: alarmLevelsData,
|
||
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;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
alarmLevelsSelect.val('').trigger("change");
|
||
alarmLevelsSelect.on("change", function (e) {
|
||
$("#table").bootstrapTable('refresh');
|
||
});
|
||
|
||
var selelct_3Data = jQuery.parseJSON('[{"id":"${STATUS_ALARM}","text":"报警"},{"id":"${STATUS_ALARM_CONFIRM}","text":"报警确认"},{"id":"${STATUS_ALARM_RECOVER}","text":"报警恢复"}]');
|
||
<%--var selelct_3Data = jQuery.parseJSON('[{"id":"${STATUS_ALARM}","text":"报警"},{"id":"${STATUS_ALARM_RECOVER}","text":"报警恢复"}]');--%>
|
||
var selelct_3 = $("#status").select2({
|
||
data: selelct_3Data,
|
||
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_3.val("${STATUS_ALARM}").trigger("change");
|
||
selelct_3.on("change", function (e) {
|
||
$("#table").bootstrapTable('refresh');
|
||
});
|
||
|
||
$("#table").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/alarm/proAlarm/getlist.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [15, 30, 50], // 设置页面可以显示的数据条数
|
||
pageSize: 15, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: "client", //分页方式:client客户端分页,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(),
|
||
companyId: unitId,
|
||
pSectionCode: $("#processSection").val(),
|
||
alarmType: $("#alarmType").val(),
|
||
alarmlevel: $("#alarmLevels").val(),
|
||
status: $("#status").val(),
|
||
sdt: beginTimeStore,
|
||
edt: endTimeStore
|
||
}
|
||
},
|
||
sortName: 'alarm_time', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||
// viewFun(row.mpointcode);
|
||
// },
|
||
columns: [
|
||
{
|
||
field: 'pointCode', // 返回json数据中的name
|
||
title: '报警点', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'pointName', // 返回json数据中的name
|
||
title: '报警名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'alarmTime', // 返回json数据中的name
|
||
title: '报警时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: 140, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
return value.substring(0, 16);
|
||
}
|
||
}, {
|
||
field: 'alarmLevel', // 返回json数据中的name
|
||
title: '报警等级', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
formatter: function (value, row, index) {
|
||
for (let i = 0; i < alarmLevelsData.length; i++) {
|
||
if(alarmLevelsData[i].id=value){
|
||
return alarmLevelsData[i].text;
|
||
}
|
||
}
|
||
}
|
||
}, {
|
||
field: 'describe', // 返回json数据中的name
|
||
title: '报警内容', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'confirmerName', // 返回json数据中的name
|
||
title: '确认人', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'confirmTime', // 返回json数据中的name
|
||
title: '确认时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
width: 140, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
if (value != null) {
|
||
return value.substring(0, 16);
|
||
} else {
|
||
return "";
|
||
}
|
||
}
|
||
},
|
||
// {
|
||
// field: 'confirmContent', // 返回json数据中的name
|
||
// title: '确认内容', // 表格表头显示文字
|
||
// align: 'center', // 左右居中
|
||
// valign: 'middle', // 上下居中
|
||
// // width: 60 ,// 定义列的宽度,单位为像素px
|
||
// // formatter: function (value, row, index) {
|
||
// // return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||
// // }
|
||
// },
|
||
{
|
||
field: 'alarmTypeName', // 返回json数据中的name
|
||
title: '报警类别', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
width: 60 // 定义列的宽度,单位为像素px
|
||
}, {
|
||
field: 'status', // 返回json数据中的name
|
||
title: '报警状态', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
width: 40, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
switch (value) {
|
||
case '${STATUS_ALARM}':
|
||
return "报警";
|
||
break;
|
||
case '${STATUS_ALARM_RECOVER}':
|
||
return "报警恢复";
|
||
break;
|
||
case '${STATUS_ALARM_CONFIRM}':
|
||
return "报警确认";
|
||
break;
|
||
default:
|
||
return "-";
|
||
break;
|
||
}
|
||
|
||
}
|
||
}, {
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 180, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
// console.log(row)
|
||
var buts = "";
|
||
if (row.alarmType.indexOf('_Pro') > 0 || row.alarmType == 'Type_HYDB') {
|
||
buts += '<button class="btn btn-default btn-sm" title="历史曲线" onclick="showHis(\'' + row.pointCode + '\')"><i class="fa fa-line-chart"></i><span class="hidden-md hidden-lg"> 历史曲线</span></button>';
|
||
// buts+='<button class="btn btn-default btn-sm" title="报警确认" onclick="confirmSt(\'' + row.id + '\')"><i class="fa fa-check"></i><span class="hidden-md hidden-lg"> 报警确认</span></button>';
|
||
}
|
||
if (row.status == '${STATUS_ALARM}') {
|
||
buts += '<button class="btn btn-default btn-sm" title="报警确认" onclick="confirmFun(\'' + row.pointCode + '\',\'' + row.alarmTime + '\',\'' + row.bizId + '\')"><i class="fa fa-check"></i><span class="hidden-md hidden-lg">报警确认</span></button>';
|
||
}
|
||
if (row.cameraFileSt == 'true') {
|
||
buts += '<button class="btn btn-default btn-sm" title="报警视频" onclick="cameraViewFun(\'' + row.id + '\',\'' + row.cameraIds + '\',\'' + row.alarmTime + '\')"><i class="fa fa-video-camera"></i><span class="hidden-md hidden-lg">报警视频</span></button>';
|
||
}
|
||
if (row.pointCode == 'data_stop_alarm') {
|
||
buts += '<button class="btn btn-default btn-sm" title="中断数据" onclick="stopAlarmView(\'' + row.id + '\',\'' + row.bizId + '\')"><i class="fa fa-eye-slash"></i><span class="hidden-md hidden-lg">中断数据</span></button>';
|
||
}
|
||
if (row.alarmType == 'Type_Emergency') {
|
||
buts += '<button class="btn btn-default btn-sm" title="转为工单" onclick="toYJYAOrder(\'' + row.pointCode + '\')"><i class="fa fa-share"></i><span class="hidden-md hidden-lg"> 转为工单</span></button>';
|
||
} else {
|
||
buts += '<button class="btn btn-default btn-sm" title="转为工单" onclick="addFun4Abnormity(\'' + row.id + '\',\'' + row.bizId + '\',\'' + row.describe + '\',\'' + row.processSectionCode + '\')"><i class="fa fa-share"></i><span class="hidden-md hidden-lg"> 转为工单</span></button>';
|
||
}
|
||
buts += '<button class="btn btn-default btn-sm" title="详细数据" onclick="viewFun(\'' + row.id + '\',\'' + row.bizId + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 详细数据</span></button>';
|
||
|
||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
adjustBootstrapTableView("table");
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
|
||
})
|
||
|
||
});
|
||
|
||
function showHis(mpcode) {
|
||
$.post(ext.contextPath + '/data/showOnlyLine.do', {mpcode: mpcode}, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('curveModal');
|
||
});
|
||
}
|
||
|
||
function stopAlarmView(alarmId, unitId) {
|
||
$.post(ext.contextPath + '/alarm/proAlarmDataStopHisPoint/showList.do', {
|
||
alarmId: alarmId,
|
||
unitId: unitId
|
||
}, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('stopAlarmModal');
|
||
});
|
||
}
|
||
|
||
function viewFun(id, bizId) {
|
||
$.post(ext.contextPath + '/alarm/proAlarm/doView.do', {
|
||
id: id,
|
||
unitId: bizId
|
||
}, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subViewModal');
|
||
});
|
||
}
|
||
|
||
var viewAlarmCameraWindow = null;
|
||
|
||
function cameraViewFun(id, cameraIds, alarmTime) {
|
||
alarmTime = getPlusTime(alarmTime, "-5", "min");
|
||
alarmTime = alarmTime.substring(0, 16);
|
||
viewAlarmCameraWindow = window.open(ext.contextPath + "/work/camera/cameraIdsHisShowList.do?cameraIds=" + cameraIds + "&hisData=" + alarmTime + "&alarmId=" + id, 'nowAlarmViewCamera', 'width=1920,height=1080,top=0,left=0,toolbar=0,menubar=0,scrollbars=0,resizable=0,location=0,status=0')
|
||
viewAlarmCameraWindow.focus();
|
||
}
|
||
|
||
function toYJYAOrder(pointCode) {
|
||
window.parent.addTab("alarm_YJYAOrder", "应急预案", "/command/emergencyRecords/dodrillview.do?id=" + pointCode);
|
||
}
|
||
|
||
/*function confirmFun(pointCode, alarmTime, bizid) {
|
||
stopBubbleDefaultEvent();
|
||
swal({
|
||
text: "执行报警确认?",
|
||
dangerMode: true,
|
||
buttons: {
|
||
cancel: {
|
||
text: "取消",
|
||
value: null,
|
||
visible: true,
|
||
className: "btn btn-default btn-sm",
|
||
closeModal: true,
|
||
},
|
||
confirm: {
|
||
text: "确定",
|
||
value: true,
|
||
visible: true,
|
||
className: "btn btn-danger btn-sm",
|
||
closeModal: true
|
||
}
|
||
}
|
||
})
|
||
.then(function (willDelete) {
|
||
if (willDelete) {
|
||
$.post(ext.contextPath + '/alarm/proAlarm/alarmConfirm.do', {
|
||
pointCode: pointCode,
|
||
alarmTime: alarmTime,
|
||
bizid: bizid
|
||
}, function (data) {
|
||
console.log(data)
|
||
if (data.code == 1) {
|
||
showAlert('s', '确认成功', 'mainAlertdiv');
|
||
$("#table").bootstrapTable('refresh');
|
||
} else if (data.code == 0) {
|
||
showAlert('d', data.msg, 'mainAlertdiv');
|
||
} else {
|
||
showAlert('d', data.msg, 'mainAlertdiv');
|
||
}
|
||
}, 'json');
|
||
|
||
}
|
||
});
|
||
}*/
|
||
|
||
function confirmFun(pointCode, alarmTime, bizid) {
|
||
stopBubbleDefaultEvent();
|
||
layer.open({
|
||
title: '报警确认内容',
|
||
type: 1,
|
||
closeBtn: 0,
|
||
area: '30%',
|
||
// offset:"auto",
|
||
fixed: false,
|
||
skin: 'bgfff', //没有背景色
|
||
shadeClose: true,
|
||
// formType: 2, //输入框类型,支持0(文本)默认1(密码)2(多行文本)
|
||
// value: ' ', //初始时的值,默认空字符
|
||
// maxlength: 200, //可输入文本的最大长度,默认500
|
||
// area: ['300px', '200px'], //自定义文本域宽高
|
||
btn: ["确认", "关闭"],
|
||
content: ('<div id="confirmOpen" style="float: left;width: 100%;height: 250px;padding: 15px;"></div>'),
|
||
yes: function (index) {//layer.msg('yes'); //点击确定回调
|
||
// 只有当点击确认时才会执行这里
|
||
$.post(ext.contextPath + '/alarm/proAlarm/alarmConfirm.do', {
|
||
pointCode: pointCode,
|
||
alarmTime: alarmTime,
|
||
bizid: bizid,
|
||
confirmContent: $('#confirmContent').val()
|
||
}, function (data) {
|
||
if (data.code == 1) {
|
||
// showAlert('s', '确认成功', 'mainAlertdiv');
|
||
$("#table").bootstrapTable('refresh');
|
||
} else if (data.code == 0) {
|
||
showAlert('d', data.msg, 'mainAlertdiv');
|
||
} else {
|
||
showAlert('d', data.msg, 'mainAlertdiv');
|
||
}
|
||
}, 'json');
|
||
|
||
layer.close(index);
|
||
closeModal('subViewModal');
|
||
},
|
||
btn2: function (index) {
|
||
layer.close(index);
|
||
},
|
||
success: function () {
|
||
let html = "";
|
||
html += "<div style='float: left;width: 20%;height: 45px;line-height: 45px;text-align: center;font-weight: 700;'>确认人</div>";
|
||
html += "<div style='float: left;width: 30%;height: 45px;line-height: 45px;text-align: center;'>" + '${userName}' + "</div>";
|
||
html += "<div style='float: left;width: 20%;height: 45px;line-height: 45px;text-align: center;font-weight: 700;'>确认时间</div>";
|
||
html += "<div style='float: left;width: 30%;height: 45px;line-height: 45px;text-align: center;'>" + getNowTime().substring(0, 16) + "</div>";
|
||
|
||
html += "<div style='float: left;width: 20%;height: 45px;line-height: 175px;text-align: center;font-weight: 700;'>确认内容</div>";
|
||
html += "<div style='float: left;width: 80%;height: calc(100% - 45px);'>" +
|
||
"<textarea class='form-control' style='height: 100%;' id='confirmContent' ></textarea>" +
|
||
"</div>";
|
||
$('#confirmOpen').html(html);
|
||
|
||
}
|
||
// end: function () {
|
||
// layer.closeAll();
|
||
// }
|
||
});
|
||
}
|
||
|
||
var beginTimeStore = '';
|
||
var endTimeStore = '';
|
||
|
||
function initDate() {
|
||
//定义locale汉化插件
|
||
// beginTimeStore = moment().subtract(7, 'days').format('YYYY-MM-DD HH:mm');
|
||
beginTimeStore = moment().subtract(30, 'days').format('YYYY-MM-DD') + ' 00:00';
|
||
endTimeStore = moment().subtract(0, 'days').format('YYYY-MM-DD') + ' 23:59';
|
||
var locale = {
|
||
"format": 'YYYY-MM-DD HH:mm',
|
||
"separator": " ~ ",
|
||
"applyLabel": "确定",
|
||
"cancelLabel": "取消",
|
||
"fromLabel": "起始时间",
|
||
"toLabel": "结束时间'",
|
||
"customRangeLabel": "自定义",
|
||
"weekLabel": "W",
|
||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||
"firstDay": 1
|
||
};
|
||
$('#reservationtimeMain').daterangepicker({
|
||
"timePicker": true,
|
||
"timePicker24Hour": true,
|
||
"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));
|
||
}
|
||
});
|
||
$('#reservationtimeMain').val(beginTimeStore + locale.separator + endTimeStore);
|
||
};
|
||
|
||
/*var addFun4Abnormity = function (id, bizid, describe, processSectionCode) {
|
||
$.post(ext.contextPath + '/maintenance/abnormity/doadd_new.do', {
|
||
unitId: bizid,
|
||
abnormityDescription: describe,
|
||
processSectionCode: processSectionCode
|
||
}, function (data) {
|
||
$("#subDivAbnorm").html(data);
|
||
openModal('subModalAbnorm');
|
||
});
|
||
};*/
|
||
|
||
var addFun4Abnormity = function (id, bizid, describe, processSectionCode) {
|
||
layer.confirm('选择生成的工单', {
|
||
title: "操作提示",
|
||
btn: ['异常上报', '维修工单', '运行工单'],//可以无限个按钮
|
||
skin: "my-skin",
|
||
btn3: function (index, layero) {
|
||
//按钮【按钮三】的回调
|
||
layer.close(index)// 关闭当前弹窗
|
||
$.post(ext.contextPath + '/maintenance/addDefect.do', {bizId: unitId}, function (data) {
|
||
$("#subDivAbnorm").html(data);
|
||
openModal('subModal');
|
||
});
|
||
}
|
||
}, function (index, layero) {
|
||
//按钮【按钮一】的回调
|
||
layer.close(index)// 关闭当前弹窗
|
||
$.post(ext.contextPath + '/maintenance/abnormity/doadd_new.do', {
|
||
unitId: bizid,
|
||
abnormityDescription: describe,
|
||
processSectionCode: processSectionCode
|
||
}, function (data) {
|
||
$("#subDivAbnorm").html(data);
|
||
openModal('subModalAbnorm');
|
||
});
|
||
}, function (index, layero) {
|
||
//按钮【按钮二】的回调
|
||
layer.close(index)// 关闭当前弹窗
|
||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddRepair.do', {unitId: unitId}, function (data) {
|
||
$("#subDivAbnorm").html(data);
|
||
openModal('subModal');
|
||
});
|
||
});
|
||
};
|
||
|
||
</script>
|
||
|
||
</head>
|
||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
<div class="wrapper">
|
||
<!-- 引用top -->
|
||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||
<!-- 菜单栏 -->
|
||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||
<div class="content-wrapper">
|
||
<!-- 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="menu4SelectDiv"></div>
|
||
|
||
<%-- 异常上报页面的div--%>
|
||
<div id="subDivAbnorm"></div>
|
||
<div id="equ4SelectDiv"></div>
|
||
<div id="library4SelectDiv"></div>
|
||
<div id="problemTyp4SelectDiv"></div>
|
||
<div id="user4SelectDiv"></div>
|
||
<div id="fileInputDiv"></div>
|
||
|
||
<div>
|
||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||
<div class="form-group pull-left">
|
||
<div class="input-group input-group-sm">
|
||
<input type="text" class="form-control pull-left" id="reservationtimeMain"
|
||
style="width:230px">
|
||
</div>
|
||
<div class="input-group input-group-sm" style="width: 200px;">
|
||
<input type="text" id="search_name" name="search_name" class="form-control"
|
||
placeholder="内容">
|
||
<div class="input-group-btn">
|
||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="form-group pull-right">
|
||
<div class="input-group input-group-sm " style="width: 200px;">
|
||
<label class="col-sm-4 control-label" style="padding:0px 10px 0px 10px;line-height:30px;">工艺段</label>
|
||
<div class="col-sm-8 control-label" style="padding: 0px;">
|
||
<select class="form-control select2 " id="processSection" name="processSection"
|
||
style="width: 130px;"></select>
|
||
</div>
|
||
</div>
|
||
<div class="input-group input-group-sm " style="width: 190px;">
|
||
<label class="col-sm-5 control-label" style="padding:0px 10px 0px 10px;line-height:30px;">报警类别</label>
|
||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||
<select class="form-control select2 " id="alarmType" name="alarmType"
|
||
style="width: 110px;"></select>
|
||
</div>
|
||
</div>
|
||
<div class="input-group input-group-sm " style="width: 190px;">
|
||
<label class="col-sm-5 control-label" style="padding:0px 10px 0px 10px;line-height:30px;">报警等级</label>
|
||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||
<select class="form-control select2 " id="alarmLevels" name="alarmLevels"
|
||
style="width: 110px;"></select>
|
||
</div>
|
||
</div>
|
||
<div class="input-group input-group-sm " style="width: 190px;">
|
||
<label class="col-sm-5 control-label" style="padding:0px 10px 0px 10px;line-height:30px;">报警状态</label>
|
||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||
<select class="form-control select2 " id="status" name="status"></select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<br>
|
||
<table id="table"></table>
|
||
</div>
|
||
|
||
|
||
</section>
|
||
<!-- /.content -->
|
||
</div>
|
||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||
</div>
|
||
</body>
|
||
<!-- 引入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>
|
||
|
||
</html> |