修改
This commit is contained in:
@@ -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">
|
||||
单耗·吨/m²
|
||||
单耗·吨/吨
|
||||
</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, // 组件挂载时立即执行
|
||||
|
||||
Reference in New Issue
Block a user