AssociateDiagosisDetail.jsp 17.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<%--
  Created by IntelliJ IDEA.
  User: molinyi
  Date: 2017/11/21 0021
  Time: 下午 2:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ 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" %>
莫林毅's avatar
莫林毅 committed
13

14 15 16 17 18 19 20 21 22 23 24 25
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>全网监控智能分析平台</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <script src="${ctx}/static/artDialog4.1.7/artDialog.source.js?skin=default"></script>
    <script src="${ctx}/static/artDialog4.1.7/plugins/iframeTools.source.js"></script>
胡斌's avatar
胡斌 committed
26

莫林毅's avatar
莫林毅 committed
27

28 29
    <script type="text/javascript">
        $(document).ready(function(){
莫林毅's avatar
莫林毅 committed
30
            initDate();
31 32
            //初始化界面
            initTable();
莫林毅's avatar
莫林毅 committed
33 34
            var v=document.getElementById('gzfxDetail').value;
            console.log("v    "+v);
35
        });
胡斌's avatar
胡斌 committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
        function goClick(e,id){
            var beginTime="";
            var endTime="";
            var provinceName="";
            var associationType="";
            var associationDesc="";
            var warningNum="";

            $(e).parent().prevAll().each(function(ind,dom){
                if(ind == 2){warningNum=$(dom).text()}
                if(ind == 3){associationDesc=$(dom).text()}
                if(ind == 4){associationType=$(dom).text()}
                if(ind == 5){provinceName=$(dom).text()}
                if(ind == 0){endTime=$(dom).text()}
                if(ind == 1){beginTime=$(dom).text()}
            });
52

胡斌's avatar
胡斌 committed
53 54 55 56 57 58 59 60 61 62 63 64
            window.location.href = "${ctx}/MonitorOperation/AssociateDiagosisDetail/details?"+
                "associationId="+id+
                "&provinceName="+provinceName+
                "&associationType="+associationType+
                "&associationDesc="+associationDesc+
                "&warningNum="+warningNum+
                "&beginTime="+beginTime+
                "&endTime="+endTime;

        }
    </script>
    <script type="text/javascript" src="${ctx}/static/js/associatediagosisdetail.js"></script>
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
</head>
<body>


<div>
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="${ctx}/index">首页</a></li>
            <li>监控运营</li>
            <li class="active">告警关联诊断</li>
        </ol>
    </div>
</div>


<div id="main-container main-tab-container">
    <div id="content" class="container">
        <div class="tab-bar-bt">
            <ul class="nav nav-tabs">
                <li><a id="a_statistics" href="${ctx}/MonitorOperation/AssociateDiagosisConfiguration">关联诊断配置</a></li>
                <li class="active"><a id="a_detail" href="#detail" data-toggle="tab">关联诊断明细</a></li>
            </ul>
        </div>

        <div class="section">

            <div class="tab-content">
                <div class="tab-pane fade in active" id="detail">

                    <div class="row me-row">
                        <div id="slidePushMenus2" class="cbp-spmenu-push">

                            <div class="slideMenu" id="cbp-spmenu-s2" style="">
                                <div class="form">
99
                                    <tags:GZFX__Dimension_Province_detail_associateDiagosisDetail/>
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
                                    <button class="btn btn-primary" onclick="detailSubmit()">提交</button>
                                    <button class="btn btn-warning" onclick="detailReset()">重置</button>

                                </div>
                            </div>

                            <div class="main col-xs-12">
                                <!-- <table id="mainm2" class="mainm" onclick="hideMenu('showLeftPush2','slidePushMenus2')"></table> -->
                                <div id="mainm2" class="mainm"></div>
                                <div class="content clearfix">
                                    <div class="block clearfix">
                                        <button id="showLeftPush2" class="menu-trigger btn btn-default"
                                                onclick="toggleMenu('slidePushMenus2')">
                                            <span class="glyphicon glyphicon-list"></span>
                                        </button>
                                        <div class="slide-menu-tags">
116
                                            <span id="detailPeriodTag" class="label label-info" data-placement="bottom">最近一个月</span>
117 118

                                            <span id="detailTimeTag" class="label label-info"
