2.4 组件结构调整,调整会员权限判断

This commit is contained in:
尚政杰
2026-02-04 17:43:41 +08:00
parent eeca65538c
commit 995ee7f220
274 changed files with 7191 additions and 2186 deletions

View File

@@ -0,0 +1 @@
"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);

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {
"l-echart": "../../../uni_modules/lime-echart/components/l-echart/l-echart"
}
}

View File

@@ -0,0 +1 @@
<view><block wx:if="{{a}}"><view class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;box-sizing:border-box;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#1DB26F;font-size:30rpx">{{b}}</view><view style="margin-top:10rpx">利润增长</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">成长能力</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">增长动力</text></view><view style="margin-top:10rpx"><text>营收增长</text><text style="color:#1DB26F;margin:0 10rpx">{{c}}%</text><text style="{{e}}">({{d}})</text></view></view></view><view class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#F59B38;font-size:30rpx">{{f}}%</view><view style="margin-top:10rpx">ROE</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">盈利与回报</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">赚钱能力</text></view><view style="margin-top:10rpx"><text style="{{h}}">{{g}}</text><text style="margin-left:10rpx">净利率 {{i}}%|毛利率 {{j}}</text></view></view></view><view wx:if="{{k}}" class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#EC3440;font-size:30rpx">{{l}}%</view><view style="margin-top:10rpx">资产负债率</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">风险与运营</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">安全边际</text></view><view style="margin-top:10rpx"><text style="{{n}}">{{m}}</text><text style="margin-left:10rpx">流动比率 {{o}}|研发费用率 {{p}}%</text></view></view></view></block><view style="text-align:center;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx"> 营收与利润趋势</view><view style="height:400rpx"><l-echart class="r" u-r="chartRef1" u-i="d36e6b92-0" bind:__l="__l"></l-echart></view><view style="text-align:left;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx">主营业务 </view><view style="height:400rpx"><l-echart class="r" u-r="chartRef2" u-i="d36e6b92-1" bind:__l="__l"></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 wx:for="{{s}}" wx:for-item="item" wx:key="e" class="flexColumnCenter" style="{{'justify-content:center' + ';' + ('text-align:' + item.f + ';' + ('align-items:' + item.g))}}"><view>{{item.a}}</view><view wx:if="{{item.b}}" style="{{'font-size:18rpx' + ';' + ('text-align:' + item.d)}}">{{item.c}}</view></view></view><block wx:if="{{t}}"><view wx:for="{{v}}" wx:for-item="item" wx:key="f" class="table" style="{{'display:grid;grid-template-columns:130rpx repeat(4, 1fr);margin:0 20rpx;padding:10rpx' + ';' + ('background-color:' + item.g)}}"><view class="item">{{item.a}}</view><view class="item flexCenter">{{item.b}}%</view><view class="item flexCenter">{{item.c}}</view><view class="item flexCenter">{{item.d}}</view><view class="item flexCenter">{{item.e}}</view></view></block><view style="height:80rpx"></view></view>

View File

@@ -0,0 +1 @@
.table .item{font-size:20rpx;font-weight:500;color:#666}.table .item.center{text-align:center}