3.27修改入参及数据获取字段变更
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<div class="dropdown-options" v-if="isDropdownShow">
|
||||
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
|
||||
@click.stop="selectProfit(item)">
|
||||
{{ item }}
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,12 +61,23 @@ export default {
|
||||
return {
|
||||
isDropdownShow: false,
|
||||
selectedProfit: '采购单价', // 选中的名称,初始为null
|
||||
profitOptions: [
|
||||
'采购单价',
|
||||
'产量',
|
||||
'单耗',
|
||||
'消耗量',
|
||||
]
|
||||
profitOptions: [{
|
||||
name: '采购单价',
|
||||
unit: '元/吨'
|
||||
},
|
||||
{
|
||||
name: '产量',
|
||||
unit: '吨'
|
||||
},
|
||||
{
|
||||
name: '单耗',
|
||||
unit: 'kg/㎡'
|
||||
},
|
||||
{
|
||||
name: '消耗量',
|
||||
unit: '吨'
|
||||
}],
|
||||
unit:'元/吨',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -88,6 +99,7 @@ export default {
|
||||
|
||||
const salesData = {
|
||||
allPlaceNames: this.locations,
|
||||
unit:this.unit,
|
||||
series: [
|
||||
// 1. 完成率(折线图)
|
||||
{
|
||||
@@ -247,9 +259,10 @@ export default {
|
||||
methods: {
|
||||
selectProfit(item) {
|
||||
console.log('aaaaaa',item)
|
||||
this.selectedProfit = item;
|
||||
this.selectedProfit = item.name;
|
||||
this.isDropdownShow = false;
|
||||
this.$emit('handleGetItemData', item)
|
||||
this.$emit('handleGetItemData', item.name)
|
||||
this.unit = item.unit;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user