From f6aa736bff3720a1dba41966170b7108c68ead31 Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Tue, 21 Apr 2026 09:40:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E9=80=A0=E6=88=90=E6=9C=AC=E5=88=86?=
=?UTF-8?q?=E6=9E=90bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 4 ++--
.../SIMFRMCostAnalysis.vue | 1 +
.../fuelCostAnalysis.vue | 1 -
.../productionCostAnalysis/procAuxMatCost.vue | 2 +-
.../containerPackMatCost.vue | 2 +-
.../dataTrendBarFuel.vue | 24 +++++++++----------
.../dataTrendProcessingLabor.vue | 8 ++++++-
.../monthlyThreeRelatedMetricsCCA.vue | 2 +-
.../relateCombustibleCostAnalysis.vue | 8 ++++++-
.../relateFactoryBurdenCostAnalysis.vue | 8 ++++++-
.../relateFuCostAnalysis.vue | 15 +++++++++---
.../relateFuelCostAnalysis.vue | 16 ++++++++++---
.../relateProcessCostAnalysis.vue | 12 +++++++---
.../relateSingleCombustible.vue | 10 ++++++--
.../relateSingleFuelCostAnalysis.vue | 8 ++++++-
.../relateSingleFuelCostAnalysisDian.vue | 10 ++++++--
.../relateSingleFuelCostAnalysisFu.vue | 8 ++++++-
.../relatedIndicatorsAnalysis.vue | 10 ++++++--
.../yearThreeRelatedMetricsCCA.vue | 2 +-
19 files changed, 112 insertions(+), 39 deletions(-)
diff --git a/.env.dev b/.env.dev
index 526323a3..e0b89faf 100644
--- a/.env.dev
+++ b/.env.dev
@@ -12,9 +12,9 @@ VUE_APP_TITLE = 洛玻集团驾驶舱
# 杨姗姗
# VUE_APP_BASE_API = 'http://172.16.20.218:7070'
# 小田
-VUE_APP_BASE_API = 'http://172.16.19.232:7070'
+# VUE_APP_BASE_API = 'http://172.16.19.232:7070'
# 测试
-# VUE_APP_BASE_API = 'http://192.168.0.35:8080'
+VUE_APP_BASE_API = 'http://192.168.0.35:8080'
# 闫阳
# VUE_APP_BASE_API = 'http://172.16.19.131:7070'
diff --git a/src/views/home/productionCostAnalysis/SIMFRMCostAnalysis.vue b/src/views/home/productionCostAnalysis/SIMFRMCostAnalysis.vue
index 1aa6ba5a..1e83365e 100644
--- a/src/views/home/productionCostAnalysis/SIMFRMCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysis/SIMFRMCostAnalysis.vue
@@ -229,6 +229,7 @@ export default {
this.getData()
},
handleMeterialChange(val) {
+ console.log('val=================',val)
this.meterialName = val
this.getData()
},
diff --git a/src/views/home/productionCostAnalysis/fuelCostAnalysis.vue b/src/views/home/productionCostAnalysis/fuelCostAnalysis.vue
index 64166470..33e26f8a 100644
--- a/src/views/home/productionCostAnalysis/fuelCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysis/fuelCostAnalysis.vue
@@ -188,7 +188,6 @@ export default {
],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory,
- // baseId: Number(this.factory),
};
// 调用接口
getCostAnalysisData(requestParams).then((res) => {
diff --git a/src/views/home/productionCostAnalysis/procAuxMatCost.vue b/src/views/home/productionCostAnalysis/procAuxMatCost.vue
index e22e063a..7c9903ab 100644
--- a/src/views/home/productionCostAnalysis/procAuxMatCost.vue
+++ b/src/views/home/productionCostAnalysis/procAuxMatCost.vue
@@ -36,7 +36,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
-
+
diff --git a/src/views/home/productionCostAnalysisComponents/containerPackMatCost.vue b/src/views/home/productionCostAnalysisComponents/containerPackMatCost.vue
index 3d4f46b5..7bdeda6d 100644
--- a/src/views/home/productionCostAnalysisComponents/containerPackMatCost.vue
+++ b/src/views/home/productionCostAnalysisComponents/containerPackMatCost.vue
@@ -132,7 +132,7 @@ export default {
}
.content-top-left {
- width: 320px;
+ width: 312px;
height: 60px;
background: #FFFFFF;
position: relative;
diff --git a/src/views/home/productionCostAnalysisComponents/dataTrendBarFuel.vue b/src/views/home/productionCostAnalysisComponents/dataTrendBarFuel.vue
index f5e71116..e0c3d378 100644
--- a/src/views/home/productionCostAnalysisComponents/dataTrendBarFuel.vue
+++ b/src/views/home/productionCostAnalysisComponents/dataTrendBarFuel.vue
@@ -35,7 +35,7 @@
- {{ item }}
+ {{ item.label }}
@@ -62,15 +62,15 @@ export default {
isDropdownShow: false,
selectedProfit: '原片原料', // 选中的名称,初始为null
profitOptions: [
- '原片原料',
- '氢氧化铝',
- '碎玻璃',
- '复合澄清剂',
- '助熔剂',
- '白云石',
- '石灰石',
- '硅砂',
- '纯碱'
+ {label:'原片原料',value:'原片原料'},
+ {label:'氢氧化铝',value:'氢氧化铝'},
+ {label:'碎玻璃',value:'碎玻璃(外购)'},
+ {label:'复合澄清剂',value:'复合澄清剂'},
+ {label:'助熔剂',value:'助熔剂'},
+ {label:'白云石',value:'白云石'},
+ {label:'石灰石',value:'石灰石'},
+ {label:'硅砂',value:'硅砂'},
+ {label:'纯碱',value:'纯碱'}
]
};
},
@@ -256,9 +256,9 @@ export default {
},
methods: {
selectProfit(item) {
- this.selectedProfit = item;
+ this.selectedProfit = item.label;
this.isDropdownShow = false;
- this.$emit('handleGetItemData', item)
+ this.$emit('handleGetItemData', item.value);
}
},
};
diff --git a/src/views/home/productionCostAnalysisComponents/dataTrendProcessingLabor.vue b/src/views/home/productionCostAnalysisComponents/dataTrendProcessingLabor.vue
index af67b46d..92c3c2f3 100644
--- a/src/views/home/productionCostAnalysisComponents/dataTrendProcessingLabor.vue
+++ b/src/views/home/productionCostAnalysisComponents/dataTrendProcessingLabor.vue
@@ -78,6 +78,7 @@ export default {
showRelated:true,
titleName:'指标分析',
activeData: this.relatedData.current || [],
+ currentTab: 'month'
};
},
mounted() {
@@ -87,7 +88,11 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.current || {};
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -219,6 +224,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
diff --git a/src/views/home/productionCostAnalysisComponents/monthlyThreeRelatedMetricsCCA.vue b/src/views/home/productionCostAnalysisComponents/monthlyThreeRelatedMetricsCCA.vue
index 2f5007e9..9faf300b 100644
--- a/src/views/home/productionCostAnalysisComponents/monthlyThreeRelatedMetricsCCA.vue
+++ b/src/views/home/productionCostAnalysisComponents/monthlyThreeRelatedMetricsCCA.vue
@@ -118,7 +118,7 @@ export default {
query: {
name: material,
month: this.month,
- factory: this.$route.query.factory ? this.$route.query.factory :5,
+ factory: this.$route.query.factory ? this.$route.query.factory :this.factory,
dateData: this.dateData
}
});
diff --git a/src/views/home/productionCostAnalysisComponents/relateCombustibleCostAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relateCombustibleCostAnalysis.vue
index 96422f79..f4dff1e4 100644
--- a/src/views/home/productionCostAnalysisComponents/relateCombustibleCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateCombustibleCostAnalysis.vue
@@ -62,6 +62,7 @@ export default {
return {
chart: null,
activeData: this.relatedData.relatedMon || [], // 核心激活数据集(默认月度,与第二个组件一致)
+ currentTab: 'month'
}
},
computed: {
@@ -106,7 +107,11 @@ export default {
// 对齐第二个组件:深度监听relatedData变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -119,6 +124,7 @@ export default {
// 新增tab切换处理函数:和第二个组件逻辑完全一致,切换月度/累计数据
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据tab值更新激活数据集
if (value === 'month') {
this.activeData = this.relatedData.relatedMon || [];
diff --git a/src/views/home/productionCostAnalysisComponents/relateFactoryBurdenCostAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relateFactoryBurdenCostAnalysis.vue
index c9ccb423..5caa29fa 100644
--- a/src/views/home/productionCostAnalysisComponents/relateFactoryBurdenCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateFactoryBurdenCostAnalysis.vue
@@ -61,13 +61,18 @@ export default {
return {
chart: null,
activeData: this.relatedData.relatedMon || [], // 核心激活数据集(默认月度,与第二个组件一致)
+ currentTab: 'month'
}
},
watch: {
// 对齐第二个组件:深度监听relatedData变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -118,6 +123,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据tab值更新激活数据集
if (value === 'month') {
this.activeData = this.relatedData.relatedMon || [];
diff --git a/src/views/home/productionCostAnalysisComponents/relateFuCostAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relateFuCostAnalysis.vue
index 1fa00faf..85c192e6 100644
--- a/src/views/home/productionCostAnalysisComponents/relateFuCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateFuCostAnalysis.vue
@@ -49,6 +49,10 @@ export default {
type: String,
default: ''
},
+ factory: {
+ type: [String,Number],
+ default: ''
+ },
month: {
type: String,
default: ''
@@ -59,6 +63,7 @@ export default {
chart: null,
// 核心:当前激活的物料数据集(默认月度数据,与第二个组件逻辑一致)
activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
computed: {
@@ -104,7 +109,11 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -116,6 +125,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
@@ -128,14 +138,13 @@ export default {
},
// 对齐第二个组件:优化点击事件,接收物料名和路由路径参数
handleDashboardClick(material, path) {
-
// 2. 优化路由跳转:month放入query中(修复原代码参数错误,与第二个组件一致)
this.$router.push({
path: path,
query: {
name: material,
month: this.month,
- factory: this.$route.query.factory ? this.$route.query.factory :5,
+ factory: this.$route.query.factory ? this.$route.query.factory :this.factory,
dateData: this.dateData
}
});
diff --git a/src/views/home/productionCostAnalysisComponents/relateFuelCostAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relateFuelCostAnalysis.vue
index f5d4c0e9..b2c9865d 100644
--- a/src/views/home/productionCostAnalysisComponents/relateFuelCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateFuelCostAnalysis.vue
@@ -49,6 +49,10 @@ export default {
type: String,
default: ''
},
+ factory: {
+ type: [String,Number],
+ default: ''
+ },
month: {
type: String,
default: ''
@@ -59,6 +63,7 @@ export default {
chart: null,
// 核心:当前激活的物料数据集(默认月度数据,与第二个组件逻辑一致)
activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
computed: {
@@ -107,7 +112,11 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -119,6 +128,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
@@ -136,9 +146,9 @@ export default {
this.$router.push({
path: path,
query: {
- name: material,
+ name: material==='碎玻璃'?'碎玻璃(外购)':material,
month: this.month,
- factory: this.$route.query.factory ? this.$route.query.factory :5,
+ factory: this.$route.query.factory ? this.$route.query.factory :this.factory,
dateData: this.dateData
}
});
diff --git a/src/views/home/productionCostAnalysisComponents/relateProcessCostAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relateProcessCostAnalysis.vue
index 8f3993b8..2a576bdd 100644
--- a/src/views/home/productionCostAnalysisComponents/relateProcessCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateProcessCostAnalysis.vue
@@ -60,7 +60,8 @@ export default {
data() {
return {
chart: null,
- activeData: this.relatedData.relatedMon || []
+ activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
computed: {
@@ -70,7 +71,7 @@ export default {
{ key: 'fuelCost', name: '燃料成本', unit: '元/㎡', route: 'processingFuel/processingFuel'},
{ key: 'auxiliaryMaterialCost', name: '辅料成本', unit: '元/㎡', route: 'procAuxMatCost/procAuxMatCost'},
{ key: 'packagingMaterialCost', name: '包材成本', unit: '元/㎡', route: 'procPackMatCost'},
- { key: 'manufacturingCost', name: '制造费用', unit: '元/㎡', route: 'mfgOverheadCostAnalysis/mfgOverheadCostAnalysis'},
+ { key: 'manufacturingCost', name: '制造费用', unit: '元/㎡', route: 'procMfgOverheadCost/procMfgOverheadCost'},
]
},
indicators() {
@@ -106,7 +107,11 @@ export default {
// 替换无效的itemData监听,新增relatedData深度监听(数据逻辑优化,样式不变)
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -142,6 +147,7 @@ export default {
// 新增:Tab切换处理函数(与第一个成本组件逻辑对齐,样式不变)
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据Tab值切换月度/累计数据
if (value === 'month') {
this.activeData = this.relatedData.relatedMon || [];
diff --git a/src/views/home/productionCostAnalysisComponents/relateSingleCombustible.vue b/src/views/home/productionCostAnalysisComponents/relateSingleCombustible.vue
index afabd709..6099944d 100644
--- a/src/views/home/productionCostAnalysisComponents/relateSingleCombustible.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateSingleCombustible.vue
@@ -59,14 +59,19 @@ export default {
return {
chart: null,
// 新增:当前激活的数据集(默认月度,和第一个组件逻辑对齐,样式无变化)
- activeData: this.relatedData.relatedMon || []
+ activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
watch: {
// 移除无效的itemData监听,新增relatedData深度监听(数据逻辑补充,样式不变)
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -136,6 +141,7 @@ export default {
// 新增:Tab切换处理函数,同步切换月度/累计数据(仅数据逻辑,样式不变)
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
diff --git a/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue
index cc1859b7..d667c4d3 100644
--- a/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue
@@ -60,6 +60,7 @@ export default {
chart: null,
// 核心:当前激活的物料数据集(默认月度数据,与第二个组件逻辑一致)
activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
computed: {
@@ -105,7 +106,11 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -117,6 +122,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
diff --git a/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisDian.vue b/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisDian.vue
index 8a43de03..dec5d906 100644
--- a/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisDian.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisDian.vue
@@ -100,7 +100,8 @@ export default {
chart: null,
// 核心:当前激活的物料数据集(默认月度数据,与第二个组件逻辑一致)
activeData: this.relatedData.relatedMon || [],
- activeMaterial: '' // 记录选中的物料状态,与第二个组件一致
+ activeMaterial: '', // 记录选中的物料状态,与第二个组件一致
+ currentTab: 'month'
}
},
// 对齐第二个组件:添加计算属性,精准筛选各物料数据
@@ -153,7 +154,11 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -165,6 +170,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
diff --git a/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisFu.vue b/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisFu.vue
index f5c44c2a..a0609361 100644
--- a/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisFu.vue
+++ b/src/views/home/productionCostAnalysisComponents/relateSingleFuelCostAnalysisFu.vue
@@ -60,6 +60,7 @@ export default {
chart: null,
// 核心:当前激活的物料数据集(默认月度数据,与第二个组件逻辑一致)
activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
computed: {
@@ -104,7 +105,11 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true, // 组件挂载时立即执行
deep: true // 深度监听对象内部变化
@@ -116,6 +121,7 @@ export default {
methods: {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
diff --git a/src/views/home/productionCostAnalysisComponents/relatedIndicatorsAnalysis.vue b/src/views/home/productionCostAnalysisComponents/relatedIndicatorsAnalysis.vue
index e4d103b9..0ee9e1a1 100644
--- a/src/views/home/productionCostAnalysisComponents/relatedIndicatorsAnalysis.vue
+++ b/src/views/home/productionCostAnalysisComponents/relatedIndicatorsAnalysis.vue
@@ -62,7 +62,8 @@ export default {
return {
chart: null,
// 核心:当前激活的成本数据集(默认月度数据,与第二个组件逻辑一致)
- activeData: this.relatedData.relatedMon || []
+ activeData: this.relatedData.relatedMon || [],
+ currentTab: 'month'
}
},
computed: {
@@ -108,7 +109,11 @@ export default {
// 监听父组件传递的itemData变化,同步更新激活数据集(与第二个组件逻辑一致)
relatedData: {
handler(newVal) {
- this.activeData = newVal.relatedMon || [];
+ if (this.currentTab === 'month') {
+ this.activeData = newVal.relatedMon || [];
+ }else{
+ this.activeData = newVal.relatedTotal || [];
+ }
},
immediate: true,
deep: true
@@ -121,6 +126,7 @@ export default {
handleChange(value) {
console.log('Tab 切换值:', value);
+ this.currentTab = value;
// 根据 Tab 值更新当前激活的数据集
if (value === 'month') {
// 切换为月度数据
diff --git a/src/views/home/productionCostAnalysisComponents/yearThreeRelatedMetricsCCA.vue b/src/views/home/productionCostAnalysisComponents/yearThreeRelatedMetricsCCA.vue
index 8fe885df..7bf198e2 100644
--- a/src/views/home/productionCostAnalysisComponents/yearThreeRelatedMetricsCCA.vue
+++ b/src/views/home/productionCostAnalysisComponents/yearThreeRelatedMetricsCCA.vue
@@ -118,7 +118,7 @@ export default {
query: {
name: material,
month: this.month,
- factory: this.$route.query.factory ? this.$route.query.factory :5,
+ factory: this.$route.query.factory ? this.$route.query.factory :this.factory,
dateData: this.dateData
}
});