119
                                                  data-placement="bottom"></span>
120
                                            <span id="detailDimensionTag" class="label label-info"
121 122 123
                                                  data-placement="bottom"></span>
                                            <span id="detailProvinceTag" class="label label-info"
                                                  data-placement="bottom"></span>
124

125 126
                                        </div>
                                        <div class="bt-list-import">
127
                                            <%--<a href="#" id="gzfxDetailUpload" class="">
128 129
                                                <span class="glyphicon glyphicon-import"></span>
                                                <span class="glyphicon-class">导出Excel</span>
130
                                            </a>--%>
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-xs-12">
                                            <div class="table-header">
                                                关联诊断结果查询
                                            </div>
                                            <!--写故障明细列表处-->
                                            <table class="table table-hover table-striped"
                                                   id="failureAnalysisDetailTable">
                                            </table>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>
                <form action="#" method="get" id="listForm"></form>
莫林毅's avatar
莫林毅 committed
153
                <input type="hidden" id="gzfxDetail" name="gzfxDetail" value='${diagosisDetails}' />
154 155 156
            </div>
        </div>
    </div>
157

158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
</div>

<script type="text/javascript">
    //判断是否重置了
    var judge = true ;
    //onloading 确认标签
    var failureId = "${failureId}";
    var driProvinceId = "${driProvinceId}";
    var driProviderId = "${driProviderId}";
    var driDateVal = "${driDateVal}";
    if(failureId!=""){
        $("#detailPeriodTag").empty();
        $("#detailFailureIdTag").text("故障ID:"+failureId);
    }
    if(driProvinceId!=""){
        $("#detailProvinceTag").text("省份").append($("<span class='badge'></span>").text("1")).attr('data-original-title',$(".provinceDetail[value="+driProvinceId+"]").attr("title")).tooltip();
    }


    //条件筛选后的标签改变
    if("${filterDataSource}"!="" && "${filterBusiness}"!="" && "${filterChannel}"!="" && "${filterProvince}"!="" && "${filterProvider}"!=""){
        var filterTimeTag = "${filterTimeTag}";
        $("#detailPeriodTag").text("时间范围").attr('data-original-title',(filterTimeTag.split("-").length>1)?filterTimeTag:"").tooltip();
        $("#detailDataSourceTag").text("数据来源").append($("<span class='badge'></span>").text("${filterDataSource}".split(" ").length)).attr('data-original-title',"${filterDataSource}").tooltip();
        //渠道刷选项
        $("#detailChannelTag").text("渠道").append($("<span class='badge'></span>").text("${filterChannel}".split(" ").length)).attr('data-original-title',"${filterChannel}").tooltip();

        //业务刷选项
        $("#detailBusinessTag").text("业务").append($("<span class='badge'></span>").text("${filterBusiness}".split(" ").length)).attr('data-original-title',"${filterBusiness}").tooltip();

        //省份筛选项
        $("#detailProvinceTag").text("省份").append($("<span class='badge'></span>").text("${filterProvince}".split(" ").length)).attr('data-original-title',"${filterProvince}").tooltip();

        //集成商筛选项
        $("#detailProviderTag").text("集成商").append($("<span class='badge'></span>").text("${filterProvider}".split(" ").length)).attr('data-original-title',"${filterProvider}").tooltip();
        if("${filterWarningSource}"!=""){
            //故障来源
            $("#detailWarningSourceTag").text("故障来源").append($("<span class='badge'></span>").text("${filterWarningSource}".split(" ").length)).attr('data-original-title',"${filterWarningSource}").tooltip();
        }
    }else if("${filterBusiness}"=="" && "${filterDataSource}"!="" && "${filterChannel}"!="" && "${filterProvince}"!="" && "${filterProvider}"!=""){
        var filterTimeTag = "${filterTimeTag}";
        $("#detailPeriodTag").text("时间范围").attr('data-original-title',(filterTimeTag.split("-").length>1)?filterTimeTag:"").tooltip();
        $("#detailDataSourceTag").text("数据来源").append($("<span class='badge'></span>").text("${filterDataSource}".split(" ").length)).attr('data-original-title',"${filterDataSource}").tooltip();
        //渠道刷选项
        $("#detailChannelTag").text("渠道").append($("<span class='badge'></span>").text("${filterChannel}".split(" ").length)).attr('data-original-title',"${filterChannel}").tooltip();

        //省份筛选项
        $("#detailProvinceTag").text("省份").append($("<span class='badge'></span>").text("${filterProvince}".split(" ").length)).attr('data-original-title',"${filterProvince}").tooltip();

        //集成商筛选项
        $("#detailProviderTag").text("集成商").append($("<span class='badge'></span>").text("${filterProvider}".split(" ").length)).attr('data-original-title',"${filterProvider}").tooltip();
    }else if("${filterBusiness}"=="" && "${filterDataSource}"=="" && "${filterChannel}"=="" && "${filterProvince}"!="" && "${filterProvider}"!=""){
        //省份筛选项
        $("#detailProvinceTag").text("省份").append($("<span class='badge'></span>").text("${filterProvince}".split(" ").length)).attr('data-original-title',"${filterProvince}").tooltip();

        //集成商筛选项
        $("#detailProviderTag").text("集成商").append($("<span class='badge'></span>").text("${filterProvider}".split(" ").length)).attr('data-original-title',"${filterProvider}").tooltip();
    }

