From 7efe5eb4bcd083a695b6bac240988c1308cc3eb8 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期二, 08 二月 2022 15:21:03 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/config.js | 2
src/main/webapp/static/js/projectShow.js | 53 ++++++++++++++++----------
src/main/webapp/static/css/style.css | 60 ++++++++++++++++++++++++-----
src/main/webapp/views/index_datashow.html | 1
src/main/resources/application.yml | 2
5 files changed, 85 insertions(+), 33 deletions(-)
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 2c13c95..9a2f0d1 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -14,7 +14,7 @@
# password: xltys1995
# sql-server
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- url: jdbc:sqlserver://localhost:1433;databasename=zypms
+ url: jdbc:sqlserver://192.168.4.99:1433;databasename=zypms
username: sa
password: sa@123
mvc:
diff --git a/src/main/webapp/static/css/style.css b/src/main/webapp/static/css/style.css
index 31f00d1..69a83cb 100644
--- a/src/main/webapp/static/css/style.css
+++ b/src/main/webapp/static/css/style.css
@@ -23,11 +23,7 @@
#logo-bar {
width: 200px;
height: 109px;
-
position: absolute;
-
-
-
}
#top-tab img {
width: 200px;
@@ -36,7 +32,6 @@
top: -15px;
left: 20px;
transform: scale(0.6);
-
}
#top-tab h1{
@@ -146,7 +141,9 @@
transform: translate(-50% ,-30%);
}
-
+#details {
+ position: relative;
+}
#details .head {
width: 100%;
height: 50px;
@@ -170,14 +167,55 @@
}
/* 鐢樼壒鍥� */
-#details-tab {
- background-color: #FFF;
- width: 98%;
+/*宸︿晶椤圭洰鑺傜偣鏃堕棿*/
+#details-tab-left {
+ display: inline-block;
+ position: absolute;
+ float: left;
+ width: 11%;
margin-top: 1%;
margin-left: 1%;
+}
+/*琛ㄥご*/
+.tab-head {
+ background-color: #354352;
+ color: #FFFFFF;
+ font-size: 6px;
+}
+.tab-head>th {
+ width: 73px;
+ height: 35px;
+}
+.tab-head>th:first-child {
+ width: 55px;
+}
+/*琛ㄨ韩*/
+.tab-body {
+ background-color: #354352;
+ color: #FFFFFF;
+ font-size: 6px;
+}
+.tab-body>td {
+ width: 73px;
+ height: 52px;
+ text-align: center;
+}
+.tab-body>td:first-child {
+ width: 55px;
+}
+/*鍙充晶杩涘害琛�*/
+#details-tab {
+ display: inline-block;
+ position: absolute;
+ clear: both;
+ background-color: #FFF;
+ width: 86%;
+ margin-top: 1%;
+ margin-left: 12%;
+ overflow: scroll;
}
-#details-tab,th,td{
+#details-tab th td{
border: 1px solid #d9dce3;
cursor: default;
@@ -187,7 +225,7 @@
width: 55px;
}
#details-tab td {
- height: 28px;
+ height: 27px;
text-align: center;
position: relative;
}
diff --git a/src/main/webapp/static/js/config.js b/src/main/webapp/static/js/config.js
index 4fc28f8..618f045 100644
--- a/src/main/webapp/static/js/config.js
+++ b/src/main/webapp/static/js/config.js
@@ -1 +1 @@
-var baseurl = 'http://192.168.4.57:8080';
\ No newline at end of file
+var baseurl = 'http://47.97.1.152:58080';
\ No newline at end of file
diff --git a/src/main/webapp/static/js/projectShow.js b/src/main/webapp/static/js/projectShow.js
index 3505b9a..f4f445d 100644
--- a/src/main/webapp/static/js/projectShow.js
+++ b/src/main/webapp/static/js/projectShow.js
@@ -26,14 +26,17 @@
}else if(show==false){
$("#tips").attr("style","display:block")
}
-
+ // 椤圭洰鍚嶇О
$("#details h2").html(project.id)
// 棰勮鑺傜偣鏃堕棿
var tab = ''
+ var tabLeft3 = ''
var day = 86400000
var allDay = (endTime - startTime + day ) / day
// 棰勮鑺傜偣鐨勫ぉ鏁�,瀹為檯鑺傜偣澶╂暟,鍗犲灏戞牸瀛�;棰勮/瀹為檯 鑺傜偣涓庨」鐩紑濮嬫椂闂寸殑鏃堕棿闂撮殧锛堜粠鍝釜鏍煎瓙寮�濮嬫覆鏌擄級
+ console.log(allDay)
var bigDays = []
+
for(var i = 0;i<node.length;i++){
var nodeName = node[i].name // 鑺傜偣鍚嶇О
@@ -41,13 +44,13 @@
var nodeEndTime = new Date(node[i].endTime$.substring(0,10)) // 棰勮缁撴潫鏃堕棿
var nodeRealStartTime =new Date(node[i].realStartTime$.substring(0,10)) // 瀹為檯寮�濮嬫椂闂�
var nodeRealEndTime =new Date(node[i].realEndTime$.substring(0,10)) // 瀹為檯缁撴潫鏃堕棿
- var tab2 =
- '<tr id="td-node'+i+'-gz">'
- +'<td rowspan="2" class="loadBox">'+nodeName+'</td>'
- +'<td rowspan="2" class="loadBox">'+node[i].startTime.substring(0,10)+'</td>'
- +'<td rowspan="2" class="loadBox">'+node[i].endTime$.substring(0,10)+'</td>'
- +'<tr id="td-node'+i+'-gz-2">'+'</tr>'
- tab = tab +tab2
+ var tab2 ='<tr id="td-node'+i+'-gz">'+'<tr id="td-node'+i+'-gz-2">'+'</tr>'
+ tab = tab +tab2
+ var tabLeft2 = '<tr class="tab-body">'
+ +'<td>'+nodeName+'</td>'
+ +'<td>'+node[i].startTime.substring(0,10)+'</td>'
+ +'<td>'+node[i].endTime$.substring(0,10)+'</td>'
+ tabLeft3 = tabLeft3 + tabLeft2
var overtime = endTime-nodeRealEndTime
if(overtime<0){
bigDays.push(nodeRealEndTime)
@@ -59,20 +62,30 @@
}
var tab1 =
'<thead>'
- +'<tr id="th-gz">'
- +'<th class="loadBox">'+'浠诲姟鍚嶇О'+'</th>'
- +'<th class="loadBox">'+'寮�濮嬫椂闂�'+'</th>'
- +'<th class="loadBox">'+'缁撴潫鏃堕棿'+'</th>'
- + '</tr>'
+ +'<tr id="th-gz">' + '</tr>'
+'</thead>'
+'<tbody>'
- +'<tr id="tot">'
- +'<td rowspan="2" class="loadBox">'+'浠诲姟鎬绘椂闂�'+'</td>'
- +'<td rowspan="2" class="loadBox">'+project.startDay.substring(0,10)+'</td>'
- +'<td rowspan="2" class="loadBox">'+project.endDay.substring(0,10)+'</td>'
- +'</tr>'
- +'<tr id="tot-2">'+'</tr>'
+ +'<tr id="tot">' +'</tr>'
+ +'<tr id="tot-2">'+'</tr>'
var tab3 = tab1+tab+'</tbody>'
+ /* 鑺傜偣鏃堕棿琛� */
+ var tabLeft = '<thead>' // 琛ㄥご
+ +'<tr class="tab-head">'
+ +'<th>'+'椤圭洰鍚嶇О'+'</th>'
+ +'<th>'+'寮�濮嬫椂闂�'+'</th>'
+ +'<th>'+'缁撴潫鏃堕棿'+'</th>'
+ +'</tr>'
+ +'</thead>'
+ +'<tbody>' // 琛ㄨ韩 锛堥」鐩妭鐐瑰鏈級
+ +'<tr class="tab-body">'
+ +'<td style="height: 54px">'+'椤圭洰鎬绘椂闀�'+'</td>'
+ +'<td style="height: 54px">'+project.startDay.substring(0,10)+'</td>'
+ +'<td style="height: 54px">'+project.endDay.substring(0,10)+'</td>'
+ +'</tr>'
+
+ var tabLeft4 = tabLeft + tabLeft3 +'</tbody>'
+ $("#details-tab-left").empty()
+ $("#details-tab-left").append(tabLeft4)
$("#details-tab").empty()
$("#details-tab").append(tab3);
// 濉厖鍗曞厓鏍�
@@ -447,7 +460,7 @@
var intRunDay = nodeRealEndTime-(nodeRealEndTime-(nodeEndTime-nodeStartTime))/day
// 涓庡綋鍓嶆椂闂寸殑鏃堕棿宸�
for(var j=0;j<nodeDay;j++){
- $(nodeId2[i]).find('td').eq(3+intDay+j).attr("style","background:#3597D6")
+ $(nodeId2[i]).find('td').eq(intDay+j).attr("style","background:#3597D6")
}
// 瀹為檯寮�濮嬫椂闂翠笌缁撴潫鏃堕棿閮藉~鍐� 鎸夊疄闄呮椂闂磋繘娓叉煋
if(nodeRealStartTime != "Invalid Date" && nodeRealEndTime !="Invalid Date"){
diff --git a/src/main/webapp/views/index_datashow.html b/src/main/webapp/views/index_datashow.html
index dae41be..150a68a 100644
--- a/src/main/webapp/views/index_datashow.html
+++ b/src/main/webapp/views/index_datashow.html
@@ -39,6 +39,7 @@
<h2></h2>
<button id="close" type="button" style="float: right;">鍏� 闂�</button>
</div>
+ <table id="details-tab-left" cellspacing="0" cellpadding="0"></table>
<table id="details-tab" cellspacing="0" cellpadding="0">
<thead>
</thead>
--
Gitblit v1.9.1