This commit is contained in:
ljx
2025-09-12 19:28:43 +08:00
parent 6a07a25c2e
commit ae21698e5f
15 changed files with 1489 additions and 22 deletions

View File

@ -48,6 +48,7 @@ const loading = ref(false);
const tableData = ref([]);
const risk_level_type = ref();
const safety_inspection_type = ref();
const router = useRouter();
// 新增:获取项目地理信息数据
const getProjectGisData = async () => {
try {
@ -159,6 +160,7 @@ const initEcharts = () => {
<div style="font-weight: bold;">${data.name}</div>
<div>地点:${data.projectSite}</div>
<div>经纬度:${data.value[0].toFixed(6)}, ${data.value[1].toFixed(6)}</div>
`;
}
if (params.seriesType === 'map') {
@ -196,6 +198,17 @@ const initEcharts = () => {
};
myChart.setOption(option);
// 添加点击事件监听 - 这是关键修改部分
myChart.on('click', function (params: any) {
// 检查点击的是散点图系列
if (params.componentType === 'series' && params.seriesType === 'scatter') {
// 跳转到项目详情页
navigateToProjectDetail();
}
});
};
const navigateToProjectDetail = () => {
window.open('http://xny.yj-3d.com:7788/ProjectScreen', '_blank');
};
const risk_level_type1 = ref([]);
const safety_inspection_type1 = ref([]);

View File

@ -11,8 +11,8 @@
</div>
</div>
<div class="title">
<div>煤科建管-新能源项目数智化管理平台</div>
<div>Coal Science Construction Management - New Energy Project Digital Intelligent Management Platform</div>
<div>新能源项目数智化管理平台</div>
<div>New Energy Project Digital Intelligent Management Platform</div>
</div>
<div class="header_right">
<div class="top-bar">
@ -214,6 +214,7 @@ onUnmounted(() => {
.header_left_text {
font-weight: 500;
text-shadow: 0px 1.24px 6.21px rgba(25, 179, 250, 1);
font-size: 26px;
}
}

View File

@ -75,7 +75,7 @@ export let barOption = {
itemWidth: 12,
itemHeight: 12,
// 调整文字与图标间距
data: ['计划产值', '实际产值'],
data: ['实际进度', '计划进度'],
top: 0,
right: 10,
bottom: 10,
@ -90,11 +90,17 @@ export let barOption = {
trigger: 'axis',
// formatter: '{b0}{c0}万元',
formatter: (params: any) => {
console.log(params);
const projectName = params[0].name;
// params 是数组,对应每条柱子
return params
.map((p: any) => `${p.seriesName}${Number(p.value).toFixed(2)} 亿元`)
.join('<br/>');
// return params.map((p: any) => `${p.name} <br/> ${p.seriesName}${Number(p.value).toFixed(2)} MW`).join('<br/>');
return (
`${projectName}<br/>` +
params
.slice(0, 2)
.map((p) => `${p.seriesName}${Number(p.value).toFixed(2)} MW`)
.join('<br/>')
);
},
textStyle: {
color: '#fff'
@ -119,7 +125,7 @@ export let barOption = {
}
},
yAxis: {
name: '单位:亿元',
name: 'MW',
type: 'value',
axisLabel: {
formatter: '{value}'
@ -136,7 +142,7 @@ export let barOption = {
},
series: [
{
name: '计划产值',
name: '实际进度',
type: 'bar',
data: [],
barWidth: '10',
@ -161,7 +167,7 @@ export let barOption = {
}
},
{
name: '实际产值',
name: '计划进度',
type: 'bar',
data: [],
barWidth: '10',

View File

@ -53,7 +53,7 @@
</div>
</div>
<div class="output">
<Title title="实际产值与预期产值对比" style="font-size: 22px" />
<Title title="实际进度与计划进度对比" style="font-size: 22px" />
<div class="chart_container">
<div ref="lineChartRef" class="echart" />
</div>
@ -155,8 +155,8 @@ const initPieChart = () => {
const getOutputData = async () => {
const res = await outpuProgress();
if (res.code == 200) {
designAreaData.value = res.data.map((item: any) => Number(item.planValue));
transferAreaData.value = res.data.map((item: any) => Number(item.actualValue));
designAreaData.value = res.data.map((item: any) => Number(item.plannedCapacity * item.progressPercentage));
transferAreaData.value = res.data.map((item: any) => Number(item.plannedCapacity));
barNames.value = res.data.map((item: any) => item.projectName);
initLineChart();
}