制造成本分析接口+单位修改
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="topItem-container" style="display: flex; gap: 8px;">
|
||||
<div class="dashboard">
|
||||
<div class="title">
|
||||
采购单价·元/度
|
||||
采购单价·{{unitList[0]}}
|
||||
</div>
|
||||
<div style='font-size: 14px;text-align: right;padding-right: 5px;'>
|
||||
<span>完成率:<span style='color: #0B58FF;'>{{unitPriceData.proportion}}%</span></span>
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="dashboard">
|
||||
<div class="title">
|
||||
产量·吨
|
||||
产量.{{unitList[1]}}
|
||||
</div>
|
||||
<div style='font-size: 14px;text-align: right;padding-right: 5px;'>
|
||||
<span>完成率:<span style='color: #0B58FF;'>{{productData.proportion}}%</span></span>
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<div class="dashboard">
|
||||
<div class="title">
|
||||
单耗·度/吨
|
||||
单耗·{{unitList[2]}}
|
||||
</div>
|
||||
<div style='font-size: 14px;text-align: right;padding-right: 5px;'>
|
||||
<span>完成率:<span style='color: #0B58FF;'>{{unitHaoData.proportion}}%</span></span>
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<div class="dashboard">
|
||||
<div class="title">
|
||||
消耗量·度
|
||||
消耗量·{{unitList[3]}}
|
||||
</div>
|
||||
<div style='font-size: 14px;text-align: right;padding-right: 5px;'>
|
||||
<span>完成率:<span style='color: #0B58FF;'>{{haoNumData.proportion}}%</span></span>
|
||||
@@ -90,6 +90,10 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
fuelName:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -101,6 +105,13 @@ export default {
|
||||
},
|
||||
// 对齐第二个组件:添加计算属性,精准筛选各物料数据
|
||||
computed: {
|
||||
unitList() {
|
||||
if (this.fuelName === '电') {
|
||||
return ['元/度','㎡','度/㎡','度']
|
||||
}else{
|
||||
return ['元/m³','㎡','m³/㎡','m³']
|
||||
}
|
||||
},
|
||||
// 1. 硅砂数据:从激活数据集中筛选,兜底值与第二个组件统一
|
||||
unitPriceData() {
|
||||
return this.activeData.find(item => (item.name || '').includes('采购单价')) || {
|
||||
|
||||
Reference in New Issue
Block a user