2.5 主营业务明细与历史对比表完善,增加非会员弹窗跳转,调整会员页面文字,财务数据模块单季度增加总值展示

This commit is contained in:
尚政杰
2026-02-05 17:47:47 +08:00
parent c4cbd5a11f
commit 21e16f543f
86 changed files with 1661 additions and 376 deletions

View File

@@ -17,11 +17,9 @@
</view>
<view class="flex" style="padding: 20rpx;">
<view class="flex1" style="font-size: 28rpx;">查看详细数据</view>
<view
style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
<view style="color: #F2C369; font-size: 22rpx; padding: 2rpx 10rpx; border-radius: 5rpx; border: 1rpx solid #F2C369; text-align: center; margin: 0 10rpx;">
单季度</view>
<view class="flex"
style="padding: 3rpx 10rpx;border: 1rpx solid #D2D2D2;">
<view class="flex" style="padding: 3rpx 10rpx;border: 1rpx solid #D2D2D2;">
<image style="width: 23rpx; height: 23rpx;" src="/pagesStock/static/icon/all-icon.png"
mode="widthFix"></image>
<view style="margin: 0 10rpx; color: #999999; font-size: 22rpx;">全部</view>
@@ -29,7 +27,6 @@
mode="widthFix"></image>
</view>
</view>
<view style="height: 500rpx;">
<l-echart ref="chartRef1"></l-echart>
</view>

View File

