From fbf44e2ba37f43fabc220964b5acc3603d96faa8 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期四, 08 九月 2022 12:56:02 +0800 Subject: [PATCH] # --- src/main/webapp/static/css/style3.css | 349 ++++++++++++++++++++++++++ src/main/webapp/static/css/style4.css | 61 ++++ src/main/webapp/views/index_datashow3.html | 68 +++++ src/main/webapp/static/js/tableData3.js | 197 +++++++++++++++ src/main/webapp/views/testview/testview.html | 105 ++----- 5 files changed, 706 insertions(+), 74 deletions(-) diff --git a/src/main/webapp/static/css/style3.css b/src/main/webapp/static/css/style3.css new file mode 100644 index 0000000..04d3bd9 --- /dev/null +++ b/src/main/webapp/static/css/style3.css @@ -0,0 +1,349 @@ +*{ + margin: 0; + /*overflow: hidden;*/ + font-size: 10px; +} +html{ + height: 100%; +} +body{ + background-color: #2e4e7e; + height: 1080px; + width: 100%; +} +/* 鐢诲竷 */ +#root { + /*height: 100%;*/ + /*width: 100%;*/ + /*margin: 0;*/ + /*background-color: !* #2C3E50 *! #2e4e7e;*/ + position: absolute; +} + +#top-tab { + width: 100%; + height: 109px; + background-image: url(../image/head_bg.png); + background-repeat: no-repeat; + background-position: center center; + background-size: cover +} +#logo-bar { + width: 200px; + height: 109px; + position: absolute; +} +#top-tab img { + width: 200px; + height: 109px; + position: absolute; + top: -15px; + left: 20px; + transform: scale(0.6); +} + +#top-tab h1{ + color:white; + line-height: 94px; + text-align: center; + font-size: 40px; +} +#showTime { + width: 350px; + height: 80px; + position: absolute; + top: 0; + right: 0px; + color:white; + line-height: 80px; + text-align: center; + font-size: 20px; +} + +#proType { + margin-top: 0%; + width: 50%; + color: #d9d9d9; + align: center; + margin-left: 25%; + font-size: 10px; + font-weight: 100; +} + + +#main-tab { + margin-top: 1%; + width: 198%; + align: center; + color: #d9d9d9; + margin-left: 1%; + margin-right: 1%; + margin-bottom: 5%; + /*min-height: 1080px;*/ + /*height: auto !important;*/ + /*height: 1080px;*/ +} +#main-tab,th,td{ + border: 1px solid #fff; + cursor: default; +} +#main-tab th { + height: 40px; + width: 25px; + background-color: /* #223962 */#3a4a5a; +} + + +#main-tab td { + width: 50px; + height: 50px; + border-collapse: collapse; + text-align: center; + cursor: pointer; +} +#main-tab p { + font-size: 14px; +} +/* .normal { + background-color: #009966; +} */ +.nor-mal { + background-color: #3a4a5a; +} + +.hover{background-color: #016165;cursor:pointer;} +/* 寮瑰嚭灞� */ +#details { + width: 98%; + height: 90%; + background-color: #FFF; + box-shadow: 0px 5px 20px #000; + border-radius: 15px; + position: relative; + top:2.5%; + left:1%; + display: none; + +} +#tips { + width: 30%; + height: 20%; + background-color: #FFF; + box-shadow: 0px 5px 20px #000; + border-radius: 15px; + position: relative; + top:30%; + left:35%; + display: none; +} +#tips h3 { + text-indent: 1em; + height: 36px; + line-height: 36px; + background-color: #2E4E7E; + color: #FFFFFF; +} +#text { + height: 100px; + width: 576px; +/* background-color: #016165; */ + font-size: 18px; + font-weight: 900; + text-indent: 2em; + line-height: 100px; +} +#closee { + display: inline-block; + color: #FFFFFF; + height: 30px; + width: 80px; + background-color: #354352; + border: 1px #354352; + border-radius: 30px; + position: relative; + left: 50%; + top: 5%; + transform: translate(-50% ,-30%); +} + +#details { + position: absolute; +} +#details .head { + width: 100%; + height: 50px; + line-height: 50px; + text-align: center; + /* background-color: #016165; */ +} +#details h2 { + display: inline-block; +} +#close { + display: inline-block; + color: #FFFFFF; + height: 30px; + width: 80px; + background-color: #354352; + border: 1px #354352; + border-radius: 30px; + margin-top: 20px; + margin-right: 50px; +} + +/* 鐢樼壒鍥� */ +/*宸︿晶椤圭洰鑺傜偣鏃堕棿*/ +#details-tab-left { + display: inline-block; + position: absolute; + float: left; + width: 16%; + margin-top: 0.5%; + margin-left: 1%; +} +/*琛ㄥご*/ +.tab-head { + background-color: #354352; + color: #FFFFFF; + font-size: 6px; +} +.tab-head>th { + width: 73px; + height: 25px; +} +.tab-head>th:first-child { + width: 110px; +} +/*琛ㄨ韩*/ +.tab-body { + background-color: #354352; + color: #FFFFFF; + font-size: 6px; +} +.tab-body>td { + width: 73px; + height: 30px; + text-align: center; +} +.tab-body>td:first-child { + width: 55px; +} +/*鍙充晶杩涘害琛�*/ +#details-tab { + display: inline-block; + position: absolute; + clear: both; + background-color: #FFF; + width: 80%; + margin-top: 0.5%; + margin-left: 16.9%; + overflow-x: scroll; +} + +#details-tab th td{ + border: 1px solid #d9dce3; + cursor: default; + +} +#details-tab th { + height: 25px; + width: 55px; +} +#details-tab td { + height: 16px; + text-align: center; + position: relative; + +} +#tabBody td { + border: none; +} + +.loadBox { + width: 50px; + height: 50px; + background-color: #354352; + color: #FFFFFF; + font-size: 6px; +} +.gz-color { + height: 50px; + border: none; +} + +.loadBox-2 { + width: 50px; + background-color: #354352; + color: #FFFFFF; + font-size: 1px; + border: 1px solid #ffffff; +} + + + + +#tot th:hover { + background-color: #0c64eb; +} + +.over-color{ + background-color: #aeafaf; + opacity: 1; + + +} + + + + + + + +::-webkit-scrollbar { + + height: 10px; + + width: 10px; + + /*color: transparent;*/ + color: #FFFFFF; + +} +/*瀹氫箟婊氬姩鏉℃牱寮忥紙楂樺鍙婅儗鏅級*/ + +::-webkit-scrollbar { + + width: 6px; /* 婊氬姩鏉″搴︼紝 width锛氬搴旂珫婊氬姩鏉$殑瀹藉害 height锛氬搴旀í婊氬姩鏉$殑楂樺害*/ + + background: #007acc; + +} + +/*瀹氫箟婊氬姩鏉¤建閬擄紙鍑规Ы锛夋牱寮�*/ + +::-webkit-scrollbar-track { + + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); /* 杈冨皯浣跨敤 */ + + border-radius: 3px; + +} + +/*瀹氫箟婊戝潡 鏍峰紡*/ + +::-webkit-scrollbar-thumb { + + border-radius: 3px; + + height: 100px; /* 婊氬姩鏉℃粦鍧楅暱搴� */ + + background-color: #ccc; + +} + + + + + + + diff --git a/src/main/webapp/static/css/style4.css b/src/main/webapp/static/css/style4.css new file mode 100644 index 0000000..52339e3 --- /dev/null +++ b/src/main/webapp/static/css/style4.css @@ -0,0 +1,61 @@ +*{ + margin: 0; +} +#root { + +} +body { + background-color: #2e4e7e; + width: 100%; + /*min-height: 1080px;*/ + /*height: auto !important;*/ + height: 1080px; +} +.header { + height: 8rem; + width: 100%; + background-color: #3F3F3F +} +.main { + width: 100%; + overflow: scroll; + background-color: #7a8191; + +} +.kuai { + height: 100%; + width: 20%; + display: inline-block; + background-color: #2D93CA; +} +.zuo { + float: left; +} +.you { + float: right; +} +.th { + height: 6rem; + width: 100px; + border: 1px solid #000000; +} +.td { + height: 8rem; + width: 15rem; + border: 1px solid #000000; +} + + + +.float { + left: 0; + top: 50px; + position: absolute; + /*background-color: #fff;*/ + width: 92%; + margin-left: 4%; + min-height: 300px; + height: auto !important; + height: 300px; + box-shadow: 0px 0px 20px #888888; +} \ No newline at end of file diff --git a/src/main/webapp/static/js/tableData3.js b/src/main/webapp/static/js/tableData3.js new file mode 100644 index 0000000..b5cabc2 --- /dev/null +++ b/src/main/webapp/static/js/tableData3.js @@ -0,0 +1,197 @@ +setTimeout(function () { + getTheaddData() + getThbodyData() + getType() +}, 0) +setInterval(function () { + getThbodyData() +}, 5000) + +//琛ㄥご灏忚繘搴﹁〃 +var getType = function () { + $.ajax({ + url: baseurl + '/pms/projectPlan/dataSummary', + type: 'GET', + data: {}, + success: function (res) { + if (res.code === 200) { + var str = '<tr>' + + '<th>' + '椤圭洰鎬绘暟' + '</th>' + '<th>' + res.data.totalQuantity + '</th>' + + '<th>' + '闆嗘垚椤圭洰' + '</th>' + '<th>' + res.data.intoSum + '</th>' + + '<th>' + '闈為泦鎴愰」鐩暟' + '</th>' + '<th>' + res.data.wrongInto + '</th>' + + '<th>' + '宸查獙鏀堕」鐩暟' + '</th>' + '<th>' + res.data.inspected + '</th>' + + '<th>' + '鏈獙鏀堕」鐩暟' + '</th>' + '<th>' + res.data.wrongInspected + '</th>' + + '<th>' + '宸插畬宸ユ湭楠屾敹鏁�' + '</th>' + '<th>' + res.data.finished + '</th>' + $("#type-header").append(str) + } + } + }) +} + + +/****************************************************************************************************************************************************************************/ + +// 琛ㄥご +var proData = ["椤圭洰鍚嶇О", "椤圭洰绫诲瀷", "寮�濮嬫椂闂�", "缁撴潫鏃堕棿"] +var getTheaddData = function () { + //$.ajax({ + // url: baseurl + '/pms/flowStatus/list/auth', + // type: 'GET', + // data: {}, + // success: function (res) { + // + // } + //}) + //for (var i = 0; i < proData.length; i++) { + // var str = "<th class='xiangmu'>" + proData[i] + "</th>" + // $("#tab-header").append(str) + //} + + $.ajax({ + url:baseurl+'/pms/projectPlan/flowStatus', + type:'GET', + dataType:'JSON', + data:{}, + success:function(res){ + console.log(res) + if(res.code==200){ + data=res.data + var headStr = [] + for(var i = 0;i<data.length;i++){ + if (data[i].isAsrs == 1) { + headStr.push(data[i].name) + } + } + proData = proData.concat(headStr) + // 琛ㄥご + for(var i = 0;i<proData.length;i++){ + var str = "<th class='xiangmu'>"+proData[i]+"</th>" + $("#tab-header").append(str) + } + } + }, + }) +} + +/*****************************************************************************************************************************************************************************/ +var getThbodyData = function () { + $.ajax({ + url: baseurl + '/pms/projectPlan/toFront/common', + type: 'GET', + dataType: 'JSON', + data: {}, + success: function (res) { + if (res.code == 200) { + console.log(res) + data = res.data + // 鍒ゆ柇鏃堕棿鏄惁鏈塶ull 鏈塶ull鐨勬敼涓� "" + for (var i = 0; i < data.length; i++) { + var dataNode = data[i].projectPlans + for (var j = 0; j < dataNode.length; j++) { + var dataNull = dataNode[j] + for (var k in dataNull) { + dataNull[k] = dataNull[k] === null ? "" : dataNull[k] + } + } + data[i].presaleAmt = data[i].presaleAmt === null ? "" : data[i].presaleAmt; + data[i].plandeAmt = data[i].plandeAmt === null ? "" : data[i].plandeAmt; + data[i].planinAmt = data[i].planinAmt === null ? "" : data[i].planinAmt; + data[i].realdeAmt = data[i].realdeAmt === null ? "" : data[i].realdeAmt; + data[i].realinAmt = data[i].realinAmt === null ? "" : data[i].realinAmt; + } + // 琛ㄨ韩濉厖 + $('#tab-body').empty() + for (var i = 0; i < data.length; i++) { + var node = data[i].projectPlans + for (var j = 0; j < node.length; j++) { + var dataNull = node[j] + for (var k in dataNull) { + dataNull[k] = dataNull[k] === null ? "" : dataNull[k] + } + } + str = '' + for (var j = 0; j < node.length; j++) { + var nodeName = node[j].flowId$ // 鑺傜偣鍚嶇О + var nodeEndTime = node[j].endTime$.substring(0, 10) + var nodeRealStartTime = node[j].realEndTime$.substring(0, 10) + str1 = '<td class="normal">' + '<p>' + nodeEndTime + '</p>' + '<p>' + nodeRealStartTime + '</p>' + '</td>' + str = str + str1 + } + var str2 = '<tr id="row' + i + '" class="row">' + + '<th class="projects">' + data[i].projectName + '</th>' + + '<th class="projects">' + data[i].projectType + '</th>' + //+ '<td class="nor-mal">' + data[i].presaleAmt + '</td>' + + '<td class="nor-mal">' + '<p>' + data[i].projectStartTime.substring(0, 10) + '</p>' + '</td>' + + '<td class="nor-mal">' + '<p>' + data[i].projectEndTime.substring(0, 10) + '</p>' + '</td>' + var str9 = '<td class="normal">' + '<p>' + data[i].plandeAmt + '</p>' + '<p>' + data[i].realdeAmt + '</p>' + '</td>' + + '<td class="normal">' + '<p>' + data[i].planinAmt + '</p>' + '<p>' + data[i].realinAmt + '</p>' + '</td>' + str9 = '' + var str3 = str2 + str + str9 + '</tr>' + $('#tab-body').append(str3) + //var deAmt = data[i].plandeAmt - data[i].realdeAmt + //if (deAmt < 0) { + // $("#tab-body").find('tr').eq(i).find("td").eq(14).attr("style", "background:#CC3333"); + //} else { + // $("#tab-body").find('tr').eq(i).find("td").eq(14).attr("style", "background:#009966"); + //} + //var inAmt = data[i].planinAmt - data[i].realinAmt + //if (inAmt < 0) { + // $("#tab-body").find('tr').eq(i).find("td").eq(15).attr("style", "background:#CC3333 "); + //} else { + // $("#tab-body").find('tr').eq(i).find("td").eq(15).attr("style", "background:#009966"); + //} + } + var dataLen = data.length + for (var t = 0; t < dataLen; t++) { + var nodes = data[t].projectPlans + for (var k in data[t].projectPlans) { + var k = parseInt(k) + // 椤圭洰鑺傜偣瀹為檯缁撴潫鏃堕棿 + var realEndTime$ = data[t].projectPlans[k].realEndTime$.substring(0, 10) + // 椤圭洰鑺傜偣璁″垝缁撴潫鏃堕棿 + var endTime$ = data[t].projectPlans[k].endTime$.substring(0, 10) + var myDate = new Date() + var nowDay = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate() + var eDay = new Date(endTime$) + // 鍒ゆ柇realEndTime$.substring(0,10) 鏄惁涓虹┖ + if (realEndTime$ === "") { + // 璁″垝鏃ユ湡涓庣郴缁熸棩鏈熸瘮杈� + var ExDay = eDay.getTime() - myDate.getTime() + + if (ExDay > -86400000 && ExDay < 86400000) { + // 涓夊ぉ鍐� + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#CC9933"); + + } else if (ExDay < -86400000) { + // 瓒呰繃涓夊ぉ + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#CC3333"); + + } else if (ExDay > 86400000) { + // 涓嶅埌涓夊ぉ + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#2e4e7e") + } + } else { + function tab(date1, date2) { + var oDate1 = new Date(date1); + var oDate2 = new Date(date2); + var x = oDate1.getTime() - oDate2.getTime() + if (x >= 0) { + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#009966") + } else { + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#CC3333"); + } + } + + tab(endTime$, realEndTime$,); + } + } + } + } + } + }) +} + +/*****************************************************************************************************************************************************************************/ + + + diff --git a/src/main/webapp/views/index_datashow3.html b/src/main/webapp/views/index_datashow3.html new file mode 100644 index 0000000..2a14f99 --- /dev/null +++ b/src/main/webapp/views/index_datashow3.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>椤圭洰杩涘害琛�</title> + <link rel="stylesheet" href="../static/css/style3.css"> + <script src="../static/js/config.js"></script> + <script src="../static/js/jquery-3.3.1.min.js"></script> + <script src="../static/js/clock.js"></script> +<!-- <script src="../static/js/tableData.js"></script>--> +<!-- <script src="../static/js/tableData2.js"></script>--> + <script src="../static/js/tableData3.js"></script> + <script src="../static/js/projectShow2.js"></script> + <script src="../static/js/cols.js"></script> +</head> +<body> + <div id="root"> + <!-- 鏍囬 --> + <div id="top-tab"> + <h1>闆嗘垚椤圭洰杩涘害琛�</h1> + + <img src="../static/image/logo-bar.png" alt="logo"> + <div id="showTime"> + + </div> + </div> + <table id="proType" cellspacing="0" cellpadding="0"> + <thead id="type-header"></thead> + </table> + <div style="overflow-x: scroll"> + <table id="main-tab" cellspacing="0" cellpadding="0"> + <!-- 琛ㄥご --> + <thead id="tab-header"></thead> + <!-- 琛ㄨ韩浣� --> + <tbody id="tab-body"></tbody> + <!-- 娉ㄦ剰浜嬮」 --> + <tr><th>娉ㄦ剰浜嬮」</th></tr> + </table> + </div> + </div> + <div id="details"> + <div class="head"> + <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> + <tbody> + </tbody> + </table> + </div> + <div id="tips"> + <h3>鎻愮ず</h3> + <div id="text">褰撳墠椤圭洰璁″垝鏃堕棿涓嶅畬鏁达紱璇疯ˉ鍏呭畬鎴愬悗閲嶈瘯!</div> + <button id="closee" onclick="">纭� 璁�</button> + </div> +</body> +</html> +<script type="text/javascript"> + $("#close").on("click",function(){ + $("#details").attr("style","display:none") + }) + $("#closee").on("click",function(){ + $("#tips").attr("style","display:none") + }) +</script> \ No newline at end of file diff --git a/src/main/webapp/views/testview/testview.html b/src/main/webapp/views/testview/testview.html index 345a187..e18d635 100644 --- a/src/main/webapp/views/testview/testview.html +++ b/src/main/webapp/views/testview/testview.html @@ -2,77 +2,18 @@ <html lang="en"> <head> <meta charset="UTF-8"> - <title>Title</title> - <style> - *{ - margin: 0; - /*overflow: hidden;*/ - } - body { - background-color: #fcc499; - width: 100%; - min-height: 300px; - height: auto !important; - height: 300px - } - .header { - height: 8rem; - width: 100%; - background-color: #3F3F3F - } - .main { - width: 100%; - overflow: scroll; - background-color: #7a8191; - - } - .kuai { - height: 100%; - width: 20%; - display: inline-block; - background-color: #2D93CA; - } - .zuo { - float: left; - } - .you { - float: right; - } - .th { - height: 6rem; - width: 100px; - border: 1px solid #000000; - } - .td { - height: 8rem; - width: 15rem; - border: 1px solid #000000; - } - - - - .float { - left: 0; - top: 50px; - position: absolute; - background-color: #fff; - width: 92%; - margin-left: 4%; - min-height: 300px; - height: auto !important; - height: 300px; - box-shadow: 0px 0px 20px #888888; - } - </style> + <title>椤圭洰杩涘害琛�</title> + <link rel="stylesheet" href="../../static/css/style4.css"> </head> <body> - <div class="header"> - <div class="kuai zuo">left</div> - <div class="kuai you">right</div> - </div> - <div class="main"> - <table border="1" rules="all" style="width: 300%;height:200px; text-align:center"> - <thead> + <div id="root"> + <div class="header"> + <div class="kuai zuo">left</div> + <div class="kuai you">right</div> + </div> + <div class="main"> + <table border="1" rules="all" style="width: 300%;height:200px; text-align:center"> + <thead> <tr> <th class="th">涓�</th> <th class="th">浜�</th> @@ -85,8 +26,8 @@ <th class="th">涔�</th> <th class="th">鍗�</th> </tr> - </thead> - <tbody> + </thead> + <tbody> <tr> <td class="td">1</td> <td class="td">2</td> @@ -208,11 +149,27 @@ <!-- <td class="td">10</td>--> <!--</tr>--> - </tbody> + </tbody> - </table> + </table> + </div> + <div class="float"> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191">1</li> + <li style="height: 100px;background-color: #7a8191;margin-bottom: 100px">1</li> + </div> </div> - <div class="float"></div> + </body> </html> \ No newline at end of file -- Gitblit v1.9.1