</script>


<script type="text/javascript">

    function writeLable(){
        if(judge == true){
            $("#detailPeriodTag").text("最近一个月");
            $("#detailDataSourceTag").empty();
            $("#detailChannelTag").empty();
            $("#detailBusinessTag").empty();
            $("#detailProvinceTag").empty();
            $("#detailProviderTag").empty();
            $("#detailXcdStatusTag").empty();
            $("#detailWarningSourceTag").empty();
        }else{
            if($("#titleText").val()!=""){
                $("#detailPeriodTag").empty();
                $("#detailDataSourceTag").empty();
                $("#detailChannelTag").empty();
                $("#detailBusinessTag").empty();
                $("#detailProvinceTag").empty();
                $("#detailProviderTag").empty();
                $("#detailXcdStatusTag").empty();
                $("#detailWarningSourceTag").empty();
                $('#detailTitleTag').text("故障标题:"+$("#titleText").val());
胡斌's avatar
胡斌 committed
243 244
            }
            else{
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
                $('#detailTitleTag').empty();
                $("#detailWarningSourceTag").text("故障来源").append($("<span class='badge'></span>").text(getStatsWarningSourceCheckedValues().length)).attr('data-original-title',getStatsWaringSourceCheckedTitles()).tooltip();
                $("#detailXcdStatusTag").text("协查单状态:"+getXcdStatusTitle());
                $("#detailPeriodTag").text((getDetailPeriodStr()=="")?"最近一个月":"时间范围").attr('data-original-title',getDetailPeriodStr()).tooltip();
                //数据来源刷选项
                $("#detailDataSourceTag").text("数据来源").append($("<span class='badge'></span>").text(getDetailDataSourceCheckedTexts().length)).attr('data-original-title',getDetailDataSourceCheckedTitles()).tooltip();
                //渠道刷选项
                $("#detailChannelTag").text("渠道").append($("<span class='badge'></span>").text(getDetailChannelCheckedValues().length)).attr('data-original-title',getDetailChannelCheckedTitles()).tooltip();
                //业务刷选项
                $("#detailBusinessTag").text("业务").append($("<span class='badge'></span>").text(getDetailBusinessCheckedValues().length)).attr('data-original-title',getDetailBusinessCheckedTitlesString()).tooltip();
                //省份筛选项
                $("#detailProvinceTag").text("省份").append($("<span class='badge'></span>").text(getDetailProvinceCheckedValues().length)).attr('data-original-title',getDetailProvinceCheckedTitles()).tooltip();
                //集成商筛选项
                $("#detailProviderTag").text("集成商").append($("<span class='badge'></span>").text(getDetailProviderCheckedValues().length)).attr('data-original-title',getDetailProviderCheckedTitles()).tooltip();
            }
        }

    }
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
    //获取选取的时间段,返回结果为字符串数组
    function getPeriod(){
        var period=new Array();
        period[0]=$("#d1").val();
        period[1]=$("#d2").val();
        return period;
    }
    //返回结果为以逗号分隔的字符串类型
    function getPeriodString(){
        var str="";
        var period=getPeriod();
        str=str+period[0]+"~"+period[1];
        console.log("str "+str);
        console.log("str leng "+str.length);
        return str;
    }