@@ -105,7 +105,7 @@
</view>
<view class="flex" style="font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view class="flex1" style="color: #999999; margin-right: 20rpx;">经营性现金流增长率</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateOperatingFlowRatio()}}%</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateOperatingCashFlowGrowthRate()}}%</view>
</view>
<view class="flex" style="font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view class="flex1" style="color: #999999; margin-right: 20rpx;">投资性现金流</view>
@@ -121,7 +121,7 @@
</view>
<view class="flex" style="font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view class="flex1" style="color: #999999; margin-right: 20rpx;">合计现金流增长率</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateNetIncreaseRatio()}}%</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateTotalCashFlowGrowthRate()}}%</view>
</view>
</view>
</view>
@@ -168,11 +168,11 @@
<view v-if="incomeStatementList.length>0" style="background-color: #FAFAFC; border-radius: 10rpx; margin: 0 20rpx; padding: 20rpx 0;">
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view class="flex" style="flex: 1; color: #999999; margin-right: 20rpx;">净利润</view>
<view style="text-align: right; color: #2A2A2A;">{{getNumStr(incomeStatementList[0].comprehensive_income.total_comprehensive_income)}}</view>
<view style="text-align: right; color: #2A2A2A;">{{getNumStr(incomeStatementList[0].profit.net_profit)}}</view>
</view>
<view class="flex" style="font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view class="flex1" style="color: #999999; margin-right: 20rpx;">净利润增长率</view>
<view style="text-align: right; color: #2A2A2A;">-1600.69%</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateNetProfitGrowthRate()}}%</view>
</view>
<view class="flex" style="font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view class="flex1" style="color: #999999; margin-right: 20rpx;">营业总收入</view>
@@ -180,7 +180,7 @@
</view>
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业总收入增长率</view>
<view style="text-align: right; color: #2A2A2A;">-26.28%</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateRevenueGrowthRate()}}%</view>
</view>
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业利润</view>
@@ -188,7 +188,7 @@
</view>
<view style="display: flex; align-items: center; justify-content: space-between; font-size: 24rpx; font-weight: 500; margin: 20rpx;">
<view style="flex: 1; color: #999999; margin-right: 20rpx;">营业利润增长率</view>
<view style="text-align: right; color: #2A2A2A;">-201.00%</view>
<view style="text-align: right; color: #2A2A2A;">{{caculateRevenueProfitGrowthRate()}}%</view>
</view>
</view>
</view>
@@ -212,6 +212,8 @@
option1:{
legend:{
show:true,
itemWidth:10,
itemHeight:10,
data:['货币资金','同比(右)']
},
grid:{
@@ -220,13 +222,26 @@
top:'5%',
bottom:'30%'
},
xAxis: {
xAxis: [{
type: 'category',
data: [],
axisLabel:{
fontSize:10
}
},
{
type: 'category',
data: [],
axisLine:{
show:false,
},
axisTick:{
show:false
},
axisLabel:{
show:false,
}
}],
yAxis: [{
type: 'value',
name:'(亿)',
@@ -277,13 +292,26 @@
top:'5%',
bottom:'30%'
},
xAxis: {
xAxis: [{
type: 'category',
data: [],
axisLabel:{
fontSize:10,
}
},
{
type: 'category',
data: [],
axisLine:{
show:false,
},
axisTick:{
show:false
},
axisLabel:{
show:false,
}
}],
yAxis: [{
type: 'value',
name:'(亿)',
@@ -331,14 +359,26 @@
top:'5%',
bottom:'30%'
},
xAxis: {
xAxis: [{
type: 'category',
data: [],
axisLabel:{
rotate:45,
fontSize:10
fontSize:10,
}
},
{
type: 'category',
data: [],
axisLine:{
show:false,
},
axisTick:{
show:false
},
axisLabel:{
show:false,
}
}],
yAxis: [{
type: 'value',
name:'(亿)',
@@ -432,7 +472,6 @@
clickBalanceIndicatorItem(index) {
if(this.balanceIndicatorIndex!=index) {
this.balanceIndicatorIndex = index
let data = []
if(index==0) {
//货币资金
if(this.balanceSingleQuarterAllIndex==0) {
@@ -492,7 +531,6 @@
* 获取货币基金单季度数据
*/
getMoneyFundSingleQuarterData() {
let category = []
let currentYear = this.financialBalanceList[0].period.split('-')[0]
var currentYearCount = 0
@@ -519,7 +557,7 @@
for (let item of showDataList) {
for (let item1 of category) {
let index = showDataList.indexOf(item)
let lastItem = showDataList[index+1]
let lastItem = this.financialBalanceList[index+1]
if(item1+'年一季报'==item.report_type){
if(item.assets.current_assets.cash)
{
@@ -550,31 +588,62 @@
}
}
}
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option1.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option1.xAxis.data = category
this.option1.xAxis[0].data = category
this.option1.xAxis[1].data = category
this.option1.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
yAxisIndex:0,
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -675,7 +744,8 @@
sumData.push(sum)
}
this.option1.legend.data = ['货币基金','同比(右)']
this.option1.xAxis.data = category
this.option1.xAxis[0].data = category
this.option1.xAxis[1].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -814,31 +884,62 @@
}
}
}
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option1.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option1.xAxis.data = category
this.option1.xAxis[0].data = category
this.option1.xAxis[1].data = category
this.option1.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -939,7 +1040,8 @@
sumData.push(sum)
}
this.option1.legend.data = ['所有者权益','同比(右)']
this.option1.xAxis.data = category
this.option1.xAxis[0].data = category
this.option1.xAxis[1].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -977,7 +1079,7 @@
}
this.option1.series = [{
type: 'bar',
name:'Q1',
name:'第一季度',
data: data1,
stack:'quarter',
yAxisIndex:0,
@@ -1020,7 +1122,7 @@
/**
* 计算经营性现金流增长率
*/
caculateOperatingFlowGrowthRate() {
caculateOperatingCashFlowGrowthRate() {
let flow1 = this.cashFlowList[0].operating_activities.net_flow
let flow2 = this.cashFlowList[4].operating_activities.net_flow
return accMul(accDiv(accSub(flow1,flow2),flow2),100).toFixed(2)
@@ -1028,7 +1130,7 @@
/**
* 计算合计现金流增长率
*/
caculateNetIncreaseRatio() {
caculateTotalCashFlowGrowthRate() {
let flow1 = this.cashFlowList[0].cash_changes.net_increase
let flow2 = this.cashFlowList[4].cash_changes.net_increase
return accMul(accDiv(accSub(flow1,flow2),flow2),100).toFixed(2)
@@ -1163,31 +1265,62 @@
}
}
}
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option2.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option2.xAxis.data = category
this.option2.xAxis[0].data = category
this.option2.xAxis[1].data = category
this.option2.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -1288,7 +1421,7 @@
sumData.push(sum)
}
this.option2.legend.data = ['经营现金流','同比(右)']
this.option2.xAxis.data = category
this.option2.xAxis[0].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -1427,31 +1560,62 @@
}
}
}
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option2.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option2.xAxis.data = category
this.option2.xAxis[0].data = category
this.option2.xAxis[1].data = category
this.option2.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -1551,7 +1715,7 @@
}else
sumData.push(sum)
}
this.option2.xAxis.data = category
this.option2.xAxis[0].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -1690,30 +1854,62 @@
}
}
}
this.option2.xAxis.data = category
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option2.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option2.xAxis[0].data = category
this.option2.xAxis[1].data = category
this.option2.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -1813,7 +2009,7 @@
}else
sumData.push(sum)
}
this.option2.xAxis.data = category
this.option2.xAxis[0].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -1851,7 +2047,7 @@
}
this.option2.series = [{
type: 'bar',
name:'Q1',
name:'第一季度',
data: data1,
stack:'quarter',
yAxisIndex:0,
@@ -2021,7 +2217,20 @@
}
}
}
this.option3.xAxis.data = category
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option2.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option3.xAxis[0].data = category
this.option3.xAxis[1].data = category
this.option3.series = [{
type: 'bar',
name:'第一季度',
@@ -2045,6 +2254,21 @@
name:'第四季度',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -2144,7 +2368,7 @@
}else
sumData.push(sum)
}
this.option3.xAxis.data = category
this.option3.xAxis[0].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -2283,30 +2507,62 @@
}
}
}
this.option3.xAxis.data = category
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option2.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option3.xAxis[0].data = category
this.option3.xAxis[1].data = category
this.option3.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -2406,7 +2662,7 @@
}else
sumData.push(sum)
}
this.option3.xAxis.data = category
this.option3.xAxis[0].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -2444,7 +2700,7 @@
}
this.option3.series = [{
type: 'bar',
name:'Q1',
name:'第一季度',
data: data1,
stack:'quarter',
yAxisIndex:0,
@@ -2551,30 +2807,62 @@
}
}
}
this.option3.xAxis.data = category
let sumData = []
for (var i = 0; i < data1.length; i++) {
let sum = data1[i]
sum = accAdd(sum,data2[i]?data2[i]:0)
sum = accAdd(sum,data3[i]?data3[i]:0)
sum = accAdd(sum,data4[i]?data4[i]:0).toFixed(2)
if(sum>10000) {
sumData.push((sum/10000).toFixed(2)+'万')
}else
sumData.push(sum)
}
this.option2.legend.data = ['第一季度','第二季度','第三季度','第四季度']
this.option3.xAxis[0].data = category
this.option3.xAxis[1].data = category
this.option3.series = [{
type: 'bar',
name:'第一季度',
barWidth:'15%',
data: data1,
yAxisIndex:0
},
{
type: 'bar',
name:'第二季度',
barWidth:'15%',
data: data2,
yAxisIndex:0
},
{
type: 'bar',
name:'第三季度',
barWidth:'15%',
data: data3,
yAxisIndex:0
},
{
type: 'bar',
name:'第四季度',
barWidth:'15%',
data: data4,
yAxisIndex:0,
},
{
type: 'bar',
name:'总值',
data: sumData,
barWidth:'70%',
xAxisIndex:1,
yAxisIndex:0,
itemStyle:{
color:'rgba(0,0,0,0.2)',
},
label:{
show:true,
position:'top'
}
}]
},
/**
@@ -2678,7 +2966,7 @@
}else
sumData.push(sum)
}
this.option3.xAxis.data = category
this.option3.xAxis[0].data = category
let ratioList = []
for (let item of showDataList) {
let index = showDataList.indexOf(item)
@@ -2718,7 +3006,7 @@
}
this.option3.series = [{
type: 'bar',
name:'Q1',
name:'第一季度',
data: data1,
stack:'quarter',
yAxisIndex:0,
@@ -2762,17 +3050,25 @@
* 计算净利润增长率
*/
caculateNetProfitGrowthRate() {
let flow1 = this.incomeStatementList[0].operating_activities.net_flow
let flow2 = this.incomeStatementList[4].operating_activities.net_flow
return accMul(accDiv(accSub(flow1,flow2),flow2),100).toFixed(2)
let flow1 = this.incomeStatementList[0].profit.net_profit
let flow2 = this.incomeStatementList[4].profit.net_profit
return accMul(accDiv(accSub(flow1,flow2),Math.abs(flow2)),100).toFixed(2)
},
/**
* 计算营业总收入增长率
*/
caculateRevenueGrowthRate() {
let flow1 = this.incomeStatementList[0].cash_changes.net_increase
let flow2 = this.incomeStatementList[4].cash_changes.net_increase
return accMul(accDiv(accSub(flow1,flow2),flow2),100).toFixed(2)
let flow1 = this.incomeStatementList[0].revenue.total_operating_revenue
let flow2 = this.incomeStatementList[4].revenue.total_operating_revenue
return accMul(accDiv(accSub(flow1,flow2),Math.abs(flow2)),100).toFixed(2)
},
/**
* 计算营业利润增长率
*/
caculateRevenueProfitGrowthRate() {
let flow1 = this.incomeStatementList[0].profit.operating_profit
let flow2 = this.incomeStatementList[4].profit.operating_profit
return accMul(accDiv(accSub(flow1,flow2),Math.abs(flow2)),100).toFixed(2)
},
}
}

