whycq
2022-02-11 33c70b609b27aa548e43ef7751c8970f99dc663a
2-11
2个文件已修改
41 ■■■■ 已修改文件
src/main/webapp/static/css/style.css 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/projectShow.js 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/style.css
@@ -228,6 +228,10 @@
    height: 25px;
    text-align: center;
    position: relative;
}
#tabBody td {
    border: none;
}
.loadBox {
    width: 50px;
@@ -246,15 +250,23 @@
    background-color: #354352;
    color: #FFFFFF;
    font-size: 1px;
    border: 1px solid #ffffff;
}
#tot td:hover {
#tot th:hover {
    background-color: #0c64eb;
}
.over-color{
    background-color: #aeafaf;
    opacity: 0.5;
}
src/main/webapp/static/js/projectShow.js
@@ -136,13 +136,13 @@
            }
            // 项目时间单元格
            for(let i=0;i<days;i++){
                str = '<td class="loadBox-2">'+dateArr[i]+'</td>'
                str = '<th class="loadBox-2">'+dateArr[i]+'</th>'
                $("#tot").append(str);
                // $(".loadBox").attr('style','width:50px')
            }
            // 节点时间单元格
            for (let j=0;j<days;j++){
                tds = '<td class="gz-color">'+'</td>'
                tds = '<td class="gz-color'+j+' time-color">'+'</td>'
                for(let k in nodeId){
                    $(nodeId[k]).append(tds)
                }
@@ -235,8 +235,23 @@
                }
            }
            // 鼠标经过
            // $("#tabBody").find("tr").eq(3).find("td").eq(30).attr("style","background:#354352")
            // $("#tabBody").find("td").eq(30).attr("style","background:#f60313")
            $(document).on('mouseover','.time-color',function () {
                // console.log($(this).attr('class'))
                var cls = $(this).attr('class').split(' ')[0]
                var cll = '.'+cls
                $(cll).addClass('over-color')
            })
            // 鼠标离开
            $(document).on('mouseout','.time-color',function () {
                // console.log($(this).attr('class'))
                var cls = $(this).attr('class').split(' ')[0]
                var cll = '.'+cls
                $(cll).removeClass('over-color')
            })
            function getDateArr(start,end) {
                    let option = new Date(start) // 开始时间
                    let nowDate = new Date(end) // 结束时间
@@ -273,4 +288,6 @@
            }
            }
            })