From 43c3c63241c153aaf272181b4811deb3ba400ee7 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Tue, 28 Oct 2025 09:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90-?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataAnalysisOctober/projectManagement.js | 151 ++++++------------ 1 file changed, 51 insertions(+), 100 deletions(-) diff --git a/js/pages/dataAnalysisOctober/projectManagement.js b/js/pages/dataAnalysisOctober/projectManagement.js index 69ff45e..5ea07e9 100644 --- a/js/pages/dataAnalysisOctober/projectManagement.js +++ b/js/pages/dataAnalysisOctober/projectManagement.js @@ -29,8 +29,51 @@ layui.use(["layer", "table", "form", "laydate"], function () { } initData(startTime , endTime); + + //echarts图 + getProProgress(startTime, endTime); }); +function getProProgress(startTime, endTime){ + const url = + commonUrl + + "screen/proProgress/selectProProgress?startTime=" + startTime + "&endTime=" + endTime; + ajaxRequestGet( + url, + "GET", + true, + function () { + }, + function (result) { + if (result.code === 200) { + setData(result); + } else if (result.code === 500) { + setData(result); + } else if (result.code === 401) { + loginout(1); + } + }, + function (xhr, status, error) { + errorFn(xhr, status, error); + setData(null); + }, + aqEnnable + ); + + function setData(data) { + if(data.code === 200){ + var list = data.data + initCivilEngineering(list); + initElectrical(list); + + }else{ + layer.msg(data.msg || "暂无数据"); + initCivilEngineering("") + initElectrical("") + } + } +} + function query() { let startTime = ""; let endTime = ""; @@ -42,6 +85,7 @@ function query() { endTime = ""; } initData(startTime, endTime); + getProProgress(startTime, endTime); } // 获取数据 @@ -118,8 +162,7 @@ function initData(startTime, endTime) { initProjectCost(projectCost); initProjectRisk(todayRisk); - initCivilEngineering(civilEngineering); - initElectrical(electrical); + initItemCost(projectCostList); initTotalRisk(projectRisk); }, @@ -436,56 +479,10 @@ function initProjectRisk(projectRisk) { }); } -function getCivilEngineering() { - let xLabel = [ - "xxxx-xx-01", - "xxxx-xx-02", - "xxxx-xx-03", - "xxxx-xx-04", - "xxxx-xx-05", - "xxxx-xx-06", - "xxxx-xx-07", - "xxxx-xx-08", - "xxxx-xx-09", - "xxxx-xx-10", - "xxxx-xx-11", - "xxxx-xx-12", - ]; - let expenditureData = [ - "12", - "15", - "4", - "8", - "13", - "6", - "10", - "11", - "5", - "12", - "10", - "15", - ]; - let incomeData = [ - "4", - "5", - "5", - "5", - "5", - "4", - "3", - "5", - "3", - "16", - "5", - "18", - ]; - initCivilEngineering(xLabel, expenditureData, incomeData); -} - function initCivilEngineering(date) { - const xLabel = date.map((item) => item.date); - const expenditureData = date.map((item) => item.plannedCount); - const incomeData = date.map((item) => item.actualCount); + const xLabel = date.map((item) => item.day); + const expenditureData = date.map((item) => item.tjplanNum); + const incomeData = date.map((item) => item.tjexeNum); const leftChart = echarts.init(document.getElementById("civilEngineering")); const option = { title: { @@ -715,56 +712,10 @@ function initCivilEngineering(date) { }); } -function getElectrical() { - let xLabel = [ - "xxxx-xx-01", - "xxxx-xx-02", - "xxxx-xx-03", - "xxxx-xx-04", - "xxxx-xx-05", - "xxxx-xx-06", - "xxxx-xx-07", - "xxxx-xx-08", - "xxxx-xx-09", - "xxxx-xx-10", - "xxxx-xx-11", - "xxxx-xx-12", - ]; - let expenditureData = [ - "12", - "15", - "4", - "8", - "13", - "6", - "10", - "11", - "5", - "12", - "10", - "15", - ]; - let incomeData = [ - "4", - "5", - "5", - "5", - "5", - "4", - "3", - "5", - "3", - "16", - "5", - "18", - ]; - initElectrical(xLabel, expenditureData, incomeData); -} - function initElectrical(data) { - const xLabel = data.map((item) => item.date); - const expenditureData = data.map((item) => item.plannedCount); - const incomeData = data.map((item) => item.actualCount); + const xLabel = data.map((item) => item.day); + const expenditureData = data.map((item) => item.dqplanNum); + const incomeData = data.map((item) => item.dqexeNum); const leftChart = echarts.init(document.getElementById("electrical")); const option = { title: {