View File

@@ -38,7 +38,7 @@
<view class="label upstream market">份额:{{item.market_share}}%</view>
</view>
<view class="importanceC flex">
<view class="title">影响</view>
<view class="title">重要</view>
<view class="progressBgC flex1">
<view class="progress upstream" :style="{width: `${item.importance_score}%`}">
</view>
@@ -57,7 +57,7 @@
<view class="label core market">份额:{{item.market_share}}%</view>
</view>
<view class="importanceC flex">
<view class="title">影响</view>
<view class="title">重要</view>
<view class="progressBgC flex1">
<view class="progress core" :style="{width: `${item.importance_score}%`}"></view>
</view>
@@ -75,7 +75,7 @@
<view class="label downstream market">份额:{{item.market_share}}%</view>
</view>
<view class="importanceC flex">
<view class="title">影响</view>
<view class="title">重要</view>
<view class="progressBgC flex1">
<view class="progress downstream" :style="{width: `${item.importance_score}%`}"></view>
</view>

View File

@@ -100,7 +100,8 @@
},
tooltip:{
show:true,
triggerOn:'mousemove'
triggerOn:'mousemove',
confine:true,
},
radar: {
indicator: [

View File

@@ -66,28 +66,48 @@
<l-echart ref="chartRef2"></l-echart>
</view>
<view style="text-align: left; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">
主营业务明细与历史对比</view>
<view
style="display: grid; grid-template-columns: 130rpx repeat(4, 1fr); color: #666666; font-size: 20rpx; font-weight: 500; background-color: #FAFAFC; margin: 20rpx; margin-bottom: 0; padding: 10rpx; box-sizing: border-box;">
<view class="flexColumnCenter" v-for="(item, index) in ['业务', '毛利率', '利润', '营收', '营收']" :key="index"
style="justify-content: center;"
:style="{'text-align': index == 0 ? 'left' : 'center', 'align-items': index == 0 ? 'flex-start' : 'center'}">
<view>{{item}}</view>
<view v-if="['', '(2025年中报)', '(2025年中报)', '(2025年中报)', '(2024年年报)'][index].length > 0"
style="font-size: 18rpx;" :style="{'text-align': index == 0 ? 'left' : 'center'}">
{{['', '(2025年中报)', '(2025年中报)', '(2025年中报)', '(2024年年报)'][index]}}
</view>
</view>
</view>
主营业务明细与历史对比</view>
<block v-if="productClassificationList.length>0">
<view class="table" v-for="(item, index) in productClassificationList[0].products" :key="index"
style="display: grid; grid-template-columns: 130rpx repeat(4, 1fr); margin: 0 20rpx; padding: 10rpx;"
:style="{'background-color': (index % 2 == 0 ? '#FFFFFF' : '#FAFAFC')}">
<view class="item">{{item.content}}</view>
<view class="item flexCenter">{{item.profit_margin.toFixed(2)}}%</view>
<view class="item flexCenter">{{getNumStr(item.profit)}}</view>
<view class="item flexCenter">{{getNumStr(item.revenue)}}</view>
<view class="item flexCenter">{{item.content}}</view>
<view class="mainBusinessC flex">
<view class="businessList">
<view class="heading">业务</view>
<view class="list">
<view class="item flex" v-for="(item, index) in productClassificationList[0].products" :key="index">
{{item.content}}
</view>
</view>
</view>
<scroll-view scroll-x class="dataC flex1">
<view class="headingList">
<view class="heading">
<view class="flexColumnCenter">
<view>毛利率</view>
<view>({{productClassificationList[0].report_type}})</view>
</view>
</view>
<view class="heading">
<view class="flexColumnCenter">
<view>利润</view>
<view>({{productClassificationList[0].report_type}})</view>
</view>
</view>
<block v-for="(item,index) in productClassificationList" :key="index">
<view class="heading">
<view class="flexColumnCenter">
<view>营收</view>
<view>({{item.report_type}})</view>
</view>
</view>
</block>
</view>
<view class="dataList" >
<view class="dataItem" v-for="(item, index) in productClassificationList[0].products" :key="index">
<view class="rowItem">{{item.profit_margin?(item.profit_margin.toFixed(2)+'%'):'-'}}</view>
<view class="rowItem">{{item.profit?(getNumStr(item.profit)):'-'}}</view>
<view class="rowItem" v-for="(pitem,pindex) in productClassificationList" :key="pindex">{{getTableRevenue(item,pitem)}}</view>
</view>
</view>
</scroll-view>
</view>
</block>
<view style="height: 80rpx;"></view>
@@ -139,9 +159,9 @@
}
}
],
dataZoom:[{
type:'slider'
}],
// dataZoom:[{
// type:'slider'
// }],
series: [
{
type: 'bar',
@@ -209,7 +229,6 @@
this.barLineInit()
},
productClassificationList(newValue) {
let data = newValue[0].products
this.option2.title.text = '主营业务构成('+newValue[0].report_type+''
let pieList = []
@@ -282,6 +301,26 @@
if(value>15) return {text:'良好',color:'gold'};
if(value>10) return {text:'一般',color:'orange'};
return {text:'较低',color:'red'};
},
/**
* 遍历数组找出对应的营收
* @param {Object} pitem
*/
getTableRevenue(item,pitem)
{
let index = -1
for (let item1 of pitem.products) {
if(item1.content==item.content)
{
index = pitem.products.indexOf(item1)
}
}
if(index>-1)
{
return getNumStr(pitem.products[index].revenue)
}else
return '-'
},
itemClick(index) {
uni.navigateTo({
@@ -305,5 +344,82 @@
{
text-align: center;
}
}
}
.mainBusinessC
{
padding: 0 20rpx;
overflow: hidden;
.businessList
{
.heading
{
background-color: #FAFAFC;
padding: 0 20rpx;
width: 160rpx;
line-height: 80rpx;
font-size: 20rpx;
font-weight: bold;
color: #666;
}
.list
{
.item
{
padding: 0 10rpx;
height: 60rpx;
font-size: 18rpx;
font-weight: 500;
color: #666;
}
.item:nth-child(2n)
{
background-color: #FAFAFC;
}
}
}
.dataC
{
width: calc(100% - 160rpx);
.headingList
{
white-space: nowrap;
.heading
{
background-color: #FAFAFC;
display: inline-flex;
align-items: center;
justify-content: center;
width: 160rpx;
height: 80rpx;
font-size: 20rpx;
color: #666;
}
}
.dataList
{
.dataItem
{
white-space: nowrap;
font-size: 20rpx;
color: #666;
.rowItem
{
display: inline-flex;
align-items: center;
width: 160rpx;
height: 60rpx;
}
}
.dataItem:nth-child(2n)
{
.rowItem
{
background-color: #FAFAFC;
}
}
}
}
}
</style>

View File

@@ -749,8 +749,7 @@
*/
clickExpandOrRetractCompanyIntro() {
this.isExpandIntro = !this.isExpandIntro
},
},
/**
* @param {Object} index
*/
@@ -798,7 +797,10 @@
clickInDepthAnalysisItem(index) {
if (this.selectInDepthAnalysis != index) {
this.selectInDepthAnalysis = index
if (index==2) {
if(index==0) {
this.getComprehensiveAnalysisData()
this.getIndustryRankListData()
}else if (index==2) {
//产业链
this.getValueChainAnalysisData()
}else if (index==3) {
@@ -1051,7 +1053,7 @@
}
managementTeam(code,{active_only:true}).then(res=>{
let data = res.data
let arr = ['高管','董事','监事','其他']
let arr = ['高管','董事','监事']
let list = []
for (let item of arr) {
list.push({key:item,list:[]})
@@ -1085,6 +1087,9 @@
}, list);
var count = 0
for (let item of this.managementList) {
// if (item.key=='高管') {
// item.key = '其他'
// }
count += item.list.length
}
this.isManagementEmpty = count==0