营业收入-全成本分析页面修改

This commit is contained in:
2026-04-03 09:10:04 +08:00
parent f0ac88af3d
commit 9d91188b98
85 changed files with 1228 additions and 619 deletions

View File

@@ -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);
}
},
};

View File

@@ -123,6 +123,7 @@ export default {
const data = this.currentDataSource;
const salesData = {
allPlaceNames: this.locations,
unit:'%',
series: [
// 完成率(折线图)
{

View File

@@ -133,7 +133,7 @@ export default {
return; // 实例未初始化则返回
}
const { allPlaceNames, series } = this.chartData || {};
const { allPlaceNames, unit, series } = this.chartData || {};
const xData = allPlaceNames || [];
const chartSeries = series || [];
@@ -180,7 +180,7 @@ export default {
yAxis: [
{
type: 'value',
name: '%',
name: unit,
nameTextStyle: {
color: 'rgba(0, 0, 0, 0.45)',
fontSize: 12,