制造成本分析修改

This commit is contained in:
2026-03-25 14:10:27 +08:00
parent bb66f97b95
commit 4f7466bb29
59 changed files with 3909 additions and 1779 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div :ref="refName" id="coreLineChart" style="width: 100%; height: 200px;"></div>
<div ref="cockpitEffChip" id="coreLineChart" style="width: 100%; height: 200px;"></div>
</template>
<script>
import * as echarts from 'echarts';
@@ -13,14 +13,6 @@ export default {
},
props: {
// 明确接收的props结构增强可读性
refName: {
type: String,
default: () => 'cockpitEffChip',
// 校验数据格式
// validator: (value) => {
// return Array.isArray(value.series) && Array.isArray(value.allPlaceNames);
// }
},
chartData: {
type: Object,
default: () => ({
@@ -42,7 +34,7 @@ export default {
// 深度监听数据变化,仅更新图表配置(不销毁实例)
chartData: {
handler() {
console.log(this.chartData, 'chartData');
console.log(this.chartData,'chartData');
this.updateChart();
},
deep: true,
@@ -51,7 +43,7 @@ export default {
},
methods: {
updateChart() {
const chartDom = this.$refs[this.refName];
const chartDom = this.$refs.cockpitEffChip;
if (!chartDom) {
console.error('图表容器未找到!');
return;
@@ -92,16 +84,18 @@ export default {
// }
},
grid: {
top: 20,
bottom: 30,
right: 20,
left: 5,
top: 25,
bottom: 25,
right: 10,
left: 2,
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: true,
// offset: 10
// boundaryGap: ['50%', '50%'],
axisTick: { show: false },
axisLine: {
show: true,