1.31 财务分析,财务数据模块完善,产业链桑基图展示
This commit is contained in:
1
unpackage/dist/build/mp-weixin/components/zysj-view/zysj-view.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/zysj-view/zysj-view.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const t=require("../../common/vendor.js"),e=require("../../utils/util.js"),i=require("../../uni_modules/lime-echart/static/echarts.min.js"),o={name:"zysj-view",data:()=>({option1:{legend:{show:!0,data:["营业收入","净利润"]},grid:{left:"2%",right:"2%",top:"5%",bottom:"30%"},xAxis:{type:"category",data:[],axisLabel:{}},yAxis:[{type:"value",name:"营收(亿)",position:"left",alignTicks:!0,axisLine:{onZero:!1}},{type:"value",name:"利润(亿)",position:"right",alignTicks:!0,axisLine:{onZero:!1}}],dataZoom:[{type:"slider"}],series:[{type:"bar",name:"营业收入",data:[],yAxisIndex:0},{type:"line",name:"净利润",data:[],yAxisIndex:1}]},option2:{title:{text:"",textStyle:{fontSize:12}},legend:{show:!0},grid:{left:0,right:0,top:"5%",bottom:"5%"},series:[{data:[],type:"pie",center:["50%","50%"],label:{formatter:"{d}%"}}]},getChgRateStr:e.getChgRateStr,getNumStr:e.getNumStr}),props:{stockInfo:Object,financialMetricsInfo:Object,barCategoryList:Array,barList:Array,lineList:Array,productClassificationList:Array},watch:{barCategoryList(t){this.option1.xAxis.data=t},barList(t){this.option1.series[0].data=t,this.barLineInit()},lineList(t){this.option1.series[1].data=t,this.barLineInit()},productClassificationList(t){let e=t[0].products;this.option2.title.text="主营业务构成("+t[0].report_type+")";let i=[];for(let o of e)i.push({name:o.content,value:o.revenue_ratio.toFixed(2)});this.option2.series[0].data=i,this.pieInit()}},methods:{async barLineInit(){const t=await this.$refs.chartRef1.init(i);let e=this;setTimeout((function(){t.setOption(e.option1)}),2e3)},async pieInit(){const t=await this.$refs.chartRef2.init(i);let e=this;setTimeout((function(){t.setOption(e.option2)}),2e3)},getDebtStatusText:t=>t<40?{text:"安全",color:"green"}:t<60?{text:"适中",color:"gold"}:t<70?{text:"偏高",color:"orange"}:{text:"风险",color:"red"},itemClick(e){t.index.navigateTo({url:`/pagesStock/stockCenterDetails/cwDetails?index=${e}`})}}};if(!Array){t.resolveComponent("l-echart")()}Math;const r=t._export_sfc(o,[["render",function(e,i,o,r,n,a){return t.e({a:o.stockInfo},o.stockInfo?t.e({b:t.t(n.getChgRateStr(o.stockInfo.growth_rates.profit_growth)),c:t.t(n.getChgRateStr(o.stockInfo.growth_rates.revenue_growth)),d:t.t(n.getChgRateStr(o.stockInfo.key_metrics.roe)),e:t.t(n.getChgRateStr(o.stockInfo.key_metrics.net_margin)),f:t.t(n.getChgRateStr(o.stockInfo.key_metrics.gross_margin)),g:o.financialMetricsInfo},o.financialMetricsInfo?{h:t.t(o.financialMetricsInfo.solvency.asset_liability_ratio),i:t.t(a.getDebtStatusText(o.financialMetricsInfo.solvency.asset_liability_ratio).text),j:t.s("color: "+a.getDebtStatusText(o.financialMetricsInfo.solvency.asset_liability_ratio).color),k:t.t(o.financialMetricsInfo.solvency.current_ratio),l:t.t(o.financialMetricsInfo.expense_ratios.rd_expense_ratio)}:{}):{},{m:t.sr("chartRef1","cf18d1d4-0"),n:t.sr("chartRef2","cf18d1d4-1"),o:t.f(["业务","毛利率","利润","营收","营收"],((e,i,o)=>t.e({a:t.t(e),b:["","(2025年中报)","(2025年中报)","(2025年中报)","(2024年年报)"][i].length>0},["","(2025年中报)","(2025年中报)","(2025年中报)","(2024年年报)"][i].length>0?{c:t.t(["","(2025年中报)","(2025年中报)","(2025年中报)","(2024年年报)"][i]),d:0==i?"left":"center"}:{},{e:0==i?"left":"center",f:0==i?"flex-start":"center"}))),p:o.productClassificationList.length>0},o.productClassificationList.length>0?{q:t.f(o.productClassificationList[0].products,((e,i,o)=>({a:t.t(e.content),b:t.t(e.profit_margin.toFixed(2)),c:t.t(n.getNumStr(e.profit)),d:t.t(n.getNumStr(e.revenue)),e:t.t(e.content),f:i,g:i%2==0?"#FFFFFF":"#FAFAFC"})))}:{})}]]);wx.createComponent(r);
|
||||
Reference in New Issue
Block a user