diff --git a/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js b/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js
index dfd4ddd..f458ce7 100644
--- a/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js
+++ b/js/pages/newDataAnalysis/engineeringSafetyAnalysis.js
@@ -35,14 +35,16 @@ function initTable(bidCode,name) {
},
cols: [[
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
+ { field: 'proName', title: '工程名称', align: 'center', width: '10%' },
+ { field: 'workLocation', title: '作业地点', align: 'center', width: '10%' },
{ field: 'monitoringPointId', title: '监测点编号', align: 'center', width: '10%' },
- { field: 'name', title: '监测点名称', align: 'center', width: '20%' },
- { field: 'temperature', title: '当前温度', align: 'center', width: '10%' },
- { field: 'humidity', title: '当前湿度', align: 'center', width: '10%' },
- { field: 'windSpeed', title: '当前风速', align: 'center', width: '10%' },
- { field: 'gasValue', title: '当前气体值', align: 'center', width: '10%' },
+ { field: 'name', title: '监测点名称', align: 'center', width: '10%' },
+ { field: 'temperature', title: '当前温度', align: 'center', width: '8%' },
+ { field: 'humidity', title: '当前湿度', align: 'center', width: '8%' },
+ { field: 'windSpeed', title: '当前风速', align: 'center', width: '8%' },
+ { field: 'gasValue', title: '当前气体值', align: 'center', width: '8%' },
{
- field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '20%',
+ field: 'rateLevel', title: '最高隐患等级', align: 'center', width: '10%',
templet: function (d) {
let color = '';
if (d.level == "一般隐患") {
@@ -54,6 +56,14 @@ function initTable(bidCode,name) {
}
return '
' + d.level + '
';
}
+ },
+ {
+ title: "操作",
+ align: "center",
+ width: '8%',
+ templet: function (row) {
+ return ` 分析与改进`
+ },
}
]],
initComplete: function () {
@@ -305,3 +315,59 @@ function initEchartsTwo(data) {
}
myChart2.setOption(riskOption, true)
}
+
+function handlDetails(analysisReason){
+ // 分离原因分析和改进措施
+ const [reason, measure] = analysisReason.match(/原因分析:(.*)。改进措施:(.*)/).slice(1);
+
+ // 创建一个包含分析原因及改进措施的HTML结构
+ const content = `
+
+
+
分析原因及改进措施
+
+
+ 原因分析:
+ ${reason}
+
+
+ 改进措施:
+ ${measure}
+
+
+
+
+
+ `;
+ layer.open({
+ type: 1,
+ title: "分析原因及改进措施",
+ content: content,
+ area: ["400px", "300px"],
+ 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({
+ 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", // 边框颜色(如果按钮有边框)
+ });
+ },
+ });
+}
diff --git a/js/pages/newDataAnalysis/projectManagement.js b/js/pages/newDataAnalysis/projectManagement.js
index 825ba16..cda0285 100644
--- a/js/pages/newDataAnalysis/projectManagement.js
+++ b/js/pages/newDataAnalysis/projectManagement.js
@@ -74,7 +74,15 @@ 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: [
{
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/js/pages/newDataAnalysis/workerEfficiencyAnalysis.js b/js/pages/newDataAnalysis/workerEfficiencyAnalysis.js
index 2d05800..0fe5eba 100644
--- a/js/pages/newDataAnalysis/workerEfficiencyAnalysis.js
+++ b/js/pages/newDataAnalysis/workerEfficiencyAnalysis.js
@@ -1,5 +1,12 @@
let table, layer, form;
let myChart = null, myChart2 = null;
+const tipsArr = [
+ '定期开展技能培训与考核,并对施工工具进行例行检查,确保安全与效率。',
+ '加强技能培训,定期组织考试,同时落实施工工具的日常检查制度。',
+ '定期安排技能培训及考核,并严格执行施工工具的定期检查管理。',
+ '持续强化技能培训与考核,同时确保施工工具按时检查,保障作业安全。',
+ '定期组织技能培训和考试,并做好施工工具的维护与定期检查工作。',
+];
layui.use(['layer', 'table', 'form'], function () {
layer = layui.layer;
table = layui.table;
@@ -141,7 +148,9 @@ function initEcharts(data) {
let unitTimeOutput = parseFloat(data.unitTimeOutput) || 0;
if (unitTimeOutput < min) {
initEchartsTwo(data);
- $('#suggestion').append('建议:定期加强技能培训和考试,并且针对施工工具安排定期检查
');
+ const randomIndex = Math.floor(Math.random() * tipsArr.length); // 生成 0~4 的随机整数
+ const randomItem = tipsArr[randomIndex];
+ $('#suggestion').append('建议:'+randomItem+'
');
}
}
diff --git a/pages/newDataAnalysis/overallEfficiency.html b/pages/newDataAnalysis/overallEfficiency.html
index cb03e5e..35800b8 100644
--- a/pages/newDataAnalysis/overallEfficiency.html
+++ b/pages/newDataAnalysis/overallEfficiency.html
@@ -3,19 +3,19 @@
- 工地整体效能分析系统
+ 工地整体效能分析
@@ -655,8 +683,8 @@
let url = commonUrl + "screen/Dashapi/pages/dashInfo";
ajaxRequest(url, "get", "", true, function () {
}, function (result) {
- console.log("22222222222222222")
- console.log(JSON.stringify(result));
+ // console.log("22222222222222222")
+ // console.log(JSON.stringify(result));
pageData=result;
initPage();
}, function (xhr, status, error) {
@@ -745,7 +773,8 @@
});
// 渲染页脚
- document.getElementById('footer-text').textContent = pageData.footer;
+ // document.getElementById('footer-text').textContent = pageData.footer;
+ document.getElementById('footer-text').textContent = '';
}
// 渲染二级页面
@@ -920,7 +949,8 @@
left: 'center',
textStyle: {
fontSize: 16,
- fontWeight: 'bold'
+ fontWeight: 'bold',
+ color:'#fff'
}
},
tooltip: {
@@ -934,13 +964,29 @@
},
xAxis: {
type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'].slice(0, data.length)
+ data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'].slice(0, data.length),
+ axisLabel: {
+ textStyle: {
+ color: '#fff', // 文字颜色
+ fontSize: 12 // 文字像素
+ }
+ },
},
yAxis: {
type: 'value',
name: '百分比 (%)',
min: 0,
- max: 100
+ max: 100,
+ nameTextStyle: {
+ color: '#fff',
+ fontSize: 14
+ },
+ axisLabel: {
+ textStyle: {
+ color: '#fff', // 文字颜色
+ fontSize: 12 // 文字像素
+ }
+ },
},
series: [
{
@@ -948,9 +994,15 @@
type: 'line',
data: data,
smooth: true,
+ label: {
+ show: true, // 线条折点处显示值
+ position: 'top', // 标签的位置
+ color: "#fff", // 文字颜色
+ fontSize: 12, // 文字像素
+ },
lineStyle: {
width: 3,
- color: '#1a3a5f'
+ color: '#20d3c2'
},
itemStyle: {
color: '#2c5c8c'
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 @@