280 281 282
    function detailSubmit(){

        var detailProvinceSum = getDetailProvinceCheckedValues().length;
283 284 285
        var detailtime=getPeriodString();
        if(detailtime == "" || detailtime == null||detailtime.length <2){
            $.alert("时间范围不能为空");
莫林毅's avatar
莫林毅 committed
286
            return ;
287
        }else if(detailProvinceSum==0) {
288
            $.alert("省份的选择不能为空");
莫林毅's avatar
莫林毅 committed
289
            return ;
290 291 292
        }else{
            var detailProvince = getDetailProvinceCheckedValueString();
            var dimension=getDetailCheckeddDimension();
莫林毅's avatar
莫林毅 committed
293 294 295
            console.log("detailProvince  "+detailProvince);
            console.log("dimension  "+dimension);
            console.log("detailtime  "+detailtime);
296 297
            //alert(dimension+"-pi-");
//            alert(detailProvince);
莫林毅's avatar
莫林毅 committed
298 299
            var href="${ctx}/MonitorOperation/AssociateDiagosisDetail/tableList?detailProvince="+detailProvince+"&detailtime="+detailtime+"&dimension="+dimension;
            $.ajax({
300 301
                type : 'GET',
                contentType : 'application/json',
莫林毅's avatar
莫林毅 committed
302
                url: href,//encodeURI(encodeURI(href)),//href,
303 304 305 306 307
                dataType : 'text',
                beforeSend: function(data) {
                },
                success: function(data) {
                    $("#gzfxDetail").val(data);
莫林毅's avatar
莫林毅 committed
308 309 310 311 312
//                    failureTable();
                    initTable();
                    //checkFailureIds=[];
                    //$("#deleteFailureBtn").attr("disabled", true);
                    //toggleMenu('slidePushMenus2');//隐藏筛选项
313
                }
莫林毅's avatar
莫林毅 committed
314
            });
315 316 317 318
           $("#detailPeriodTag").empty();
            $("#detailProvinceTag").text("省份").append($("<span class='badge'></span>").text(detailProvinceSum)).attr('data-original-title',getDetailProvinceTag()).tooltip();
            $("#detailDimensionTag").text("关联维度").append($("<span class='badge'></span>").text()).attr('data-original-title',getdetailDemensionTagValue()).tooltip();
            $("#detailTimeTag").text("时间范围").append($("<span class='badge'></span>").text()).attr('data-original-title',detailtime).tooltip();
319 320
            toggleMenu('slidePushMenus2');//隐藏筛选项
        }
321
        //writeLable();
322 323

    }
324 325 326 327 328 329 330 331 332 333 334 335
    function getdetailDemensionTagValue(){
        var checkedDimension=$("#xcdStatusSelect option:selected").text();

        return checkedDimension;
    }
    function getDetailProvinceTag(){
        var str="";
        $(".provinceDetail:input:checkbox:checked").each(function(){
            str+=$(this).attr("title")+" ";
        });
        return str;
    }
336 337 338

    //重置detail中的筛选项
    function detailReset(){
339

莫林毅's avatar
莫林毅 committed
340 341 342 343

        //$("#d1").val('');
        //$("#d2").val('');
        initDate();
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
        detail_Province_Reset();
        detail_Dimension_Reset();
        judge = true;
    }

    //把故障明细统计列表导出为Excel格式
    $("#gzfxDetailUpload").click(function(){
        //upLoadExcel
        var listForm=$("#listForm");
        listForm.attr("method","post");
        listForm.attr("action","${ctx}/MonitorOperation/FailureAnalysisDetail/upLoadGzfxDetailExcel");
        listForm.submit();
        listForm.attr("action","#");
    });

莫林毅's avatar
莫林毅 committed
359 360


361 362 363 364
</script>

</body>
</html>