AssociateDiagosisDetail.jsp 17.6 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 30 31 32 33
    <script type="text/javascript">
        $(document).ready(function(){
           // alert(1);
           // failureTable();
           // initDateDetail();
            //$("#businessSelectAreaDetail").hide();
莫林毅's avatar
莫林毅 committed
34
            initDate();
35 36
            //初始化界面
            initTable();
莫林毅's avatar
莫林毅 committed
37 38
            var v=document.getElementById('gzfxDetail').value;
            console.log("v    "+v);
39
        });
胡斌's avatar
胡斌 committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
        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()}
            });
56

胡斌's avatar
胡斌 committed
57 58 59 60 61 62 63 64 65 66 67 68
            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>
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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
</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">
                                    <tags:GZFX__Dimension_Province_detail/>
                                    <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">
胡斌's avatar
胡斌 committed
120
                                            <%--<span id="detailPeriodTag" class="label label-info" data-placement="bottom">最近一个月</span>--%>
121 122

                                            <span id="detailTimeTag" class="label label-info"
123
                                                  data-placement="bottom"></span>
124
                                            <span id="detailDimensionTag" class="label label-info"
125 126 127
                                                  data-placement="bottom"></span>
                                            <span id="detailProvinceTag" class="label label-info"
                                                  data-placement="bottom"></span>
128

129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
                                        </div>
                                        <div class="bt-list-import">
                                            <a href="#" id="gzfxDetailUpload" class="">
                                                <span class="glyphicon glyphicon-import"></span>
                                                <span class="glyphicon-class">导出Excel</span>
                                            </a>
                                        </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
160
                <input type="hidden" id="gzfxDetail" name="gzfxDetail" value='${diagosisDetails}' />
161 162 163
            </div>
        </div>
    </div>
莫林毅's avatar
莫林毅 committed
164
    ${diagosisDetails}
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 243 244 245 246 247 248 249
</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
250 251
            }
            else{
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
                $('#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();
            }
        }

    }
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
    //获取选取的时间段,返回结果为字符串数组
    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;
    }

287 288 289
    function detailSubmit(){

        var detailProvinceSum = getDetailProvinceCheckedValues().length;
290 291 292
        var detailtime=getPeriodString();
        if(detailtime == "" || detailtime == null||detailtime.length <2){
            $.alert("时间范围不能为空");
莫林毅's avatar
莫林毅 committed
293
            return ;
294
        }else if(detailProvinceSum==0) {
295
            $.alert("省份的选择不能为空");
莫林毅's avatar
莫林毅 committed
296
            return ;
297 298 299
        }else{
            var detailProvince = getDetailProvinceCheckedValueString();
            var dimension=getDetailCheckeddDimension();
莫林毅's avatar
莫林毅 committed
300 301 302
            console.log("detailProvince  "+detailProvince);
            console.log("dimension  "+dimension);
            console.log("detailtime  "+detailtime);
303 304
            //alert(dimension+"-pi-");
//            alert(detailProvince);
莫林毅's avatar
莫林毅 committed
305 306
            var href="${ctx}/MonitorOperation/AssociateDiagosisDetail/tableList?detailProvince="+detailProvince+"&detailtime="+detailtime+"&dimension="+dimension;
            $.ajax({
307 308
                type : 'GET',
                contentType : 'application/json',
莫林毅's avatar
莫林毅 committed
309
                url: href,//encodeURI(encodeURI(href)),//href,
310 311 312 313 314
                dataType : 'text',
                beforeSend: function(data) {
                },
                success: function(data) {
                    $("#gzfxDetail").val(data);
莫林毅's avatar
莫林毅 committed
315 316 317 318 319
//                    failureTable();
                    initTable();
                    //checkFailureIds=[];
                    //$("#deleteFailureBtn").attr("disabled", true);
                    //toggleMenu('slidePushMenus2');//隐藏筛选项
320
                }
莫林毅's avatar
莫林毅 committed
321
            });
322 323 324 325
           $("#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();
326 327
            toggleMenu('slidePushMenus2');//隐藏筛选项
        }
328
        //writeLable();
329 330

    }
331 332 333 334 335 336 337 338 339 340 341 342
    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;
    }
343 344 345

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

莫林毅's avatar
莫林毅 committed
347 348 349 350

        //$("#d1").val('');
        //$("#d2").val('');
        initDate();
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
        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
366 367


368 369 370 371
</script>

</body>
</html>