数据分析-
This commit is contained in:
parent
2eb8eebde6
commit
43c3c63241
|
|
@ -29,8 +29,51 @@ layui.use(["layer", "table", "form", "laydate"], function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
initData(startTime , endTime);
|
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() {
|
function query() {
|
||||||
let startTime = "";
|
let startTime = "";
|
||||||
let endTime = "";
|
let endTime = "";
|
||||||
|
|
@ -42,6 +85,7 @@ function query() {
|
||||||
endTime = "";
|
endTime = "";
|
||||||
}
|
}
|
||||||
initData(startTime, endTime);
|
initData(startTime, endTime);
|
||||||
|
getProProgress(startTime, endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取数据
|
// 获取数据
|
||||||
|
|
@ -118,8 +162,7 @@ function initData(startTime, endTime) {
|
||||||
initProjectCost(projectCost);
|
initProjectCost(projectCost);
|
||||||
initProjectRisk(todayRisk);
|
initProjectRisk(todayRisk);
|
||||||
|
|
||||||
initCivilEngineering(civilEngineering);
|
|
||||||
initElectrical(electrical);
|
|
||||||
initItemCost(projectCostList);
|
initItemCost(projectCostList);
|
||||||
initTotalRisk(projectRisk);
|
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) {
|
function initCivilEngineering(date) {
|
||||||
const xLabel = date.map((item) => item.date);
|
const xLabel = date.map((item) => item.day);
|
||||||
const expenditureData = date.map((item) => item.plannedCount);
|
const expenditureData = date.map((item) => item.tjplanNum);
|
||||||
const incomeData = date.map((item) => item.actualCount);
|
const incomeData = date.map((item) => item.tjexeNum);
|
||||||
const leftChart = echarts.init(document.getElementById("civilEngineering"));
|
const leftChart = echarts.init(document.getElementById("civilEngineering"));
|
||||||
const option = {
|
const option = {
|
||||||
title: {
|
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) {
|
function initElectrical(data) {
|
||||||
const xLabel = data.map((item) => item.date);
|
const xLabel = data.map((item) => item.day);
|
||||||
const expenditureData = data.map((item) => item.plannedCount);
|
const expenditureData = data.map((item) => item.dqplanNum);
|
||||||
const incomeData = data.map((item) => item.actualCount);
|
const incomeData = data.map((item) => item.dqexeNum);
|
||||||
const leftChart = echarts.init(document.getElementById("electrical"));
|
const leftChart = echarts.init(document.getElementById("electrical"));
|
||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue