"use strict";const t=require("../../../common/vendor.js"),e=require("../../../utils/util.js"),o=require("../../../uni_modules/lime-echart/static/echarts.min.js"),i={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 o=[];for(let i of e)o.push({name:i.content,value:i.revenue_ratio.toFixed(2)});this.option2.series[0].data=o,this.pieInit()}},methods:{async barLineInit(){const t=await this.$refs.chartRef1.init(o);let e=this;setTimeout((function(){t.setOption(e.option1)}),2e3)},async pieInit(){const t=await this.$refs.chartRef2.init(o);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"},getGrowthStatus:t=>t>30?{text:"高速增长",color:"green"}:t>10?{text:"稳健增长",color:"gold"}:t>0?{text:"低速增长",color:"orange"}:t>-10?{text:"小幅下滑",color:"orange"}:{text:"大幅下滑",color:"red"},getROEStatus:t=>t>20?{text:"优秀",color:"green"}:t>15?{text:"良好",color:"gold"}:t>10?{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(i,[["render",function(e,o,i,r,s,a){return t.e({a:i.stockInfo},i.stockInfo?t.e({b:t.t(i.stockInfo.growth_rates.profit_growth?s.getChgRateStr(i.stockInfo.growth_rates.profit_growth)+"%":"-"),c:t.t(s.getChgRateStr(i.stockInfo.growth_rates.revenue_growth)),d:t.t(i.stockInfo.growth_rates.profit_growth?a.getGrowthStatus(i.stockInfo.growth_rates.profit_growth).text:"-"),e:t.s("color:"+a.getGrowthStatus(i.stockInfo.growth_rates.profit_growth).color),f:t.t(s.getChgRateStr(i.stockInfo.key_metrics.roe)),g:t.t(a.getROEStatus(i.stockInfo.key_metrics.roe).text),h:t.s("color: "+a.getROEStatus(i.stockInfo.key_metrics.roe).color),i:t.t(i.stockInfo.key_metrics.net_margin.toFixed(2)),j:t.t(i.stockInfo.key_metrics.gross_margin?s.getChgRateStr(i.stockInfo.key_metrics.gross_margin)+"%":"-"),k:i.financialMetricsInfo},i.financialMetricsInfo?{l:t.t(i.financialMetricsInfo.solvency.asset_liability_ratio?i.financialMetricsInfo.solvency.asset_liability_ratio.toFixed(2):"-"),m:t.t(a.getDebtStatusText(i.financialMetricsInfo.solvency.asset_liability_ratio).text),n:t.s("color: "+a.getDebtStatusText(i.financialMetricsInfo.solvency.asset_liability_ratio).color),o:t.t(i.financialMetricsInfo.solvency.current_ratio?i.financialMetricsInfo.solvency.current_ratio.toFixed(2):"-"),p:t.t(i.financialMetricsInfo.expense_ratios.rd_expense_ratio)}:{}):{},{q:t.sr("chartRef1","d36e6b92-0"),r:t.sr("chartRef2","d36e6b92-1"),s:t.f(["业务","毛利率","利润","营收","营收"],((e,o,i)=>t.e({a:t.t(e),b:["","(2025年中报)","(2025年中报)","(2025年中报)","(2024年年报)"][o].length>0},["","(2025年中报)","(2025年中报)","(2025年中报)","(2024年年报)"][o].length>0?{c:t.t(["","(2025年中报)","(2025年中报)","(2025年中报)","(2024年年报)"][o]),d:0==o?"left":"center"}:{},{e:o,f:0==o?"left":"center",g:0==o?"flex-start":"center"}))),t:i.productClassificationList.length>0},i.productClassificationList.length>0?{v:t.f(i.productClassificationList[0].products,((e,o,i)=>({a:t.t(e.content),b:t.t(e.profit_margin.toFixed(2)),c:t.t(s.getNumStr(e.profit)),d:t.t(s.getNumStr(e.revenue)),e:t.t(e.content),f:o,g:o%2==0?"#FFFFFF":"#FAFAFC"})))}:{})}]]);wx.createPage(r);