Merge remote-tracking branch 'origin/master'

This commit is contained in:
lizhenhua 2025-07-24 09:51:48 +08:00
commit e31aa1efef
4 changed files with 84 additions and 33 deletions

View File

@ -5,10 +5,13 @@
} }
.tap-box div { .tap-box div {
padding: 4px 10px; text-align: center;
border-radius: 5px; padding: 8px 16px;
background: rgba(22, 186, 170, 0.2);
border-radius: 6px;
border: 1px solid rgba(22, 186, 170, 0.5);
transition: all 0.3s ease;
cursor: pointer; cursor: pointer;
border: 1px solid #e0e0e0;
} }
.tap-box div:last-child { .tap-box div:last-child {
@ -16,7 +19,9 @@
} }
.active { .active {
background-color: #0052cc; background: rgba(22, 186, 170, 0.8) !important;
border: 1px solid rgba(22, 186, 170, 0.8) !important;
color: #fff;
} }
.chart-box { .chart-box {
@ -25,6 +30,21 @@
} }
.chart-box-left, .chart-box-left,
.chart-box-right { .chart-box-right {
width: 50%; width: 48%;
height: 400px; height: 400px;
background: linear-gradient(
135deg,
rgba(22, 186, 170, 0.1) 0%,
rgba(22, 186, 170, 0.05) 100%
);
border: 1px solid rgba(22, 186, 170, 0.3);
border-radius: 12px;
padding: 20px;
position: relative;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.chart-box-left {
margin-right: 1%;
} }

View File

@ -80,7 +80,6 @@ function initTable(type, bidCode) {
function setCols(type) { function setCols(type) {
if (type === 1) { if (type === 1) {
// 工程质量分析
return [ return [
{ type: "numbers", title: "序号", width: "10%" }, // 添加序号列 { type: "numbers", title: "序号", width: "10%" }, // 添加序号列
{ {
@ -134,7 +133,7 @@ function initTable(type, bidCode) {
templet: (d) => { templet: (d) => {
let text = ""; let text = "";
text += text +=
'<a style="color: #007bff;cursor: pointer;font-size: 16px">导出</a>'; '<a id="exportBtn" style="color: #007bff;cursor: pointer;font-size: 16px">导出</a>';
return text; return text;
}, },
}, },

View File

@ -166,15 +166,14 @@ function initLineChart() {
trigger: "axis", trigger: "axis",
}, },
legend: { legend: {
show: true,
data: ["计划进度", "实际进度"], data: ["计划进度", "实际进度"],
textStyle: { textStyle: {
// 图例文字样式 // 图例文字样式
color: "#fff", // 图例文字颜色 color: "#fff", // 图例文字颜色
}, },
itemStyle: { itemStyle: {
color: function (name) { color: "auto",
return name === "计划进度" ? "#5470C6" : "#FF0000";
},
}, },
}, },
grid: { grid: {
@ -203,7 +202,9 @@ function initLineChart() {
}, },
itemStyle: { itemStyle: {
color: "#5470C6", color: "#5470C6",
borderWidth: 0, // 去除白色边框
}, },
symbolSize: 8, // 可以调整小圆点的大小
}, },
{ {
name: "实际进度", name: "实际进度",
@ -216,7 +217,9 @@ function initLineChart() {
}, },
itemStyle: { itemStyle: {
color: "#FF0000", color: "#FF0000",
borderWidth: 0, // 去除白色边框
}, },
symbolSize: 10, // 可以调整小圆点的大小
}, },
], ],
}; };

View File

@ -22,8 +22,7 @@
<script src="../../api/commonRequest.js"></script> <script src="../../api/commonRequest.js"></script>
<style> <style>
html { html {
width: 100%; width: 100%;height: 90%;margin-top: 3%;color: #009B94
height: 100%;
} }
@ -32,9 +31,9 @@
background-color: #008781; background-color: #008781;
} }
.shadow { /*.shadow {
background-color: #FFFFFF; background-color: #FFFFFF;
} }*/
.layui-laydate { .layui-laydate {
background-color: #009B94; background-color: #009B94;
@ -99,7 +98,7 @@
} }
</script> </script>
</head> </head>
<body style="width: 100%;height: 90%;margin-top: 4%;color: #009B94"> <body style="width: 100%;height: 100%;color: #FFFFFF">
<div class="max-w-[1440px] mx-auto px-4"> <div class="max-w-[1440px] mx-auto px-4">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<form class="layui-form" style="color: #009B94" action=""> <form class="layui-form" style="color: #009B94" action="">
@ -121,20 +120,20 @@
</form> </form>
</div> </div>
<div class="grid grid-cols-2 gap-6 mb-8"> <div class="grid grid-cols-2 gap-4 mb-2">
<div class=" p-6 rounded-lg shadow"> <div class="bg-[#002628] border border-[#004446] p-4 rounded-lg shadow">
<h3 class="text-lg font-bold mb-4">能耗趋势分析</h3> <h3 class="text-lg font-bold mb-1">能耗趋势分析</h3>
<div id="trendChart" style="height: 300px;"></div> <div id="trendChart" style="height: 280px;"></div>
</div> </div>
<div class=" p-6 rounded-lg shadow"> <div class="bg-[#002628] border border-[#004446] p-4 rounded-lg shadow">
<h3 class="text-lg font-bold mb-4">设备能耗占比</h3> <h3 class="text-lg font-bold mb-1">设备能耗占比</h3>
<div id="deviceChart" style="height: 300px;"></div> <div id="deviceChart" style="height: 280px;"></div>
</div> </div>
</div> </div>
<div class="grid grid-cols-2 gap-6 mb-8"> <div class="grid grid-cols-2 gap-4 mb-2">
<div class=" p-6 rounded-lg shadow"> <div class="bg-[#002628] border border-[#004446] p-4 rounded-lg shadow">
<h3 class="text-lg font-bold mb-4">节能减排措施落实情况</h3> <h3 class="text-lg font-bold mb-2">节能减排措施落实情况</h3>
<div class="space-y-4"> <div class="space-y-4">
<div> <div>
<div class="flex justify-between mb-1"> <div class="flex justify-between mb-1">
@ -165,10 +164,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="p-6 rounded-lg shadow"> <div class="bg-[#002628] p-4 rounded-lg shadow border border-[#004446]">
<h3 class="text-lg font-bold mb-4">能耗异常分析</h3> <h3 class="text-lg font-bold mb-2">能耗异常分析</h3>
<div id="alarm-container" class="space-y-4" <div id="alarm-container" class="space-y-4"
style="overflow-x: auto; max-height: 130px; overflow-y: auto;"></div> style="height: 280px; overflow-y: auto;"></div>
</div> </div>
</div> </div>
@ -347,8 +346,14 @@
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
textStyle: {
color: '#FFFFFF'
},
legend: { legend: {
data: ['能源消耗量', '节能减排量'] data: ['能源消耗量', '节能减排量'],
textStyle: {
color: '#FFFFFF'
}
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -367,13 +372,27 @@
series: [{ series: [{
name: '能源消耗量', name: '能源消耗量',
type: 'line', type: 'line',
data: consumptionKwh data: consumptionKwh,
label: {
show: true,
position: 'top',
color: '#FFFFFF',
fontSize: 12,
formatter: '{c}'
}
}, { }, {
name: '节能减排量', name: '节能减排量',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
data: renewableUsedKwh data: renewableUsedKwh,
}] label: {
show: true,
position: 'top',
color: '#FFFFFF',
fontSize: 12,
formatter: '{c}'
}
},]
}); });
} }
@ -392,6 +411,9 @@
type: 'shadow' type: 'shadow'
} }
}, },
textStyle: {
color: '#FFFFFF'
},
xAxis: { xAxis: {
type: 'value' type: 'value'
}, },
@ -403,7 +425,14 @@
type: 'bar', type: 'bar',
data: consumptionKwh, data: consumptionKwh,
itemStyle: { itemStyle: {
color: '#22c55e' color: '#00C6BE'
},
label: {
show: true, // 开启显示
position: 'right', // 数值显示在柱状图右侧(柱子尾部)
color: '#FFFFFF', // 设置字体颜色,根据背景可调整
fontSize: 12,
formatter: '{c}' // 显示对应的数值
} }
}] }]
}); });