From 33c70b609b27aa548e43ef7751c8970f99dc663a Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期五, 11 二月 2022 09:53:23 +0800 Subject: [PATCH] 2-11 --- src/main/webapp/static/js/projectShow.js | 27 ++++++++++++++++++++++----- src/main/webapp/static/css/style.css | 14 +++++++++++++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/css/style.css b/src/main/webapp/static/css/style.css index 845dda4..cc0b3f1 100644 --- a/src/main/webapp/static/css/style.css +++ b/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; + + +} + diff --git a/src/main/webapp/static/js/projectShow.js b/src/main/webapp/static/js/projectShow.js index 29731ca..a395dd8 100644 --- a/src/main/webapp/static/js/projectShow.js +++ b/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 @@ } } }) - \ No newline at end of file + + + -- Gitblit v1.9.1