From 320ed3f4782f9662f79ecfe14d2cf3f34dd288c5 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 01 八月 2023 19:52:36 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/tableData2.js | 95 ++++++++--------------------------------------- 1 files changed, 17 insertions(+), 78 deletions(-) diff --git a/src/main/webapp/static/js/tableData2.js b/src/main/webapp/static/js/tableData2.js index e9a6568..971b37e 100644 --- a/src/main/webapp/static/js/tableData2.js +++ b/src/main/webapp/static/js/tableData2.js @@ -3,22 +3,22 @@ getThbodyData() getType() }, 0) -setInterval(function () { - getThbodyData() -}, 5000) +//setInterval(function () { +// getThbodyData() +//}, 5000) //琛ㄥご灏忚繘搴﹁〃 var getType = function () { $.ajax({ - url: baseurl + '/pms/projectPlan/dataSummary', + url: baseUrl + '/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.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>' @@ -48,7 +48,7 @@ //} $.ajax({ - url:baseurl+'/pms/projectPlan/flowStatus', + url:baseUrl+'/projectPlan/flowStatus', type:'GET', dataType:'JSON', data:{}, @@ -74,70 +74,9 @@ } /*****************************************************************************************************************************************************************************/ -var resMap = [ - { - endDay:"2023-01-16 00:00:00", - id:"cs001", - plandeAmt:10000, - planinAmt: 50000, - presaleAmt: 5000000, - realdeAmt: 9000, - realinAmt: 40000, - startDay:"2022-09-15 00:00:00", - type: "妯寮�", - nodes:[{name: '涓氬姟涓嬪崟', startTime: '2022-09-10', endTime$: '2022-09-15', realStartTime$: '2022-09-10', realEndTime$: '2022-09-15'}, - {name: '棰勪粯娆�', startTime: '2022-09-15', endTime$: '2022-09-26', realStartTime$: '2022-09-15', realEndTime$: '2022-09-26'}, - {name: 'BOM涓婅〃', startTime: '2022-09-20', endTime$: '2022-09-30', realStartTime$: '2022-09-20', realEndTime$: '2022-09-30'}, - {name: '鐗╂枡璇疯喘', startTime: '2022-09-30', endTime$: '2022-10-10', realStartTime$: '2022-09-30', realEndTime$: '2022-10-10'}, - {name: '鏂藉伐璁″垝涔�', startTime: '2022-10-05', endTime$: '2022-10-18', realStartTime$: '2022-10-05', realEndTime$: '2022-10-18'}, - {name: '鐢熶骇璁″垝', startTime: '2022-10-18', endTime$: '2022-11-30', realStartTime$: '2022-10-18', realEndTime$: '2022-11-30'}, - {name: '鍖呰璁捐', startTime: '2022-10-25', endTime$: '2022-10-30', realStartTime$: '2022-10-25', realEndTime$: '2022-10-30'}, - {name: '瑁呰溅璁捐', startTime: '2022-10-26', endTime$: '2022-10-30', realStartTime$: '2022-10-26', realEndTime$: '2022-10-30'}, - {name: '鍙戣揣璁″垝涔�', startTime: '2022-10-27', endTime$: '2022-10-28', realStartTime$: '2022-10-27', realEndTime$: '2022-10-28'}, - {name: '鐢熶骇鍒朵綔', startTime: '2022-11-01', endTime$: '2022-12-05', realStartTime$: '2022-11-01', realEndTime$: '2022-12-05'}, - {name: '鍙戣揣', startTime: '2022-12-06', endTime$: '2022-12-10', realStartTime$: '2022-12-06', realEndTime$: '2022-12-10'}, - {name: '瀹夎闃熺‘璁�', startTime: '2022-12-15', endTime$: '2022-12-20', realStartTime$: '2022-12-15', realEndTime$: '2022-12-20'}, - {name: '鐗╂祦鍏徃纭', startTime: '2022-12-20', endTime$: '2022-12-30', realStartTime$: '2022-12-20', realEndTime$: '2022-12-30'}, - {name: '瀹夎', startTime: '2022-12-01', endTime$: '2022-12-15', realStartTime$: '2022-12-01', realEndTime$: '2022-12-15'}, - {name: '瀹屽伐鍗曠璁�', startTime: '2022-12-16', endTime$: '2022-12-18', realStartTime$: '2022-12-16', realEndTime$: '2022-12-18'}, - {name: '楠屾敹', startTime: '2023-01-06', endTime$: '2023-01-10', realStartTime$: '2023-01-06', realEndTime$: '2023-01-10'}, - {name: '鎬荤粨鎶ュ憡', startTime: '2023-01-15', endTime$: '2023-01-16', realStartTime$: '2023-01-15', realEndTime$: '2023-01-16'} - ] -}, - { - endDay:"2022-09-30 00:00:00", - id:"cs001", - plandeAmt:10000, - planinAmt: 50000, - presaleAmt: 5000000, - realdeAmt: 9000, - realinAmt: 40000, - startDay:"2022-09-15 00:00:00", - type: "妯寮�", - nodes:[{name: '涓氬姟涓嬪崟', startTime: '2022-09-10', endTime$: '2022-09-10', realStartTime$: '2022-09-30', realEndTime$: '2022-09-09'}, - {name: '棰勪粯娆�', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'}, - {name: 'BOM涓婅〃', startTime: '2022-09-24', endTime$: '2022-09-24', realStartTime$: '2022-09-25', realEndTime$: '2022-09-25'}, - {name: '鐗╂枡璇疯喘', startTime: '2022-09-30', endTime$: '2022-09-30', realStartTime$: '2022-09-29', realEndTime$: '2022-09-29'}, - {name: '鏂藉伐璁″垝涔�', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'}, - {name: '鐢熶骇璁″垝', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'}, - {name: '鍖呰璁捐', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-06', realEndTime$: '2022-09-06'}, - {name: '瑁呰溅璁捐', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'}, - {name: '鍙戣揣璁″垝涔�', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'}, - {name: '鐢熶骇鍒朵綔', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'}, - {name: '鍙戣揣', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-06', realEndTime$: '2022-09-06'}, - {name: '瀹夎闃熺‘璁�', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-06', realEndTime$: '2022-09-06'}, - {name: '鐗╂祦鍏徃纭', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-06', realEndTime$: '2022-09-06'}, - {name: '瀹夎', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-06', realEndTime$: '2022-09-06'}, - {name: '瀹屽伐鍗曠璁�', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-06', realEndTime$: '2022-09-06'}, - {name: '楠屾敹', startTime: '2022-09-06', endTime$: '2022-09-06', realStartTime$: '2022-09-27', realEndTime$: '2022-09-30'}, - {name: '鎬荤粨鎶ュ憡', startTime: '2022-09-26', endTime$: '2022-09-26', realStartTime$: '2022-09-26', realEndTime$: '2022-09-26'} - ] - }, - -]; var getThbodyData = function () { $.ajax({ - url: baseurl + '/pms/projectPlan/toFront/common', + url: baseUrl + '/projectPlan/toFront/common', type: 'GET', dataType: 'JSON', data: {}, @@ -145,7 +84,6 @@ if (res.code == 200) { console.log(res) data = res.data - //data = resMap // 鍒ゆ柇鏃堕棿鏄惁鏈塶ull 鏈塶ull鐨勬敼涓� "" for (var i = 0; i < data.length; i++) { var dataNode = data[i].projectPlans @@ -173,10 +111,11 @@ } str = '' for (var j = 0; j < node.length; j++) { - var nodeName = node[j].flowId$ // 鑺傜偣鍚嶇О + var weightNum = node[j].weightNum + var itemId = node[j].itemId 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>' + str1 = '<td class="normal" id="item-'+ itemId + '-' + weightNum +'">' + '<p>' + nodeEndTime + '</p>' + '<p>' + nodeRealStartTime + '</p>' + '</td>' str = str + str1 } var str2 = '<tr id="row' + i + '" class="row">' @@ -222,15 +161,15 @@ if (ExDay > -86400000 && ExDay < 86400000) { // 涓夊ぉ鍐� - $("#tab-body").find('tr').eq(t).find("td").eq(k + 3).attr("style", "background:#CC9933"); + $("#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 + 3).attr("style", "background:#CC3333"); + $("#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 + 3).attr("style", "background:#2e4e7e") + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#2e4e7e") } } else { function tab(date1, date2) { @@ -238,9 +177,9 @@ var oDate2 = new Date(date2); var x = oDate1.getTime() - oDate2.getTime() if (x >= 0) { - $("#tab-body").find('tr').eq(t).find("td").eq(k + 3).attr("style", "background:#009966") + $("#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 + 3).attr("style", "background:#CC3333"); + $("#tab-body").find('tr').eq(t).find("td").eq(k + 2).attr("style", "background:#CC3333"); } } -- Gitblit v1.9.1