瀏覽代碼

左侧点击事件修改

demon 8 年之前
父節點
當前提交
fc519135d9

+ 0 - 2
src/main/java/com/yihu/hos/monitor/controller/ServerMonitorController.java

@ -47,7 +47,6 @@ public class ServerMonitorController {
            @RequestParam(value = "beginTime") String beginTime,
            @ApiParam(name = "endTime", value = "结束时间", required = true)
            @RequestParam(value = "endTime") String endTime) {
        host = monitorService.getHost();
        return monitorService.getMonitorList(host,type, beginTime, endTime);
    }
@ -62,7 +61,6 @@ public class ServerMonitorController {
            @RequestParam(value = "type") String type,
            @ApiParam(name = "date", value = "时间点", required = true)
            @RequestParam(value = "date") String date) {
        host = monitorService.getHost();
        return monitorService.getMonitorDetail(host,type, date);
    }

+ 2 - 4
src/main/webapp/WEB-INF/ehr/jsp/monitor/server/sEnvManage.jsp

@ -5,7 +5,7 @@
    .c-item{float:left;height: 30px;line-height: 30px;width: 15%;background: #fff;color:#000;text-align: center;font-size: 12px;border:1px solid #dcdcdc;}
    .c-bor-r{border-right: 0;}
    .c-item.active{background: #16B3EE;color:#fff}
    .f-bold{font-weight:bold;}
    .ml50{margin-left: 50px;}
    .mt20{margin-top: 20px;}
    .mb20{margin-bottom: 20px;}
@ -17,15 +17,13 @@
    .d-item{font-size: 12px;display: inline-block;width: 100px;}
    .c-content{font-size: 16px;display: inline-block;width: 100px;font-weight: bold;}
    .div-right-item{font-size: 12px;width: 150px;}
</style>
<!-- ####### 页面部分 ####### -->
<div id="div_wrapper">
    <!--左边 区域-->
    <div position="left"  style="margin-left:10px;margin-top:10px;">
        <input type="hidden" id="nowHost">
        <ul    style="margin-left:50px;margin-top:10px;">服务器列表</ul>
        <ul    style="margin-left:50px;margin-top:10px;font-size: 17px;">服务器列表</ul>
        <ul id="div_wrapper_left_ul_resourcetree" class="m-snav"  style="margin-left:50px;margin-top:40px;"></ul>
    </div>
    <div position="center" style="margin-left:10px;margin-top:10px;margin-right:10px;">

+ 7 - 4
src/main/webapp/WEB-INF/ehr/jsp/monitor/server/sEnvManageJs.jsp

@ -36,11 +36,13 @@
        getServerInfo(host,type,beginTime,endTime);
        getInfo(host,type,endTime);
        //左侧栏目点击事件
        $('#div_wrapper_left_ul_resourcetree').on("click","li",function(){
           $(this).addClass("active");
            $(this).siblings("li").removeClass("active");
            var host = $(this).find("span").text();
            $(this).find("div").addClass("f-bold");
            $(this).siblings("li").find("div").removeClass("f-bold");
            var host = $(this).find("div").text();
            var beginTime = $("#repeatStartTime").ligerDateEditor("getValue");
            var endTime = $("#repeatEndTime").ligerDateEditor("getValue");
            if(beginTime=="" && $endTime=="")
@ -112,15 +114,16 @@
        $.ajax({
            type: "GET",
            url: "${contextRoot}/monitor/server/hosts",
            async: false,
            success: function (msg) {
                // 初始化树形菜单
                var data = msg.data;
                if(data!=null && data.length>0){
                    for(var i=0;i<data.length;i++){
                        if(i==0){
                            $resourceTree.append( "<li class='active'><div style='font-weight:900;cursor:pointer;'>"+data[i].host+"</div></li>");
                            $resourceTree.append( "<li class='active'><div class='f-bold' style='margin-top:10px;cursor:pointer;'>"+data[i].host+"</div></li>");
                        }else{
                            $resourceTree.append( "<li><div style='font-weight:900;cursor:pointer;'>"+data[i].host+"</div></li>");
                            $resourceTree.append( "<li><div style='margin-top:10px;cursor:pointer;'>"+data[i].host+"</div></li>");
                        }
                    }
                    host = data[0].host;