From 73f20adcdf2bfcb8fa61470bd050f948cfc04e7b Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Thu, 24 Jul 2025 10:42:33 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
js/pages/newDataAnalysis/projectManagement.js | 10 +++
js/pages/newDataAnalysis/projectProgress.js | 80 ++++++++++++++++++-
2 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/js/pages/newDataAnalysis/projectManagement.js b/js/pages/newDataAnalysis/projectManagement.js
index 825ba16..dbc38b2 100644
--- a/js/pages/newDataAnalysis/projectManagement.js
+++ b/js/pages/newDataAnalysis/projectManagement.js
@@ -75,6 +75,16 @@ function initTable(type, bidCode) {
},
done: function (res, curr, count, origin) {
// console.log(res);
+
+ $(".layui-table-body table.layui-table tbody tr #exportBtn").on(
+ "click",
+ function () {
+ // 获取当前行的数据
+ var index = $(this).index();
+ var rowData = res.rows[index]; // 获取对应行的数据
+ console.log(rowData, "rowData导出");
+ }
+ );
},
});
diff --git a/js/pages/newDataAnalysis/projectProgress.js b/js/pages/newDataAnalysis/projectProgress.js
index 9b1d63d..a30de1a 100644
--- a/js/pages/newDataAnalysis/projectProgress.js
+++ b/js/pages/newDataAnalysis/projectProgress.js
@@ -26,7 +26,16 @@ function setCols(type) {
{ field: "processDiff", title: "进度偏差", align: "center" },
{ field: "completeEffort", title: "已完成工程量", align: "center" },
{ field: "totalEffort", title: "总工程量", align: "center" },
- { field: "delayActor", title: "延误因素分析", align: "center" },
+ {
+ title: "延误因素分析",
+ align: "center",
+ templet: (d) => {
+ let text = "";
+ text +=
+ '查看';
+ return text;
+ },
+ },
{
field: "resourceMatchStatus",
title: "资源匹配状态",
@@ -114,6 +123,64 @@ function initTable(type, bidCode) {
if (res.code !== 200 || !res.rows || res.rows.length === 0) {
layer.msg("暂无数据", { icon: 2 });
}
+
+ // 查看按钮点击
+ $(".layui-table-body table.layui-table tbody tr #viewBtn").on(
+ "click",
+ function () {
+ // 获取当前行的数据
+ var index = $(this).index();
+ var rowData = res.rows[index]; // 获取对应行的数据
+
+ // 弹框配置
+ layer.open({
+ type: 1,
+ title: "分析查看",
+ content:
+ "
" +
+ "
延误原因:" +
+ rowData.delayActor +
+ "
" +
+ "
其他原因:" +
+ rowData.delayActor +
+ "
" +
+ "
分析结果:" +
+ rowData.delayActor +
+ "
" +
+ "
分析结论:" +
+ rowData.delayActor +
+ "
" +
+ "
",
+ area: ["600px", "auto"],
+ shade: 0.3, // 遮罩透明度
+ skin: "custom-layer-style", // 自定义皮肤
+ success: function (layero, index) {
+ // 修改弹框背景颜色
+ $(layero).css(
+ "background",
+ "rgba(13, 34, 37, 0.9)"
+ ); // 半透明黑色背景
+ $(layero).find(".layui-layer-title").css({
+ fontSize: "18px",
+ color: "#fff", // 标题文字颜色
+ background: "transparent", // 标题背景透明
+ "border-bottom":
+ "1px solid rgba(255, 255, 255, 0.2)", // 标题底部边框
+ });
+ $(layero).find(".layui-layer-content").css({
+ background: "transparent", // 内容区域透明
+ });
+
+ $(layero)
+ .find(".layui-layer-setwin .layui-layer-close")
+ .css({
+ color: "#fff", // 文字颜色
+ "border-color": "#fff", // 边框颜色(如果按钮有边框)
+ });
+ },
+ });
+ }
+ );
},
error: function () {
layer.msg("数据加载失败", { icon: 2 });
@@ -121,6 +188,8 @@ function initTable(type, bidCode) {
});
}
+$(".chart-box").hide();
+
$(".list-view").click(function () {
if ($(this).hasClass("active")) return;
@@ -255,6 +324,11 @@ function initPieChart() {
top: "center", // 垂直居中
textStyle: {
color: "#fff", // 图例文字颜色设为白色
+ borderWidth: 0,
+ borderColor: "transparent",
+ },
+ itemStyle: {
+ borderWidth: 0, // 关键点:去除 legend 图例项(小色块)的边框
},
data: ["大气影响", "设备判断延迟", "人员不足", "设计变更", "其他"],
},
@@ -273,8 +347,8 @@ function initPieChart() {
},
itemStyle: {
borderRadius: 5, // 每块扇形圆角效果
- borderColor: "#000", // 边框颜色(用于间隙)
- borderWidth: 1, // 边框宽度(1px 每边,形成 2px 间隙)
+ borderColor: "#333", // 边框颜色(用于间隙)
+ borderWidth: 2, // 边框宽度(1px 每边,形成 2px 间隙)
},
data: [
{
From 8b5afaf6a40e0dd83a1008a0e07be93f87d8eeb8 Mon Sep 17 00:00:00 2001
From: cwchen <1048842385@qq.com>
Date: Thu, 24 Jul 2025 11:14:56 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resourceRateAnalysis_api.js | 15 +++---
pages/newDataAnalysis/overallEfficiency.html | 54 +++++++++++++------
.../newDataAnalysis/resourceRateAnalysis.html | 21 +++++---
3 files changed, 61 insertions(+), 29 deletions(-)
diff --git a/js/pages/newDataAnalysis/resourceRateAnalysis_api.js b/js/pages/newDataAnalysis/resourceRateAnalysis_api.js
index dd2c2f8..0a7382d 100644
--- a/js/pages/newDataAnalysis/resourceRateAnalysis_api.js
+++ b/js/pages/newDataAnalysis/resourceRateAnalysis_api.js
@@ -195,7 +195,7 @@ function initUtilizationChart(distributionData) {
name: '资源利用率',
type: 'pie',
radius: ['40%', '70%'],
- center: ['65%', '50%'],
+ center: ['65%', '40%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 8,
@@ -313,15 +313,15 @@ function initTrendsChart(trendsData) {
textStyle: {
color: '#16baaa'
},
- top: 10
+ // top: 10
},
- grid: {
+ /* grid: {
left: '3%',
right: '4%',
- bottom: '3%',
- top: '15%',
+ bottom: '0%',
+ top: '5%',
containLabel: true
- },
+ }, */
xAxis: {
type: 'category',
boundaryGap: false,
@@ -475,6 +475,9 @@ function showNoDataMessage() {
};
trendsChart.setOption(option);
+ window.addEventListener("resize", function () {
+ trendsChart.resize();
+ });
}
/**
diff --git a/pages/newDataAnalysis/overallEfficiency.html b/pages/newDataAnalysis/overallEfficiency.html
index cb03e5e..da64049 100644
--- a/pages/newDataAnalysis/overallEfficiency.html
+++ b/pages/newDataAnalysis/overallEfficiency.html
@@ -3,19 +3,19 @@
- 工地整体效能分析系统
+ 工地整体效能分析
diff --git a/pages/newDataAnalysis/resourceRateAnalysis.html b/pages/newDataAnalysis/resourceRateAnalysis.html
index 7e6726d..3422243 100644
--- a/pages/newDataAnalysis/resourceRateAnalysis.html
+++ b/pages/newDataAnalysis/resourceRateAnalysis.html
@@ -13,9 +13,9 @@
-
+
-
+
@@ -31,10 +31,14 @@