Files
JiaZhiQianYan/unpackage/dist/build/mp-weixin/pagesStock/components/cwsj-view/cwsj-view.js
2026-02-04 17:43:41 +08:00

2 lines
43 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";const t=require("../../../utils/util.js"),e=require("../../../common/vendor.js"),i=require("../../../common/assets.js"),n=require("../../../uni_modules/lime-echart/static/echarts.min.js"),a={name:"cwsj-view",data:()=>({balanceIndicatorIndex:0,cashFlowIndicatorIndex:0,profitIndicatorIndex:0,balanceSingleQuarterAllIndex:0,cashFlowSingleQuarterAllIndex:0,profitSingleQuarterAllIndex:0,option1:{legend:{show:!0,data:["货币资金","同比(右)"]},grid:{left:"2%",right:"2%",top:"5%",bottom:"30%"},xAxis:{type:"category",data:[],axisLabel:{fontSize:10}},yAxis:[{type:"value",name:"(亿)",position:"left",alignTicks:!0,axisLine:{onZero:!1}},{type:"value",name:"(%)",position:"right",alignTicks:!0,axisLine:{onZero:!1}}],series:[{type:"bar",name:"ROE",data:[],yAxisIndex:0},{type:"line",name:"同比",data:[],yAxisIndex:1}]},option2:{legend:{show:!0,data:["经营现金流","同比(右)"]},tooltip:{show:!0},grid:{left:"2%",right:"2%",top:"5%",bottom:"30%"},xAxis:{type:"category",data:[],axisLabel:{fontSize:10}},yAxis:[{type:"value",name:"(亿)",position:"left",alignTicks:!0,axisLine:{onZero:!1}},{type:"value",name:"(%)",position:"right",alignTicks:!0,axisLine:{onZero:!1}}],series:[{type:"bar",name:"经营现金流",data:[],yAxisIndex:0},{type:"line",name:"同比",data:[],yAxisIndex:1}]},option3:{legend:{show:!0,data:["净利润","同比(右)"]},grid:{left:"2%",right:"2%",top:"5%",bottom:"30%"},xAxis:{type:"category",data:[],axisLabel:{rotate:45,fontSize:10}},yAxis:[{type:"value",name:"(亿)",position:"left",alignTicks:!0,axisLine:{onZero:!1}},{type:"value",name:"(%)",position:"right",alignTicks:!0,axisLine:{onZero:!1}}],series:[{type:"bar",name:"净利润",data:[],yAxisIndex:0},{type:"line",name:"同比",data:[],yAxisIndex:1}]},getNumStr:t.getNumStr,accDiv:t.accDiv,accSub:t.accSub,accMul:t.accMul}),props:{financialBalanceList:Array,cashFlowList:Array,incomeStatementList:Array},watch:{financialBalanceList(t){this.getMoneyFundSingleQuarterData(),this.balanceInit()},cashFlowList(t){this.getOperatingCashFlowSingleQuarterData(),this.cashFlowInit()},incomeStatementList(t){this.getNetProfitSingleQuarterData(),this.incomeStatementInit()}},methods:{async balanceInit(){(await this.$refs.chartRef1.init(n)).setOption(this.option1)},async cashFlowInit(){(await this.$refs.chartRef2.init(n)).setOption(this.option2)},async incomeStatementInit(){(await this.$refs.chartRef3.init(n)).setOption(this.option3)},clickBalanceIndicatorItem(t){this.balanceIndicatorIndex!=t&&(this.balanceIndicatorIndex=t,0==t?0==this.balanceSingleQuarterAllIndex?this.getMoneyFundSingleQuarterData():this.getMoneyFundAllData():1==t&&(0==this.balanceSingleQuarterAllIndex?this.getOwnerEquitySingleQuarterData():this.getOwnerEquityAllData()),this.balanceInit())},clickBalanceSingleQuarterOrAll(t){this.balanceSingleQuarterAllIndex!=t&&(this.balanceSingleQuarterAllIndex=t,0==t?0==this.balanceIndicatorIndex?this.getMoneyFundSingleQuarterData():1==this.balanceIndicatorIndex&&this.getOwnerEquitySingleQuarterData():0==this.balanceIndicatorIndex?this.getMoneyFundAllData():1==this.balanceIndicatorIndex&&this.getOwnerEquityAllData(),this.balanceInit())},getMoneyFundSingleQuarterData(){let e=[],i=this.financialBalanceList[0].period.split("-")[0];var n=0;for(let t of this.financialBalanceList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.financialBalanceList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.assets.current_assets.cash?r.unshift(t.accDiv(h.assets.current_assets.cash,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.assets.current_assets.cash?l.unshift(t.accDiv(t.accSub(h.assets.current_assets.cash,n.assets.current_assets.cash),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.assets.current_assets.cash?f.unshift(t.accDiv(t.accSub(h.assets.current_assets.cash,n.assets.current_assets.cash),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.assets.current_assets.cash?u.unshift(t.accDiv(t.accSub(h.assets.current_assets.cash,n.assets.current_assets.cash),1e8).toFixed(2)):u.unshift(0))}this.option1.legend.data=["第一季度","第二季度","第三季度","第四季度"],this.option1.xAxis.data=e,this.option1.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getMoneyFundAllData(){let e=this.financialBalanceList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.assets.current_assets.cash?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.assets.current_assets.cash,l.assets.current_assets.cash),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.assets.current_assets.cash,u.assets.current_assets.cash),1e8).toFixed(2)),n.unshift(t.accDiv(u.assets.current_assets.cash,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.assets.current_assets.cash?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.assets.current_assets.cash,l.assets.current_assets.cash),1e8).toFixed(2)),n.unshift(t.accDiv(l.assets.current_assets.cash,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.assets.current_assets.cash?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.assets.current_assets.cash,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.assets.current_assets.cash?(c.unshift(t.accDiv(t.accSub(f.assets.current_assets.cash,l.assets.current_assets.cash),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.assets.current_assets.cash,u.assets.current_assets.cash),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.assets.current_assets.cash,h.assets.current_assets.cash),1e8).toFixed(2)),n.unshift(t.accDiv(h.assets.current_assets.cash,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option1.legend.data=["货币基金","同比(右)"],this.option1.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.financialBalanceList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.assets.current_assets.cash,e.assets.current_assets.cash),e.assets.current_assets.cash),100).toFixed(2))}}this.option1.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option1.series=[{type:"bar",name:"第一季度",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},getOwnerEquitySingleQuarterData(){let e=[],i=this.financialBalanceList[0].period.split("-")[0];var n=0;for(let t of this.financialBalanceList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.financialBalanceList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.equity.total?r.unshift(t.accDiv(h.equity.total,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.equity.total?l.unshift(t.accDiv(t.accSub(h.equity.total,n.equity.total),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.equity.total?f.unshift(t.accDiv(t.accSub(h.equity.total,n.equity.total),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.equity.total?u.unshift(t.accDiv(t.accSub(h.equity.total,n.equity.total),1e8).toFixed(2)):u.unshift(0))}this.option1.legend.data=["第一季度","第二季度","第三季度","第四季度"],this.option1.xAxis.data=e,this.option1.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getOwnerEquityAllData(){let e=this.financialBalanceList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.equity.total?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.equity.total,l.equity.total),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.equity.total,u.equity.total),1e8).toFixed(2)),n.unshift(t.accDiv(u.equity.total,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.equity.total?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.equity.total,l.equity.total),1e8).toFixed(2)),n.unshift(t.accDiv(l.equity.total,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.equity.total?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.equity.total,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.equity.total?(c.unshift(t.accDiv(t.accSub(f.equity.total,l.equity.total),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.equity.total,u.equity.total),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.equity.total,h.equity.total),1e8).toFixed(2)),n.unshift(t.accDiv(h.equity.total,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option1.legend.data=["所有者权益","同比(右)"],this.option1.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.financialBalanceList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.equity.total,e.equity.total),e.equity.total),100).toFixed(2))}}this.option1.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option1.series=[{type:"bar",name:"Q1",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},caculateOperatingFlowGrowthRate(){let e=this.cashFlowList[0].operating_activities.net_flow,i=this.cashFlowList[4].operating_activities.net_flow;return t.accMul(t.accDiv(t.accSub(e,i),i),100).toFixed(2)},caculateNetIncreaseRatio(){let e=this.cashFlowList[0].cash_changes.net_increase,i=this.cashFlowList[4].cash_changes.net_increase;return t.accMul(t.accDiv(t.accSub(e,i),i),100).toFixed(2)},clickCashFlowIndicatorItem(t){this.cashFlowIndicatorIndex!=t&&(this.cashFlowIndicatorIndex=t,0==t?0==this.cashFlowSingleQuarterAllIndex?this.getOperatingCashFlowSingleQuarterData():this.getOperatingCashFlowAllData():1==t?0==this.cashFlowSingleQuarterAllIndex?this.getFinancingCashFlowSingleQuarterData():this.getFinancingCashFlowAllData():2==t&&(0==this.cashFlowSingleQuarterAllIndex?this.getInvestmentCashFlowSingleQuarterData():this.getInvestmentCashFlowAllData()),this.cashFlowInit())},clickCashFlowSingleQuarterOrAll(t){this.cashFlowSingleQuarterAllIndex!=t&&(this.cashFlowSingleQuarterAllIndex=t,0==t?0==this.cashFlowIndicatorIndex?this.getOperatingCashFlowSingleQuarterData():1==this.cashFlowIndicatorIndex?this.getFinancingCashFlowSingleQuarterData():this.getInvestmentCashFlowSingleQuarterData():0==this.cashFlowIndicatorIndex?this.getOperatingCashFlowAllData():1==this.cashFlowIndicatorIndex?this.getFinancingCashFlowAllData():this.getInvestmentCashFlowAllData(),this.cashFlowInit())},getOperatingCashFlowSingleQuarterData(){let e=[],i=this.cashFlowList[0].period.split("-")[0];var n=0;for(let t of this.cashFlowList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.cashFlowList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.operating_activities.net_flow?r.unshift(t.accDiv(h.operating_activities.net_flow,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.operating_activities.net_flow?l.unshift(t.accDiv(t.accSub(h.operating_activities.net_flow,n.operating_activities.net_flow),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.operating_activities.net_flow?f.unshift(t.accDiv(t.accSub(h.operating_activities.net_flow,n.operating_activities.net_flow),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.operating_activities.net_flow?u.unshift(t.accDiv(t.accSub(h.operating_activities.net_flow,n.operating_activities.net_flow),1e8).toFixed(2)):u.unshift(0))}this.option2.legend.data=["第一季度","第二季度","第三季度","第四季度"],this.option2.xAxis.data=e,this.option2.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getOperatingCashFlowAllData(){let e=this.cashFlowList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.operating_activities.net_flow?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.operating_activities.net_flow,l.operating_activities.net_flow),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.operating_activities.net_flow,u.operating_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(u.operating_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.operating_activities.net_flow?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.operating_activities.net_flow,l.operating_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(l.operating_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.operating_activities.net_flow?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.operating_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.operating_activities.net_flow?(c.unshift(t.accDiv(t.accSub(f.operating_activities.net_flow,l.operating_activities.net_flow),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.operating_activities.net_flow,u.operating_activities.net_flow),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.operating_activities.net_flow,h.operating_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(h.operating_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option2.legend.data=["经营现金流","同比(右)"],this.option2.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.cashFlowList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.operating_activities.net_flow,e.operating_activities.net_flow),Math.abs(e.operating_activities.net_flow)),100).toFixed(2))}}this.option2.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option2.series=[{type:"bar",name:"第一季度",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},getFinancingCashFlowSingleQuarterData(){let e=[],i=this.cashFlowList[0].period.split("-")[0];var n=0;for(let t of this.financialBalanceList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.cashFlowList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.financing_activities.net_flow?r.unshift(t.accDiv(h.financing_activities.net_flow,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.financing_activities.net_flow?l.unshift(t.accDiv(t.accSub(h.financing_activities.net_flow,n.financing_activities.net_flow),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.financing_activities.net_flow?f.unshift(t.accDiv(t.accSub(h.financing_activities.net_flow,n.financing_activities.net_flow),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.financing_activities.net_flow?u.unshift(t.accDiv(t.accSub(h.financing_activities.net_flow,n.financing_activities.net_flow),1e8).toFixed(2)):u.unshift(0))}this.option2.legend.data=["第一季度","第二季度","第三季度","第四季度"],this.option2.xAxis.data=e,this.option2.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getFinancingCashFlowAllData(){let e=this.cashFlowList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.financing_activities.net_flow?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.financing_activities.net_flow,l.financing_activities.net_flow),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.financing_activities.net_flow,u.financing_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(u.financing_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.financing_activities.net_flow?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.financing_activities.net_flow,l.financing_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(l.financing_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.financing_activities.net_flow?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.financing_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.financing_activities.net_flow?(c.unshift(t.accDiv(t.accSub(f.financing_activities.net_flow,l.financing_activities.net_flow),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.financing_activities.net_flow,u.financing_activities.net_flow),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.financing_activities.net_flow,h.financing_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(h.financing_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option2.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.cashFlowList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.financing_activities.net_flow,e.financing_activities.net_flow),Math.abs(e.financing_activities.net_flow)),100).toFixed(2))}}this.option2.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option2.series=[{type:"bar",name:"第一季度",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},getInvestmentCashFlowSingleQuarterData(){let e=[],i=this.cashFlowList[0].period.split("-")[0];var n=0;for(let t of this.cashFlowList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.cashFlowList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.investment_activities.net_flow?r.unshift(t.accDiv(h.investment_activities.net_flow,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.investment_activities.net_flow?l.unshift(t.accDiv(t.accSub(h.investment_activities.net_flow,n.investment_activities.net_flow),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.investment_activities.net_flow?f.unshift(t.accDiv(t.accSub(h.investment_activities.net_flow,n.investment_activities.net_flow),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.investment_activities.net_flow?u.unshift(t.accDiv(t.accSub(h.investment_activities.net_flow,n.investment_activities.net_flow),1e8).toFixed(2)):u.unshift(0))}this.option2.xAxis.data=e,this.option2.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getInvestmentCashFlowAllData(){let e=this.cashFlowList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.investment_activities.net_flow?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.investment_activities.net_flow,l.investment_activities.net_flow),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.investment_activities.net_flow,u.investment_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(u.investment_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.investment_activities.net_flow?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.investment_activities.net_flow,l.investment_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(l.investment_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.investment_activities.net_flow?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.investment_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.investment_activities.net_flow?(c.unshift(t.accDiv(t.accSub(f.investment_activities.net_flow,l.investment_activities.net_flow),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.investment_activities.net_flow,u.investment_activities.net_flow),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.investment_activities.net_flow,h.investment_activities.net_flow),1e8).toFixed(2)),n.unshift(t.accDiv(h.investment_activities.net_flow,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option2.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.cashFlowList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.investment_activities.net_flow,e.investment_activities.net_flow),Math.abs(e.investment_activities.net_flow)),100).toFixed(2))}}this.option2.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option2.series=[{type:"bar",name:"Q1",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},clickProfitIndicatorItem(t){this.profitIndicatorIndex!=t&&(this.profitIndicatorIndex=t,0==t?0==this.profitSingleQuarterAllIndex?this.getNetProfitSingleQuarterData():this.getNetProfitAllData():1==t?0==this.profitSingleQuarterAllIndex?this.getOperatingRevenueSingleQuarterData():this.getOperatingRevenueAllData():2==t&&(0==this.profitSingleQuarterAllIndex?this.getPeriodExpensesSingleQuarterData():this.getPeriodExpensesAllData()),this.incomeStatementInit())},clickProfitSingleQuarterOrAll(t){this.profitSingleQuarterAllIndex!=t&&(this.profitSingleQuarterAllIndex=t,0==t?0==this.profitIndicatorIndex?this.getNetProfitSingleQuarterData():1==this.profitIndicatorIndex?this.getOperatingRevenueSingleQuarterData():this.getPeriodExpensesSingleQuarterData():0==this.profitIndicatorIndex?this.getNetProfitAllData():1==this.profitIndicatorIndex?this.getOperatingRevenueAllData():this.getPeriodExpensesAllData(),this.incomeStatementInit())},getNetProfitSingleQuarterData(){let e=[],i=this.incomeStatementList[0].period.split("-")[0];var n=0;for(let t of this.incomeStatementList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.incomeStatementList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.profit.net_profit?r.unshift(t.accDiv(h.profit.net_profit,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.profit.net_profit?l.unshift(t.accDiv(t.accSub(h.profit.net_profit,n.profit.net_profit),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.profit.net_profit?f.unshift(t.accDiv(t.accSub(h.profit.net_profit,n.profit.net_profit),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.profit.net_profit?u.unshift(t.accDiv(t.accSub(h.profit.net_profit,n.profit.net_profit),1e8).toFixed(2)):u.unshift(0))}this.option3.xAxis.data=e,this.option3.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getNetProfitAllData(){let e=this.incomeStatementList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.profit.net_profit?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.profit.net_profit,l.profit.net_profit),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.profit.net_profit,u.profit.net_profit),1e8).toFixed(2)),n.unshift(t.accDiv(u.profit.net_profit,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.profit.net_profit?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.profit.net_profit,l.profit.net_profit),1e8).toFixed(2)),n.unshift(t.accDiv(l.profit.net_profit,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.profit.net_profit?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.profit.net_profit,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.profit.net_profit?(c.unshift(t.accDiv(t.accSub(f.profit.net_profit,l.profit.net_profit),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.profit.net_profit,u.profit.net_profit),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.profit.net_profit,h.profit.net_profit),1e8).toFixed(2)),n.unshift(t.accDiv(h.profit.net_profit,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option3.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.incomeStatementList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.profit.net_profit,e.profit.net_profit),Math.abs(e.profit.net_profit)),100).toFixed(2))}}this.option3.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option3.series=[{type:"bar",name:"第一季度",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},getOperatingRevenueSingleQuarterData(){let e=[],i=this.incomeStatementList[0].period.split("-")[0];var n=0;for(let t of this.incomeStatementList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.incomeStatementList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1];i+"年一季报"==h.report_type&&(h.revenue.total_operating_revenue?r.unshift(t.accDiv(h.revenue.total_operating_revenue,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(h.revenue.total_operating_revenue?l.unshift(t.accDiv(t.accSub(h.revenue.total_operating_revenue,n.revenue.total_operating_revenue),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(h.revenue.total_operating_revenue?f.unshift(t.accDiv(t.accSub(h.revenue.total_operating_revenue,n.revenue.total_operating_revenue),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(h.revenue.total_operating_revenue?u.unshift(t.accDiv(t.accSub(h.revenue.total_operating_revenue,n.revenue.total_operating_revenue),1e8).toFixed(2)):u.unshift(0))}this.option3.xAxis.data=e,this.option3.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getOperatingRevenueAllData(){let e=this.incomeStatementList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3];f.report_type.indexOf("三季报")>-1?f.revenue.total_operating_revenue?(c.unshift(0),s.unshift(t.accDiv(t.accSub(f.revenue.total_operating_revenue,l.revenue.total_operating_revenue),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(l.revenue.total_operating_revenue,u.revenue.total_operating_revenue),1e8).toFixed(2)),n.unshift(t.accDiv(u.revenue.total_operating_revenue,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?f.revenue.total_operating_revenue?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(f.revenue.total_operating_revenue,l.revenue.total_operating_revenue),1e8).toFixed(2)),n.unshift(t.accDiv(l.revenue.total_operating_revenue,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?f.revenue.total_operating_revenue?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(f.revenue.total_operating_revenue,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(f.revenue.total_operating_revenue?(c.unshift(t.accDiv(t.accSub(f.revenue.total_operating_revenue,l.revenue.total_operating_revenue),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(l.revenue.total_operating_revenue,u.revenue.total_operating_revenue),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(u.revenue.total_operating_revenue,h.revenue.total_operating_revenue),1e8).toFixed(2)),n.unshift(t.accDiv(h.revenue.total_operating_revenue,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option3.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.incomeStatementList[i+4];l.unshift(t.accMul(t.accDiv(t.accSub(f.revenue.total_operating_revenue,e.revenue.total_operating_revenue),Math.abs(e.revenue.total_operating_revenue)),100).toFixed(2))}}this.option3.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option3.series=[{type:"bar",name:"Q1",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},getPeriodExpensesSingleQuarterData(){let e=[],i=this.incomeStatementList[0].period.split("-")[0];var n=0;for(let t of this.incomeStatementList){t.period.split("-")[0]==i&&n++}let a=(16-n)/4,s=4*a+n,c=this.incomeStatementList.slice(0,s);for(var o=0;o<=a;o++)e.unshift(i-o);let r=[],l=[],f=[],u=[];for(let h of c)for(let i of e){let e=c.indexOf(h),n=c[e+1],a=t.accAdd(t.accAdd(t.accAdd(h.costs.selling_expenses,h.costs.admin_expenses),h.costs.rd_expenses),h.costs.financial_expenses),s=0;n&&(s=t.accAdd(t.accAdd(t.accAdd(n.costs.selling_expenses,n.costs.admin_expenses),n.costs.rd_expenses),n.costs.financial_expenses)),i+"年一季报"==h.report_type&&(a?r.unshift(t.accDiv(a,1e8).toFixed(2)):r.unshift(0)),i+"年中报"==h.report_type&&(a&&s?l.unshift(t.accDiv(t.accSub(a,s),1e8).toFixed(2)):l.unshift(0)),i+"年三季报"==h.report_type&&(a&&s?f.unshift(t.accDiv(t.accSub(a,s),1e8).toFixed(2)):f.unshift(0)),i+"年年报"==h.report_type&&(a&&s?u.unshift(t.accDiv(t.accSub(a,s),1e8).toFixed(2)):u.unshift(0))}this.option3.xAxis.data=e,this.option3.series=[{type:"bar",name:"第一季度",data:r,yAxisIndex:0},{type:"bar",name:"第二季度",data:l,yAxisIndex:0},{type:"bar",name:"第三季度",data:f,yAxisIndex:0},{type:"bar",name:"第四季度",data:u,yAxisIndex:0}]},getPeriodExpensesAllData(){let e=this.incomeStatementList.slice(0,8),i=[],n=[],a=[],s=[],c=[];for(let f of e){let o=e.indexOf(f);if(o<e.length-3){let r=f.report_type;r=r.replaceAll("三季报","\n三季报"),r=r.replaceAll("年报","\n年报"),r=r.replaceAll("中报","\n中报"),r=r.replaceAll("一季报","\n一季报"),i.unshift(r);let l=e[o+1],u=e[o+2],h=e[o+3],d=t.accAdd(t.accAdd(t.accAdd(f.costs.selling_expenses,f.costs.admin_expenses),f.costs.rd_expenses),f.costs.financial_expenses),p=t.accAdd(t.accAdd(t.accAdd(l.costs.selling_expenses,l.costs.admin_expenses),l.costs.rd_expenses),l.costs.financial_expenses),x=t.accAdd(t.accAdd(t.accAdd(u.costs.selling_expenses,u.costs.admin_expenses),u.costs.rd_expenses),u.costs.financial_expenses),_=t.accAdd(t.accAdd(t.accAdd(h.costs.selling_expenses,h.costs.admin_expenses),h.costs.rd_expenses),h.costs.financial_expenses);f.report_type.indexOf("三季报")>-1?d&&p&&x?(c.unshift(0),s.unshift(t.accDiv(t.accSub(d,p),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(p,x),1e8).toFixed(2)),n.unshift(t.accDiv(x,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("中报")>-1?d&&p?(c.unshift(0),s.unshift(0),a.unshift(t.accDiv(t.accSub(d,p),1e8).toFixed(2)),n.unshift(t.accDiv(p,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("一季报")>-1?d?(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(t.accDiv(d,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)):f.report_type.indexOf("年报")>-1&&(d&&p&&x&&_?(c.unshift(t.accDiv(t.accSub(d,p),1e8).toFixed(2)),s.unshift(t.accDiv(t.accSub(p,x),1e8).toFixed(2)),a.unshift(t.accDiv(t.accSub(x,_),1e8).toFixed(2)),n.unshift(t.accDiv(_,1e8).toFixed(2))):(c.unshift(0),s.unshift(0),a.unshift(0),n.unshift(0)))}}let o=[];for(var r=0;r<n.length;r++){let e=n[r];e=t.accAdd(e,a[r]),e=t.accAdd(e,s[r]),e=t.accAdd(e,c[r]).toFixed(2),e>1e4?o.push((e/1e4).toFixed(2)+"万"):o.push(e)}this.option3.xAxis.data=i;let l=[];for(let f of e){let i=e.indexOf(f);if(i<e.length-3){let e=this.incomeStatementList[i+4],n=t.accAdd(t.accAdd(t.accAdd(f.costs.selling_expenses,f.costs.admin_expenses),f.costs.rd_expenses),f.costs.financial_expenses),a=t.accAdd(t.accAdd(t.accAdd(e.costs.selling_expenses,e.costs.admin_expenses),e.costs.rd_expenses),e.costs.financial_expenses);l.unshift(t.accMul(t.accDiv(t.accSub(n,a),Math.abs(a)),100).toFixed(2))}}this.option3.tooltip={show:!0,confine:!0,formatter(t){let e=t.dataIndex,i=t.name+":"+o[e];return 0!=n[e]&&(i+="\n第一季度"+n[e]),0!=a[e]&&(i+="\n第二季度"+a[e]),0!=s[e]&&(i+="\n第三季度"+s[e]),0!=c[e]&&(i+="\n第四季度"+c[e]),i+="\n同比(右)"+l[e],i}},this.option3.series=[{type:"bar",name:"Q1",data:n,stack:"quarter",yAxisIndex:0,label:{show:!0,position:"top",formatter:t=>o[t.dataIndex]}},{type:"bar",name:"第二季度",data:a,stack:"quarter",yAxisIndex:0},{type:"bar",name:"第三季度",data:s,yAxisIndex:0,stack:"quarter"},{type:"bar",name:"第四季度",data:c,yAxisIndex:0,stack:"quarter"},{type:"line",name:"同比(右)",data:l,yAxisIndex:1}]},caculateNetProfitGrowthRate(){let e=this.incomeStatementList[0].operating_activities.net_flow,i=this.incomeStatementList[4].operating_activities.net_flow;return t.accMul(t.accDiv(t.accSub(e,i),i),100).toFixed(2)},caculateRevenueGrowthRate(){let e=this.incomeStatementList[0].cash_changes.net_increase,i=this.incomeStatementList[4].cash_changes.net_increase;return t.accMul(t.accDiv(t.accSub(e,i),i),100).toFixed(2)}}};if(!Array){e.resolveComponent("l-echart")()}Math;const s=e._export_sfc(a,[["render",function(t,n,a,s,c,o){return e.e({a:i._imports_0$3,b:i._imports_2$3,c:e.f(["货币资金","所有者权益","关键指标"],((t,i,n)=>({a:e.t(t),b:e.n("item flexCenter "+(c.balanceIndicatorIndex==i?"select":"")),c:i,d:e.o((t=>o.clickBalanceIndicatorItem(i)),i)}))),d:e.n("option "+(0==c.balanceSingleQuarterAllIndex?"select":"")),e:e.o((t=>o.clickBalanceSingleQuarterOrAll(0))),f:1==c.balanceSingleQuarterAllIndex},1==c.balanceSingleQuarterAllIndex?{g:i._imports_2$13}:{h:i._imports_3$12},{i:1==c.balanceSingleQuarterAllIndex},1==c.balanceSingleQuarterAllIndex?{j:i._imports_4$10}:{k:i._imports_5$7},{l:e.n("flex option "+(1==c.balanceSingleQuarterAllIndex?"select":"")),m:e.o((t=>o.clickBalanceSingleQuarterOrAll(1))),n:e.sr("chartRef1","619fafcd-0"),o:a.financialBalanceList.length>0},a.financialBalanceList.length>0?{p:e.t(c.getNumStr(a.financialBalanceList[0].assets.total)),q:e.t(c.getNumStr(a.financialBalanceList[0].liabilities.total)),r:e.t(c.getNumStr(a.financialBalanceList[0].equity.total)),s:e.t(c.getNumStr(a.financialBalanceList[0].assets.current_assets.cash)),t:e.t(c.getNumStr(a.financialBalanceList[0].equity.capital_reserve)),v:e.t(c.getNumStr(a.financialBalanceList[0].equity.surplus_reserve)),w:e.t(c.getNumStr(a.financialBalanceList[0].equity.undistributed_profit))}:{},{x:i._imports_0$3,y:i._imports_2$3,z:e.f(["经营现金流","筹资现金流","投资现金流"],((t,i,n)=>({a:e.t(t),b:e.n("item flexCenter "+(c.cashFlowIndicatorIndex==i?"select":"")),c:i,d:e.o((t=>o.clickCashFlowIndicatorItem(i)),i)}))),A:e.n("option "+(0==c.cashFlowSingleQuarterAllIndex?"select":"")),B:e.o((t=>o.clickCashFlowSingleQuarterOrAll(0))),C:1==c.cashFlowSingleQuarterAllIndex},1==c.cashFlowSingleQuarterAllIndex?{D:i._imports_2$13}:{E:i._imports_3$12},{F:1==c.cashFlowSingleQuarterAllIndex},1==c.cashFlowSingleQuarterAllIndex?{G:i._imports_4$10}:{H:i._imports_5$7},{I:e.n("flex option "+(1==c.cashFlowSingleQuarterAllIndex?"select":"")),J:e.o((t=>o.clickCashFlowSingleQuarterOrAll(1))),K:e.sr("chartRef2","619fafcd-1"),L:a.cashFlowList.length>0},a.cashFlowList.length>0?{M:e.t(c.getNumStr(a.cashFlowList[0].operating_activities.net_flow)),N:e.t(t.caculateOperatingFlowRatio()),O:e.t(c.getNumStr(a.cashFlowList[0].investment_activities.net_flow)),P:e.t(c.getNumStr(a.cashFlowList[0].financing_activities.net_flow)),Q:e.t(c.getNumStr(a.cashFlowList[0].cash_changes.net_increase)),R:e.t(o.caculateNetIncreaseRatio())}:{},{S:i._imports_0$3,T:i._imports_2$3,U:e.f(["净利润","营业收入","期间费用"],((t,i,n)=>({a:e.t(t),b:e.n("item flexCenter "+(c.profitIndicatorIndex==i?"select":"")),c:i,d:e.o((t=>o.clickProfitIndicatorItem(i)),i)}))),V:e.n("option "+(0==c.profitSingleQuarterAllIndex?"select":"")),W:e.o((t=>o.clickProfitSingleQuarterOrAll(0))),X:1==c.profitSingleQuarterAllIndex},1==c.profitSingleQuarterAllIndex?{Y:i._imports_2$13}:{Z:i._imports_3$12},{aa:1==c.profitSingleQuarterAllIndex},1==c.profitSingleQuarterAllIndex?{ab:i._imports_4$10}:{ac:i._imports_5$7},{ad:e.n("flex option "+(1==c.profitSingleQuarterAllIndex?"select":"")),ae:e.o((t=>o.clickProfitSingleQuarterOrAll(1))),af:e.sr("chartRef3","619fafcd-2"),ag:a.incomeStatementList.length>0},a.incomeStatementList.length>0?{ah:e.t(c.getNumStr(a.incomeStatementList[0].comprehensive_income.total_comprehensive_income)),ai:e.t(c.getNumStr(a.incomeStatementList[0].revenue.total_operating_revenue)),aj:e.t(c.getNumStr(a.incomeStatementList[0].profit.operating_profit))}:{})}]]);wx.createPage(s);