import{P as w}from"./index-B52vLzQM.js";import{A as b}from"./index-BApXqHgh.js";import{C as N}from"./index-DfydRvcN.js";import{D as h}from"./index-CfuzQhcF.js";import{d as f,o as u,f as D,i as T,a as o,g as r,_ as y,b as S,c as m,p as $,l as k,aA as P,h as _,F as R,e as I,t as C}from"./index-DO6SfH87.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_name_ECharts_lang-CAwyM1L_.js";import{a as A}from"./index-B9e-dLML.js";import{g as E,a as L}from"./fitnessMeasureApi-BPdMaL-v.js";import"./index-DNrc9Gse.js";import"./installCanvasRenderer-q-7FW8Eq.js";const x={class:"overview-cards"},U=f({__name:"AssessmentOverview",props:{overviewData:{}},setup(c){return(t,l)=>(u(),D(N,{title:"国民体质测评概览","has-background":!1},{default:T(()=>[o("div",x,[r(h,{title:"国民体质测试检测人数",value:String(t.overviewData.yearUpNumTotal),"show-border":!1,cardType:"type2"},null,8,["value"]),r(h,{title:"国民体质测试有效人数",value:String(t.overviewData.yearCompleteNumTotal),"show-border":!1,cardType:"type2"},null,8,["value"]),r(h,{title:"体质测评合格人数",value:String(t.overviewData.standardNumTotal),"show-border":!1,cardType:"type2"},null,8,["value"]),r(h,{title:"体质测评合格率",value:String(t.overviewData.yearCompleteRate),"show-border":!1,cardType:"type2"},null,8,["value"])])]),_:1}))}}),q=y(U,[["__scopeId","data-v-f1d90eac"]]),B=c=>($("data-v-e161ff5c"),c=c(),k(),c),V={class:"evaluation-distribution-chart"},z=B(()=>o("div",{class:"chart-title"},"国民体质综合评价分布",-1)),F={class:"pie-chart"},H=f({__name:"EvaluationDistributionChart",props:{chartData:{}},setup(c){const t=c,l=S(()=>({tooltip:{trigger:"item",formatter:"{b}: {c}人 ({d}%)"},legend:{show:!0,orient:"horizontal",bottom:"0%",left:"center",itemGap:20,textStyle:{fontSize:14,color:"#606266"},formatter:e=>{const s=t.chartData.find(v=>v.name===e);return s?`${e} ${s.value}人 ${s.percent}%`:e}},series:[{type:"pie",radius:["40%","65%"],center:["50%","45%"],avoidLabelOverlap:!1,label:{show:!1},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}},labelLine:{show:!1},data:t.chartData.map(e=>({name:e.name,value:e.value,itemStyle:{color:A[e.name]||"#409eff"}}))}]}));return(e,s)=>(u(),m("div",V,[z,o("div",F,[r(O,{option:l.value,height:"280"},null,8,["option"])])]))}}),Q=y(H,[["__scopeId","data-v-e161ff5c"]]),Y={class:"quick-entry"},G={class:"entry-grid"},M=["onClick"],W={class:"entry-content"},j={class:"entry-text"},J={class:"entry-name"},K={class:"entry-desc"},X={class:"entry-icon"},Z=["src"],aa=f({__name:"QuickEntry",setup(c){const t=P(),l=_([{id:"1",name:"分组别进度",desc:"查看各分组完成情况",icon:"https://cdn-static.papa.com.cn/yunnan/组别能耗分析.png",iconColor:"#409eff",bgColor:"#ecf5ff",path:"/groupProgressStats"},{id:"2",name:"各地完成进度",desc:"查看各地区完成情况",icon:"https://cdn-static.papa.com.cn/yunnan/项目进度统计备份.png",iconColor:"#67c23a",bgColor:"#f0f9ff",path:"/regionCompletionProgress"},{id:"3",name:"历年统计",desc:"历年体测数据分析",icon:"https://cdn-static.papa.com.cn/yunnan/万年历.png",iconColor:"#e6a23c",bgColor:"#fdf6ec",path:"/historicalStats"},{id:"4",name:"指标分析",desc:"体测指标深度分析",icon:"https://cdn-static.papa.com.cn/yunnan/指标分析.png",iconColor:"#f56c6c",bgColor:"#fef0f0",path:"/indicatorAnalysis"}]),e=s=>{t.push(s.path)};return(s,v)=>(u(),m("div",Y,[o("div",G,[(u(!0),m(R,null,I(l.value,d=>(u(),m("div",{key:d.id,class:"entry-item",onClick:g=>e(d)},[o("div",W,[o("div",j,[o("div",J,C(d.name),1),o("div",K,C(d.desc),1)]),o("div",X,[o("img",{src:d.icon,alt:"icon"},null,8,Z)])])],8,M))),128))])]))}}),ea=y(aa,[["__scopeId","data-v-c133a1f1"]]),ta={class:"page-container"},oa={class:"content-container"},va=f({__name:"index",setup(c){const t=_({areaCodes:[],areaData:{},year:new Date().getFullYear().toString()}),l=_({yearUpNumTotal:0,yearCompleteNumTotal:0,standardNumTotal:0,yearCompleteRate:0}),e=_([]),s=i=>{const{areaData:a,year:n}=i,p={cityId:null,districtId:null,year:Number(n)||0};return a.city&&(p.cityId=Number(a.city.code)),a.district&&(p.districtId=Number(a.district.code)),p},v=async i=>{try{const a=await E(i);a.code===0&&(l.value=a.data?{yearUpNumTotal:a.data.yearUpNumTotal,yearCompleteNumTotal:a.data.yearCompleteNumTotal,standardNumTotal:a.data.standardNumTotal,yearCompleteRate:a.data.yearCompleteRate}:{yearUpNumTotal:0,yearCompleteNumTotal:0,standardNumTotal:0,yearCompleteRate:0})}catch(a){console.error("获取概览数据失败",a)}},d=async i=>{var a;try{const n=await L(i);n.code===0&&((a=n.data)!=null&&a.evaluateRespVOList)&&(e.value=n.data.evaluateRespVOList.map(p=>({name:p.evaluate,value:p.num,percent:p.rate})))}catch(n){console.error("获取评价分布数据失败",n)}},g=i=>{const a=s(i);v(a),d(a)};return(i,a)=>(u(),m("div",ta,[r(w),o("div",oa,[r(b,{params:t.value,"onUpdate:params":a[0]||(a[0]=n=>t.value=n),onSearch:g},null,8,["params"]),r(q,{"overview-data":l.value},null,8,["overview-data"]),r(Q,{"chart-data":e.value},null,8,["chart-data"]),r(ea)])]))}});export{va as default};
