This commit is contained in:
‘937886381’
2026-01-09 17:53:34 +08:00
parent b76f3bfd37
commit b491f24126
50 changed files with 256 additions and 149 deletions

View File

@@ -8,7 +8,7 @@
<div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left">
<div class="title">
采购单价·/
采购单价·/
</div>
<div class="line">
<operatingSingleBar :detailData="unitPriceData"></operatingSingleBar>
@@ -16,7 +16,7 @@
</div>
<div class="dashboard right">
<div class="title">
产量·
产量·
</div>
<div class="line">
<operatingSingleBar :detailData="productData"></operatingSingleBar>
@@ -24,7 +24,7 @@
</div>
<div class="dashboard right">
<div class="title">
单耗·/
单耗·/
</div>
<div class="line">
<operatingSingleBar :detailData="unitHaoData"></operatingSingleBar>
@@ -87,12 +87,21 @@ export default {
computed: {
// 1. 硅砂数据:从激活数据集中筛选,兜底值与第二个组件统一
unitPriceData() {
console.log('');
console.log(this.activeData.find(item => (item.name || '').includes('采购单价')) || {
targetValue: 0,
value: 0,
completed: 0,
diffValue: 0
},'yyyy')
return this.activeData.find(item => (item.name || '').includes('采购单价')) || {
targetValue: 0,
value: 0,
completed: 0,
diffValue: 0
};
},
// 2. 海砂数据:精准筛选
productData() {
@@ -126,6 +135,8 @@ export default {
// 对齐第二个组件:监听物料数据变化,同步更新激活数据集
relatedData: {
handler(newVal) {
console.log(this.relatedData,'relatedData');
this.activeData = newVal.relatedMon || [];
},
immediate: true, // 组件挂载时立即执行