Commit 570fb597 authored by 莫林毅's avatar 莫林毅

监控运营 -> 告警关联诊断 '详情' 跳转 页面

增加 ‘协查单’和‘变更单’ table
parent c64707e7
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -43,4 +43,13 @@ public interface XcdChangeOrderDao extends JpaSpecificationExecutor<XcdChangeOrd
//根据告警id得到变更单信息 Add by Charmy
@Query(value="select change_order_code , change_order_title , change_start_time, change_end_time from xcd_change_order_info_t cross join (select occur_time,warning_id,cast(parameter_value as number) parameter_value,province_id from gjfx_warning_info_t, dim_system_parameter_info_t where warning_id=:warningID and parameter_name='CHANGE_ORDER_SEARCH_HOURS') gjfx_warning_info_t where (change_start_time>occur_time-parameter_value/24 and change_start_time<occur_time+parameter_value/24 or change_end_time>occur_time-parameter_value/24 and change_end_time<occur_time+parameter_value/24) and gjfx_warning_info_t.province_id=xcd_change_order_info_t.province_id order by change_end_time desc",nativeQuery=true)
List<Object[]> findByWarningId(@Param("warningID")String warningID);
@Query(value = "select t.* from ccolap.XCD_CHANGE_ORDER_INFO_T t" +
" where CHANGE_START_TIME>= ?1 " +
" and CHANGE_END_TIME<= ?2 " +
"and PROVINCE_ID = ?3 "
,nativeQuery = true)
List<XcdChangeOrder> findXcdChangeOrderListByChangeStartTimeAndChangeEndTimeAndProvinceId(
Date changeStartTime,Date changeEndTime,Long provinceId);
}
......@@ -136,4 +136,7 @@ public interface XcdDetailInfoViewDao extends PagingAndSortingRepository<XcdDet
List<XcdDetailInfoView> findWorkingOrderIdDistinctByProviderIdInAndDataSourceIdInAndChannelIdInAndProvinceIdInAndWorkingOrderIdIsNullAndRelevantFailureIdIsNullOrderByEventHappenTimeDesc(List<Long> provider,List<Long> datasource,List<Long> channel,List<Long> province);
//根据协查单编号查找协查单,协查单明细展示
List <XcdDetailInfoView> findByWorkingOrderCode(String xcdCode);//加List <XcdDetailInfoView>是为了防止数据有问题,例如一个协查单编号对应几条协查单记录,但是在实际环境中一个协查单编号只对应一条记录
}
......@@ -123,5 +123,14 @@ public interface XcdWorkingOrderInfoDao extends PagingAndSortingRepository<XcdW
@Query(value = "select a.* from ccolap.XCD_WORKING_ORDER_INFO_T a ,ccolap.DIM_PROVINCE_INFO_T b " +
" where WORKING_ORDER_CODE is not null and EVENT_HAPPEN_TIME>= ?1 " +
" and BUSINESS_RECOVERY_TIME<= ?2 " +
" and a.prov_code=b.province_code " +
" and b.province_id= ?3",nativeQuery = true)
List<XcdWorkingOrderInfo> findXcdWorkingOrderInfoByEventHappenTimeAndBusinessRecoveryTimeAndProvinceId(
Date eventHappenTime,Date businessRecoveryTime,Long provinceId );
}
......@@ -31,6 +31,7 @@ import java.text.SimpleDateFormat;
import java.util.*;
import com.hp.cmsz.service.monitoroperation.AssociateDiagosisDetailService;
import sun.org.mozilla.javascript.internal.EcmaError;
import sun.rmi.transport.ObjectTable;
/**
......@@ -84,6 +85,14 @@ public class AssociateDiagosisDetailController {
@Autowired
private XcdWarningInfoViewDao xcdWarningInfoViewDao;
@Autowired
private XcdDetailInfoViewDao xcdDetailInfoViewDao;
@Autowired
private XcdChangeOrderDao xcdChangeOrderDao;
/*@Autowired
private XcdWorkingOrderInfoDao xcdWorkingOrderInfoDao;*/
@RequestMapping("")
public String lis(Map model, ServletRequest request, HttpSession session)
......@@ -151,7 +160,7 @@ public class AssociateDiagosisDetailController {
@RequestParam(value = "warningNum", defaultValue = "") String warningNum,
@RequestParam(value = "beginTime", defaultValue = "") String beginTime,
@RequestParam(value = "endTime", defaultValue = "") String endTime,
Map map) {
Map map) throws Exception {
map.put("associationId", associationId);
......@@ -177,6 +186,18 @@ public class AssociateDiagosisDetailController {
adwdl = associateDiagosisDetailService.
findDetailByBeginTimeAndEndTimeAndAssociationIdAndProvinceId(beginTime, endTime, associationIdL, provinceId);
Date eventHappenTime=strToDate(beginTime);
Date businessRecoveryTime=strToDate(endTime);
getNewDate(eventHappenTime,-2*60);
getNewDate(businessRecoveryTime,2*60);
List<XcdWorkingOrderInfo> xcdWorkingOrderInfos=xcdWorkingOrderInfoDao.
findXcdWorkingOrderInfoByEventHappenTimeAndBusinessRecoveryTimeAndProvinceId(eventHappenTime,businessRecoveryTime,provinceId);
List<XcdChangeOrder> xcdChangeOrders=xcdChangeOrderDao.
findXcdChangeOrderListByChangeStartTimeAndChangeEndTimeAndProvinceId(eventHappenTime,businessRecoveryTime,provinceId);
System.out.println("xcdChangeOrders len ="+xcdChangeOrders.size());
System.out.println("xcdWorkingOrderInfos len ="+xcdWorkingOrderInfos.size());
map.put("xcdWorkingOrderInfos",xcdWorkingOrderInfos);
map.put("xcdChangeOrders",xcdChangeOrders);
}
......@@ -348,7 +369,9 @@ public class AssociateDiagosisDetailController {
throw new Exception("日期格式不对");
}
return d;
}
public static void getNewDate(Date date,int minutes){
date.setTime(date.getTime()+minutes*60000);
}
......
......@@ -10,6 +10,8 @@
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
......@@ -26,127 +28,127 @@
<script>
//格式化日期
function Format(){
this.jsjava_class="jsjava.text.Format";
}
function DateFormat(){
this.jsjava_class="jsjava.text.DateFormat";
}
DateFormat.prototype=new Format();
DateFormat.prototype.constructor=DateFormat;
DateFormat.zh_cn_month2=["01","02","03","04","05","06","07","08","09","10","11","12"];
DateFormat.zh_cn_month3=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708",];
DateFormat.zh_cn_month4=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708",];
DateFormat.en_us_month4=["Janu","Febr","Marc","Apri","May","Juhn","July","Augu","Sept","Octo","Nove","Dece"];
DateFormat.en_us_month3=["Jan","Feb","Mar","Apr","May","Juh","Jul","Aug","Sep","Oct","Nov","Dec"];
DateFormat.en_us_month2=["01","02","03","04","05","06","07","08","09","10","11","12"];
DateFormat.zh_cn_week=["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"];
DateFormat.zh_cn_am="\u4e0b\u5348";
DateFormat.zh_cn_pm="\u4e0a\u5348";
DateFormat.language=(navigator.userLanguage==undefined?navigator.language:navigator.userLanguage).replace("-","_").toLowerCase();
DateFormat.prototype.format=function(date){
var year4=date.getFullYear();
var year2=year4.toString().substring(2);
var pattern=this.pattern;
pattern=pattern.replace(/yyyy/,year4);
pattern=pattern.replace(/yy/,year2);
var month=date.getMonth();
pattern=pattern.replace(/MMMM/,eval("DateFormat."+DateFormat.language+"_month4[month]"));
pattern=pattern.replace(/MMM/,eval("DateFormat."+DateFormat.language+"_month3[month]"));
pattern=pattern.replace(/MM/,eval("DateFormat."+DateFormat.language+"_month2[month]"));
var dayOfMonth=date.getDate();
var dayOfMonth2=dayOfMonth;
var dayOfMonthLength=dayOfMonth.toString().length;
if(dayOfMonthLength==1){
dayOfMonth2="0"+dayOfMonth;
}
pattern=pattern.replace(/dd/,dayOfMonth2);
pattern=pattern.replace(/d/,dayOfMonth);
var hours=date.getHours();
var hours2=hours;
var hoursLength=hours.toString().length;
if(hoursLength==1){
hours2="0"+hours;
}
pattern=pattern.replace(/HH/,hours2);
pattern=pattern.replace(/H/,hours);
var minutes=date.getMinutes();
var minutes2=minutes;
var minutesLength=minutes.toString().length;
if(minutesLength==1){
minutes2="0"+minutes;
}
pattern=pattern.replace(/mm/,minutes2);
pattern=pattern.replace(/m/,minutes);
var seconds=date.getSeconds();
var seconds2=seconds;
var secondsLength=seconds.toString().length;
if(secondsLength==1){
seconds2="0"+seconds;
}
pattern=pattern.replace(/ss/,seconds2);
pattern=pattern.replace(/s/,seconds);
var milliSeconds=date.getMilliseconds();
pattern=pattern.replace(/S+/,milliSeconds);
var day=date.getDay();
function Format() {
this.jsjava_class = "jsjava.text.Format";
}
function DateFormat() {
this.jsjava_class = "jsjava.text.DateFormat";
}
DateFormat.prototype = new Format();
DateFormat.prototype.constructor = DateFormat;
DateFormat.zh_cn_month2 = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
DateFormat.zh_cn_month3 = ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708", "\u4e03\u6708", "\u516b\u6708", "\u4e5d\u6708", "\u5341\u6708", "\u5341\u4e00\u6708", "\u5341\u4e8c\u6708",];
DateFormat.zh_cn_month4 = ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708", "\u4e03\u6708", "\u516b\u6708", "\u4e5d\u6708", "\u5341\u6708", "\u5341\u4e00\u6708", "\u5341\u4e8c\u6708",];
DateFormat.en_us_month4 = ["Janu", "Febr", "Marc", "Apri", "May", "Juhn", "July", "Augu", "Sept", "Octo", "Nove", "Dece"];
DateFormat.en_us_month3 = ["Jan", "Feb", "Mar", "Apr", "May", "Juh", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
DateFormat.en_us_month2 = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
DateFormat.zh_cn_week = ["\u661f\u671f\u65e5", "\u661f\u671f\u4e00", "\u661f\u671f\u4e8c", "\u661f\u671f\u4e09", "\u661f\u671f\u56db", "\u661f\u671f\u4e94", "\u661f\u671f\u516d"];
DateFormat.zh_cn_am = "\u4e0b\u5348";
DateFormat.zh_cn_pm = "\u4e0a\u5348";
DateFormat.language = (navigator.userLanguage == undefined ? navigator.language : navigator.userLanguage).replace("-", "_").toLowerCase();
DateFormat.prototype.format = function (date) {
var year4 = date.getFullYear();
var year2 = year4.toString().substring(2);
var pattern = this.pattern;
pattern = pattern.replace(/yyyy/, year4);
pattern = pattern.replace(/yy/, year2);
var month = date.getMonth();
pattern = pattern.replace(/MMMM/, eval("DateFormat." + DateFormat.language + "_month4[month]"));
pattern = pattern.replace(/MMM/, eval("DateFormat." + DateFormat.language + "_month3[month]"));
pattern = pattern.replace(/MM/, eval("DateFormat." + DateFormat.language + "_month2[month]"));
var dayOfMonth = date.getDate();
var dayOfMonth2 = dayOfMonth;
var dayOfMonthLength = dayOfMonth.toString().length;
if (dayOfMonthLength == 1) {
dayOfMonth2 = "0" + dayOfMonth;
}
pattern = pattern.replace(/dd/, dayOfMonth2);
pattern = pattern.replace(/d/, dayOfMonth);
var hours = date.getHours();
var hours2 = hours;
var hoursLength = hours.toString().length;
if (hoursLength == 1) {
hours2 = "0" + hours;
}
pattern = pattern.replace(/HH/, hours2);
pattern = pattern.replace(/H/, hours);
var minutes = date.getMinutes();
var minutes2 = minutes;
var minutesLength = minutes.toString().length;
if (minutesLength == 1) {
minutes2 = "0" + minutes;
}
pattern = pattern.replace(/mm/, minutes2);
pattern = pattern.replace(/m/, minutes);
var seconds = date.getSeconds();
var seconds2 = seconds;
var secondsLength = seconds.toString().length;
if (secondsLength == 1) {
seconds2 = "0" + seconds;
}
pattern = pattern.replace(/ss/, seconds2);
pattern = pattern.replace(/s/, seconds);
var milliSeconds = date.getMilliseconds();
pattern = pattern.replace(/S+/, milliSeconds);
var day = date.getDay();
// pattern=pattern.replace(/E+/,eval("DateFormat."+DateFormat.language+"_week[day]"));
if(hours>12){
pattern=pattern.replace(/a+/,eval("DateFormat."+DateFormat.language+"_am"));
}else{
pattern=pattern.replace(/a+/,eval("DateFormat."+DateFormat.language+"_pm"));
}
var kHours=hours;
if(kHours==0){
kHours=24;
}
var kHours2=kHours;
var kHoursLength=kHours.toString().length;
if(kHoursLength==1){
kHours2="0"+kHours;
}
pattern=pattern.replace(/kk/,kHours2);
pattern=pattern.replace(/k/,kHours);
var KHours=hours;
if(hours>11){
KHours=hours-12;
}
var KHours2=KHours;
var KHoursLength=KHours.toString().length;
if(KHoursLength==1){
KHours2="0"+KHours;
}
pattern=pattern.replace(/KK/,KHours2);
pattern=pattern.replace(/K/,KHours);
var hHours=KHours;
if(hHours==0){
hHours=12;
}
var hHours2=hHours;
var hHoursLength=hHours.toString().length;
if(KHoursLength==1){
hHours2="0"+hHours;
}
pattern=pattern.replace(/hh/,hHours2);
pattern=pattern.replace(/h/,hHours);
if (hours > 12) {
pattern = pattern.replace(/a+/, eval("DateFormat." + DateFormat.language + "_am"));
} else {
pattern = pattern.replace(/a+/, eval("DateFormat." + DateFormat.language + "_pm"));
}
var kHours = hours;
if (kHours == 0) {
kHours = 24;
}
var kHours2 = kHours;
var kHoursLength = kHours.toString().length;
if (kHoursLength == 1) {
kHours2 = "0" + kHours;
}
pattern = pattern.replace(/kk/, kHours2);
pattern = pattern.replace(/k/, kHours);
var KHours = hours;
if (hours > 11) {
KHours = hours - 12;
}
var KHours2 = KHours;
var KHoursLength = KHours.toString().length;
if (KHoursLength == 1) {
KHours2 = "0" + KHours;
}
pattern = pattern.replace(/KK/, KHours2);
pattern = pattern.replace(/K/, KHours);
var hHours = KHours;
if (hHours == 0) {
hHours = 12;
}
var hHours2 = hHours;
var hHoursLength = hHours.toString().length;
if (KHoursLength == 1) {
hHours2 = "0" + hHours;
}
pattern = pattern.replace(/hh/, hHours2);
pattern = pattern.replace(/h/, hHours);
return pattern;
};
function SimpleDateFormat(){
this.jsjava_class="jsjava.text.SimpleDateFormat";
function SimpleDateFormat() {
this.jsjava_class = "jsjava.text.SimpleDateFormat";
}
SimpleDateFormat.prototype=new DateFormat();
SimpleDateFormat.prototype.constructor=SimpleDateFormat;
SimpleDateFormat.prototype = new DateFormat();
SimpleDateFormat.prototype.constructor = SimpleDateFormat;
SimpleDateFormat.prototype.applyPattern=function(pattern){
this.pattern=pattern;
SimpleDateFormat.prototype.applyPattern = function (pattern) {
this.pattern = pattern;
};
var df=new SimpleDateFormat();
var df = new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
</script>
</head>
<body>
......@@ -196,14 +198,30 @@
<br>
<table class='table table-vertical'>
<tr>
<th style='vertical-align: middle !important;text-align: center;'>省份</th>
<th style='vertical-align: middle !important;text-align: center;'>指标名称</th>
<th style='vertical-align: middle !important;text-align: center;'>指标编码</th>
<th style='vertical-align: middle !important;text-align: center;'>类型</th>
<th style='vertical-align: middle !important;text-align: center;'>名称</th>
<th style='vertical-align: middle !important;text-align: center;'>告警个数</th>
<th style='vertical-align: middle !important;text-align: center;'>异常程度</th>
<th style='vertical-align: middle !important;text-align: center;'>指标告警明细</th>
<th style='vertical-align: middle !important;text-align: center;'>
省份
</th>
<th style='vertical-align: middle !important;text-align: center;'>
指标名称
</th>
<th style='vertical-align: middle !important;text-align: center;'>
指标编码
</th>
<th style='vertical-align: middle !important;text-align: center;'>
类型
</th>
<th style='vertical-align: middle !important;text-align: center;'>
名称
</th>
<th style='vertical-align: middle !important;text-align: center;'>
告警个数
</th>
<th style='vertical-align: middle !important;text-align: center;'>
异常程度
</th>
<th style='vertical-align: middle !important;text-align: center;'>
指标告警明细
</th>
</tr>
<c:forEach items="${warningDetailList}" var="item">
......@@ -222,14 +240,146 @@
<td style='vertical-align: middle !important;text-align: center;'>${item.ASSOCIATION_DESC}</td>
<td style='vertical-align: middle !important;text-align: center;'>${item.WARNING_NUM}</td>
<td style='vertical-align: middle !important;text-align: center;'>${item.INFLUENCE_LEVEL}</td>
<td style='vertical-align: middle !important;text-align: center;'><a
<td style='vertical-align: middle !important;text-align: center;'>
<a
<%--href="${ctx}/MonitorOperation/AssociateDiagosisDetailgetDetail?kpiId=${item.KPI_ID}&provinceId=${item.PROVINCE_ID}&beginTime=${beginTime}&endTime=${endTime}"--%>
onclick="getdetails(this)" name="${item.KPI_ID}_${item.PROVINCE_ID}_${beginTime}_${endTime}">告警明细</a></td>
onclick="getdetails(this)"
name="${item.KPI_ID}_${item.PROVINCE_ID}_${beginTime}_${endTime}">告警明细</a>
</td>
</tr>
</c:forEach>
</table>
<div class='col-xs-6'>
<div class='panel panel-default'>
<div class='panel-heading'>协查单</div>
<div class='panel-body'>
<table class='table table-hover table-striped'>
<thead>
<tr>
<th style='vertical-align: middle !important;text-align: center;'>
编号
</th>
<th style='vertical-align: middle !important;text-align: center;'>
协查单标题
</th>
<th style='vertical-align: middle !important;text-align: center;'>
开始时间
</th>
<th style='vertical-align: middle !important;text-align: center;'>
结束时间
</th>
</tr>
</thead>
<tfoot>
<tr>
<td style='vertical-align: middle !important;text-align: center;'>
<span id="itemsCount_1"></span>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<a onclick="nextPage_1()">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a onclick="prePage_1()">上一页</a>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<span id="currentPageNum_1"
style="color:#F00"></span>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<span id="totalPageNum_1"
style="color:#0000ee"></span>
</td>
</tr>
</tfoot>
<tbody id="xcdWorkingOrderInfos_tbody">
<c:if test="${xcdWorkingOrderInfos != null}">
<c:forEach items="${xcdWorkingOrderInfos}" var="item">
<tr>
<td style='vertical-align: middle !important;text-align: center;'>${item.workingOrderCode}</td>
<td style='vertical-align: middle !important;text-align: center;'>${item.workingOrderTitle}</td>
<td style='vertical-align: middle !important;text-align: center;'>
<fmt:formatDate
value="${item.eventHappenTime}"
pattern="yyyy-MM-dd hh:mm:ss"
type="date"
dateStyle="long"/>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<fmt:formatDate
value="${item.businessRecoveryTime}"
pattern="yyyy-MM-dd hh:mm:ss"
type="date"
dateStyle="long"/></td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
</div>
</div>
</div>
<div class='col-xs-6'>
<div class='panel panel-default'>
<div class='panel-heading'>变更单</div>
<div class='panel-body'>
<table class='table table-hover table-striped'>
<thead>
<tr>
<th style='vertical-align: middle !important;text-align: center;'>
编-号
</th>
<th style='vertical-align: middle !important;text-align: center;'>
变更单标题
</th>
<th style='vertical-align: middle !important;text-align: center;'>
开始时间
</th>
<th style='vertical-align: middle !important;text-align: center;'>
结束时间
</th>
</tr>
</thead>
<tfoot>
<tr>
<td style='vertical-align: middle !important;text-align: center;'>
<span id="itemsCount"></span>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<a onclick="nextPage()">下一页</a>&nbsp;&nbsp;&nbsp;
<a onclick="prePage()">上一页</a>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<span id="currentPageNum"
style="color:#F00"></span>
</td>
<td style='vertical-align: middle !important;text-align: center;'>
<span id="totalPageNum"
style="color:#0000ee"></span>
</td>
</tr>
</tfoot>
<tbody id="xcdChangeOrdersTable_tobody"
style="height: 450px">
<c:forEach items="${xcdChangeOrders}" var="item">
<tr>
<td style='vertical-align: middle !important;text-align: center;'>${item.changeOrderCode}</td>
<td style='vertical-align: middle !important;text-align: center;'>${item.changeOrderTitle}</td>
<td style='vertical-align: middle !important;text-align: center;'>
<fmt:formatDate value="${item.changeStartTime}"
pattern="yyyy-MM-dd hh:mm:ss"
type="date"
dateStyle="long"/></td>
<td style='vertical-align: middle !important;text-align: center;'>
<fmt:formatDate value="${item.changeEndTime}"
pattern="yyyy-MM-dd hh:mm:ss"
type="date"
dateStyle="long"/></td>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -240,30 +390,28 @@
</div>
<form action="#" method="get" id="listForm"></form>
<input type="hidden" id="gzfxDetail" name="gzfxDetail" value='${gzfxDetailInfos}' />
<input type="hidden" id="gzfxDetail" name="gzfxDetail" value='${gzfxDetailInfos}'/>
<%-- <input type="hidden" id="listDimKpi" name="listDimKpi" value='${listDimKpi}' />--%><%-- 所有指标--%>
<input type="hidden" id="provinceAll" name="provinceAll" value='${provinces}' />
<input type="hidden" id="indicatorsAll" name="indicatorsAll" value='${indicatorsAll}' />
<input type="hidden" id="anaInfoSelected" name="anaInfoSelected" value='' />
<input type="hidden" id="provinceAll" name="provinceAll" value='${provinces}'/>
<input type="hidden" id="indicatorsAll" name="indicatorsAll" value='${indicatorsAll}'/>
<input type="hidden" id="anaInfoSelected" name="anaInfoSelected" value=''/>
</div>
</div>
</div>
</div>
<script>
function getdetails(e) {
function getdetails(e){
// alert($(e).name);
var params=e.name.split("_");
var kpiId=params[0];
var proviceId=params[1];
var beginTime=params[2];
var endTime=params[3];
var params = e.name.split("_");
var kpiId = params[0];
var proviceId = params[1];
var beginTime = params[2];
var endTime = params[3];
$.dialog({
title:"",
content:"<div id='paramList' class='container' >"+
title: "",
content: "<div id='paramList' class='container' >" +
"<div class='col-xs-12'><div class='panel panel-default'><div class='panel-heading' >指标告警明细</div><div class='panel-body'> <table class='table table-striped table-bordered '> <thead> <tr align='center'> " +
"<th style='vertical-align: middle !important;text-align: center;'>编号</th>" +
"<th style='vertical-align: middle !important;text-align: center;'>省份</th> " +
......@@ -280,87 +428,114 @@
"<th style='vertical-align: middle !important;text-align: center;' >故障单号</th>" +
"<th style='vertical-align: middle !important;text-align: center;' >告警状态</th>" +
"<th style='vertical-align: middle !important;text-align: center;' >关闭类型</th>" +
"</tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"+
"</tr> </thead> <tbody> </tbody> </table> </div> </div> </div>" +
"</div>",
lock:true,
width:"1200px",
height : "600px",
initialize:function(){
lock: true,
width: "1200px",
height: "600px",
initialize: function () {
var paramTbody = $('#paramList tbody');
$.ajax({
type : 'GET',
async : false,
contentType : 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisDetail/getDetail?kpiId="+kpiId+"&provinceId="+proviceId+"&beginTime="+beginTime+"&endTime="+endTime,
dataType : 'text',
success: function(data){
var jsonDa=eval('('+data+')');
// console.log("data "+data);
$.each(jsonDa,function(n,val){
// alert(df.format(val.closeTime));
console.log(" val.closeTime "+val.closeTime);
console.log(" df.format(new Date(val.closeTime)) "+df.format(new Date(val.closeTime)));
console.log(" new Date(val.closeTime)) "+new Date(val.closeTime));
var warningId=val.warningId;
if(typeof warningId === 'undefined'){warningId=''}
var provinceName=val.provinceName;
if(typeof provinceName ==='undefined'){provinceName=''}
var channelName=val.channelName;
if(typeof channelName ==='undefined'){channelName=''}
var dataSourceName=val.dataSourceName;
if(typeof dataSourceName ==='undefined'){dataSourceName=''}
var warningSourceName=val.warningSourceName;
if(typeof warningSourceName ==='undefined'){warningSourceName=''}
var kpiName=val.dataSourceName;
if(typeof kpiName ==='undefined'){kpiName=''}
var riskEarlyWarningTypeName=val.riskEarlyWarningTypeName;
if(typeof riskEarlyWarningTypeName ==='undefined'){riskEarlyWarningTypeName=''}
var occurTime=val.occurTime;
if(typeof occurTime ==='undefined'){occurTime=''}else{ occurTime=df.format(new Date(val.occurTime));}
var influenceEndTime=val.influenceEndTime;
if(typeof influenceEndTime ==='undefined'){influenceEndTime=''}
var closeTime=val.closeTime;
if(typeof closeTime ==='undefined'){closeTime=''}else{closeTime=df.format(new Date(val.closeTime));}
var dataSourceName=val.dataSourceName;
if(typeof dataSourceName ==='undefined'){dataSourceName=''}
var relevantWorkingOrderId= val.relevantWorkingOrderId;
if(typeof relevantWorkingOrderId === 'undefined' ){relevantWorkingOrderId=''}
var relevantFailureId=val.relevantFailureId;
if( typeof relevantFailureId === 'undefined' ){relevantFailureId=''}
var type=val.type;
if( typeof type === 'undefined' ){type=''}
var status=val.status;
if( typeof status === 'undefined' ){status=''}
type: 'GET',
async: false,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisDetail/getDetail?kpiId=" + kpiId + "&provinceId=" + proviceId + "&beginTime=" + beginTime + "&endTime=" + endTime,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
paramTbody.append($("<tr align='center' ></tr>")
.append("<td style='vertical-align: middle !important;text-align: center;' ><a>"+warningId+"</a></td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+provinceName+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+channelName+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+dataSourceName+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+warningSourceName+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+kpiName+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+riskEarlyWarningTypeName+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+occurTime+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+influenceEndTime+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+closeTime+"</td>")
$.each(jsonDa, function (n, val) {
var warningId = val.warningId;
if (typeof warningId === 'undefined') {
warningId = ''
}
var provinceName = val.provinceName;
if (typeof provinceName === 'undefined') {
provinceName = ''
}
var channelName = val.channelName;
if (typeof channelName === 'undefined') {
channelName = ''
}
var dataSourceName = val.dataSourceName;
if (typeof dataSourceName === 'undefined') {
dataSourceName = ''
}
var warningSourceName = val.warningSourceName;
if (typeof warningSourceName === 'undefined') {
warningSourceName = ''
}
var kpiName = val.dataSourceName;
if (typeof kpiName === 'undefined') {
kpiName = ''
}
var riskEarlyWarningTypeName = val.riskEarlyWarningTypeName;
if (typeof riskEarlyWarningTypeName === 'undefined') {
riskEarlyWarningTypeName = ''
}
var occurTime = val.occurTime;
if (typeof occurTime === 'undefined') {
occurTime = ''
} else {
occurTime = df.format(new Date(val.occurTime));
}
var influenceEndTime = val.influenceEndTime;
if (typeof influenceEndTime === 'undefined') {
influenceEndTime = ''
}
var closeTime = val.closeTime;
if (typeof closeTime === 'undefined') {
closeTime = ''
} else {
closeTime = df.format(new Date(val.closeTime));
}
.append("<td style='vertical-align: middle !important;text-align: center;' >"+relevantWorkingOrderId+"</td>")
var dataSourceName = val.dataSourceName;
if (typeof dataSourceName === 'undefined') {
dataSourceName = ''
}
.append("<td style='vertical-align: middle !important;text-align: center;' >"+relevantFailureId+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+type+"</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >"+status+"</td>")
var relevantWorkingOrderId = val.relevantWorkingOrderId;
if (typeof relevantWorkingOrderId === 'undefined') {
relevantWorkingOrderId = ''
}
var relevantFailureId = val.relevantFailureId;
if (typeof relevantFailureId === 'undefined') {
relevantFailureId = ''
}
var type = val.type;
if (typeof type === 'undefined') {
type = ''
}
var status = val.status;
if (typeof status === 'undefined') {
status = ''
}
paramTbody.append($("<tr align='center' ></tr>")
.append("<td style='vertical-align: middle !important;text-align: center;' ><a>" + warningId + "</a></td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + provinceName + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + channelName + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + dataSourceName + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + warningSourceName + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + kpiName + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + riskEarlyWarningTypeName + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + occurTime + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + influenceEndTime + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + closeTime + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + relevantWorkingOrderId + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + relevantFailureId + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + type + "</td>")
.append("<td style='vertical-align: middle !important;text-align: center;' >" + status + "</td>")
);
});
//关闭类型 status
......@@ -376,7 +551,190 @@
});
}
</script>
<script>
currentPageNum = 0;//[变更单]当前页
pageCount = 10;//[变更单]table显示条数
pageNum = 0;//[变更单]总页数
itemsCount = 0;//[变更单]总数据量
currentPageNum_1 = 0;//[协查单]当前页
pageCount_1 = 10;//[协查单]table显示条数
pageNum_1 = 0;//[协查单]总页数
itemsCount_1 = 0;//[协查单]总数据量
window.onload = function () {
//变更单
itemsCount = $("#xcdChangeOrdersTable_tobody").find("tr").length;//总数据量
pageNum = getPageNum(itemsCount, pageCount);
$("#itemsCount").html(itemsCount);//显示总数据量
showTotalPageNum();
showFirstPage();
//协查单
itemsCount_1 = $("#xcdWorkingOrderInfos_tbody").find("tr").length;//总数据量
pageNum_1 = getPageNum(itemsCount_1, pageCount_1);
$("#itemsCount_1").html(itemsCount_1);//显示总数据量
showTotalPageNum_1();//显示 总页数
showFirstPage_1();// 显示 第一页 数据
};
function getPageNum(itemsCount, pageCount) {
var pageNum = parseInt(itemsCount / pageCount);
if (0 != itemsCount % pageCount) {
pageNum += 1;
}
return pageNum;
}
function showFirstPage() {
hideRow();
currentPageNum = 1;
showCurrentPageNum(currentPageNum);
for (var i = 1; i <= pageCount; i++) {
var k = i - 1;
$("#xcdChangeOrdersTable_tobody tr:eq(" + k + ")").show();
}
}
//隐藏所有行
function hideRow() {
$("#xcdChangeOrdersTable_tobody").find("tr").each(function () {
this.style.display = 'none';
});
}
//显示当前页数
function showCurrentPageNum(currentPageNum) {
$("#currentPageNum").html(currentPageNum);
}
//显示总页数
function showTotalPageNum() {
$("#totalPageNum").html(pageNum);
}
//显示上一页
function prePage() {
if (currentPageNum === 1) {
return;
}
hideRow();
currentPageNum--;
showCurrentPageNum(currentPageNum);
var firstRow = getFirstRow(currentPageNum);
var lastRow = getLastRow(firstRow);
for (var i = firstRow; i <= lastRow; i++) {
var k = i - 1;
$("#xcdChangeOrdersTable_tobody tr:eq(" + k + ")").show();
}
}
//显示 下一页
function nextPage() {
if (currentPageNum === pageNum) {
return;
}
hideRow();
currentPageNum++;
showCurrentPageNum(currentPageNum);
var firstRow = getFirstRow(currentPageNum);
var lastRow = getLastRow(firstRow);
for (var i = firstRow; i <= lastRow; i++) {
var k = i - 1;
$("#xcdChangeOrdersTable_tobody tr:eq(" + k + ")").show();
}
}
//获取首行的实际位置
function getFirstRow(currentPageNum) {
return (currentPageNum - 1) * pageCount + 1;
}
//获取尾行的实际位置
function getLastRow(firstRow) {
var lastRow = firstRow + pageCount - 1;
if (lastRow > itemsCount) {
lastRow = itemsCount;
}
return lastRow;
}
//协查单 函数
function showTotalPageNum_1() {
$("#totalPageNum_1").html(pageNum_1);
}
function showFirstPage_1() {
hideRow_1();
currentPageNum_1 = 1;
showCurrentPageNum_1(currentPageNum_1);
for (var i = 1; i <= pageCount_1; i++) {
var k = i - 1;
$("#xcdWorkingOrderInfos_tbody tr:eq(" + k + ")").show();
}
}
function hideRow_1() {
$("#xcdWorkingOrderInfos_tbody").find("tr").each(function () {
this.style.display = 'none';
});
}
function showCurrentPageNum_1(currentPageNum_1) {
$("#currentPageNum_1").html(currentPageNum_1);
}
function nextPage_1() {
if (currentPageNum_1 === pageNum_1) {
return;
}
hideRow_1();
currentPageNum_1++;
showCurrentPageNum_1(currentPageNum_1);
var firstRow = getFirstRow_1(currentPageNum_1);
var lastRow = getLastRow_1(firstRow);
for (var i = firstRow; i <= lastRow; i++) {
var k = i - 1;
$("#xcdWorkingOrderInfos_tbody tr:eq(" + k + ")").show();
}
}
function prePage_1() {
if (currentPageNum_1 === 1) {
return;
}
hideRow_1();
currentPageNum_1--;
showCurrentPageNum_1(currentPageNum_1);
var firstRow = getFirstRow_1(currentPageNum_1);
var lastRow = getLastRow_1(firstRow);
for (var i = firstRow; i <= lastRow; i++) {
var k = i - 1;
$("#xcdWorkingOrderInfos_tbody tr:eq(" + k + ")").show();
}
}
function getFirstRow_1(currentPageNum_1) {
return (currentPageNum_1 - 1) * pageCount_1 + 1;
}
function getLastRow_1(firstRow) {
var lastRow = firstRow + pageCount_1 - 1;
if (lastRow > itemsCount_1) {
lastRow = itemsCount_1;
}
return lastRow;
}
</script>
</body>
......
......@@ -242,6 +242,7 @@ th{
dataType : 'text',
beforeSend: function(data) {},
success: function(data) {
$("#wadt").val(data);
warnAnalysisDetailTable();
toggleMenu('slidePushMenus2');//隐藏筛选项
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment