营业收入-全成本分析页面修改
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>
|
||||
@@ -63,10 +63,11 @@ export default {
|
||||
isDropdownShow: false,
|
||||
selectedProfit: '毛利率', // 选中的名称,初始为null
|
||||
profitOptions: [
|
||||
'毛利率',
|
||||
'营业收入',
|
||||
'全成本',
|
||||
]
|
||||
{name:'毛利率',unit:'%'},
|
||||
{name:'营业收入',unit:'万元'},
|
||||
{name:'全成本',unit:'元/㎡'}
|
||||
],
|
||||
unit:'%'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -91,6 +92,7 @@ export default {
|
||||
|
||||
const salesData = {
|
||||
allPlaceNames: this.locations,
|
||||
unit: this.unit,
|
||||
series: [
|
||||
// 1. 完成率(折线图)
|
||||
{
|
||||
@@ -251,9 +253,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
selectProfit(item) {
|
||||
this.selectedProfit = item;
|
||||
this.selectedProfit = item.name;
|
||||
this.unit = item.unit;
|
||||
this.isDropdownShow = false;
|
||||
this.$emit("changeItem", item);
|
||||
this.$emit("changeItem", item.name);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user