From b905e07c63f23a03d95489cd0546cbe3b737cf23 Mon Sep 17 00:00:00 2001
From: wangyunfei <1224056307@qq,com>
Date: Tue, 14 Oct 2025 14:40:56 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business_envinformation/background8.svg | 16 ++
.../components/PollutionSourceManagement.js | 245 +++++++++++++-----
.../components/PollutionSourceManagement.less | 101 +++++++-
.../DischargePermitManagement.less | 7 +-
.../ProtectionFacilityMaintenance.js | 6 +-
.../ProtectionFacilityMaintenance.less | 4 +-
.../WasteGasPollutionControl.less | 10 +-
.../WastewaterFacilityManagement.less | 4 +-
8 files changed, 305 insertions(+), 88 deletions(-)
create mode 100644 src/assets/business_envinformation/background8.svg
diff --git a/src/assets/business_envinformation/background8.svg b/src/assets/business_envinformation/background8.svg
new file mode 100644
index 0000000..2f5450a
--- /dev/null
+++ b/src/assets/business_envinformation/background8.svg
@@ -0,0 +1,16 @@
+
diff --git a/src/pages/business_envInformation/components/PollutionSourceManagement.js b/src/pages/business_envInformation/components/PollutionSourceManagement.js
index 69c9f23..1aa227f 100644
--- a/src/pages/business_envInformation/components/PollutionSourceManagement.js
+++ b/src/pages/business_envInformation/components/PollutionSourceManagement.js
@@ -9,6 +9,7 @@ const { Option } = Select;
const PollutionSourceManagement = () => {
const [loading, setLoading] = useState(false);
+ const [chartReady, setChartReady] = useState(false);
const [tableData, setTableData] = useState({
list: [],
pagination: {
@@ -18,53 +19,136 @@ const PollutionSourceManagement = () => {
}
});
- // 污染物排放统计图表配置
+ // 确保DOM准备好后再渲染图表
+ useEffect(() => {
+ const timer = setTimeout(() => {
+ setChartReady(true);
+ }, 100);
+ return () => clearTimeout(timer);
+ }, []);
+
+ // 污染物排放统计图表配置 - 闭合环图+进度饼图
const pollutantEmissionOption = {
tooltip: {
- trigger: 'item',
- formatter: '{a}
{b}: {c} ({d}%)'
+ show: false
},
- series: [{
- name: '污染物排放',
- type: 'pie',
- radius: ['40%', '70%'],
- center: ['50%', '50%'],
- data: [
- { value: 62, name: '超标污染物数量', itemStyle: { color: '#ff6b6b' } },
- { value: 38, name: '正常污染物数量', itemStyle: { color: '#4ecdc4' } }
- ],
- emphasis: {
+ series: [
+ // 外层闭合环图
+ {
+ name: '外层环',
+ type: 'pie',
+ radius: ['58%', '80%'],
+ center: ['50%', '50%'],
+ data: [{ value: 100, name: '外层环' }],
itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
+ color: '#F6F1E8',
+ shadowBlur: 4,
+ shadowColor: '#FFF5F0',
+ shadowOffsetY: 4,
+ borderRadius: 10,
+ borderColor: 'rgba(255, 227, 208, 0.6)', // 外边框颜色
+ borderWidth: 2
+ },
+ label: { show: false },
+ labelLine: { show: false },
+ silent: true
+ },
+ // 内层进度饼图
+ {
+ name: '进度饼图',
+ type: 'pie',
+ radius: ['61%', '77%'],
+ center: ['50%', '50%'],
+ data: [
+ {
+ value: 62,
+ name: '超标污染物数量',
+ itemStyle: {
+ color: {
+ type: 'linear',
+ x: 0, y: 0, x2: 1, y2: 1,
+ colorStops: [
+ { offset: 0, color: '#FFF4B3' },
+ { offset: 0.5, color: '#FF8351' },
+ { offset: 1, color: '#FF7125' }
+ ]
+ },
+ borderRadius: 10
+ }
+ },
+ {
+ value: 38,
+ name: '剩余',
+ itemStyle: { color: 'transparent' }
+ }
+ ],
+ label: { show: false },
+ labelLine: { show: false },
+ silent: true
}
- }]
+ ]
};
+ // 超标污染物种类统计图表配置 - 闭合环图+进度饼图
const pollutantTypeOption = {
tooltip: {
- trigger: 'item',
- formatter: '{a}
{b}: {c} ({d}%)'
+ show: false
},
- series: [{
- name: '污染物种类',
- type: 'pie',
- radius: ['40%', '70%'],
- center: ['50%', '50%'],
- data: [
- { value: 25, name: '超标污染物种类', itemStyle: { color: '#a8e6cf' } },
- { value: 75, name: '正常污染物种类', itemStyle: { color: '#ffd3a5' } }
- ],
- emphasis: {
+ series: [
+ // 外层闭合环图
+ {
+ name: '外层环',
+ type: 'pie',
+ radius: ['58%', '80%'],
+ center: ['50%', '50%'],
+ data: [{ value: 100, name: '外层环' }],
itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
+ color: '#F2F0FF',
+ shadowBlur: 4,
+ shadowColor: '#F2F0FF',
+ shadowOffsetY: 4,
+ borderRadius: 10,
+ borderColor: '#E4E1FB', // 外边框颜色
+ borderWidth: 2
+ },
+ label: { show: false },
+ labelLine: { show: false },
+ silent: true
+ },
+ // 内层进度饼图
+ {
+ name: '进度饼图',
+ type: 'pie',
+ radius: ['61%', '77%'],
+ center: ['50%', '50%'],
+ data: [
+ {
+ value: 25,
+ name: '超标污染物种类',
+ itemStyle: {
+ color: {
+ type: 'linear',
+ x: 0, y: 0, x2: 0, y2: 1,
+ colorStops: [
+ { offset: 0, color: '#B3D6FF' },
+ { offset: 0.476, color: '#9E7DFF' },
+ { offset: 1, color: '#2549FF' }
+ ]
+ },
+ borderRadius: 10
+ }
+ },
+ {
+ value: 75,
+ name: '剩余',
+ itemStyle: { color: 'transparent' }
+ }
+ ],
+ label: { show: false },
+ labelLine: { show: false },
+ silent: true
}
- }]
+ ]
};
// 超标排放统计图表配置
@@ -97,12 +181,14 @@ const PollutionSourceManagement = () => {
grid: {
left: '20%',
right: '10%',
- top: '10%',
- bottom: '10%'
+ top: '0%',
+ bottom: '0%'
},
xAxis: {
type: 'value',
max: 100,
+ min: 0,
+ interval: 10,
axisLine: {
show: false
},
@@ -110,7 +196,10 @@ const PollutionSourceManagement = () => {
show: false
},
axisLabel: {
- color: '#666'
+ color: '#666',
+ formatter: function(value) {
+ return value;
+ }
},
splitLine: {
lineStyle: {
@@ -123,7 +212,10 @@ const PollutionSourceManagement = () => {
type: 'category',
data: ['污染物1', '污染物2', '污染物3', '污染物4', '污染物5'],
axisLine: {
- show: false
+ show: true,
+ lineStyle: {
+ color: '#D7D6D6'
+ }
},
axisTick: {
show: false
@@ -137,10 +229,21 @@ const PollutionSourceManagement = () => {
type: 'bar',
data: [45, 66, 32, 28, 38],
itemStyle: {
- color: '#ff6b6b',
+ color: {
+ type: 'linear',
+ x: 0,
+ y: 0,
+ x2: 1,
+ y2: 0,
+ colorStops: [{
+ offset: 0, color: '#FFEBD9'
+ }, {
+ offset: 1, color: '#FF0000'
+ }]
+ },
borderRadius: [0, 4, 4, 0]
},
- barWidth: '60%'
+ barWidth: '100%'
}]
};
@@ -321,7 +424,7 @@ const PollutionSourceManagement = () => {
{/* 顶部统计区域 */}