You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
7.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{$t as e,Et as t,P as n,S as r,T as i,W as a,Y as o,_ as s,_t as c,at as ee,in as l,k as te,q as u,tn as d,w as f,x as ne}from"./vue.runtime.esm-bundler-CACvpnko.js";import{s as p}from"./index-D5exsJys.js";async function re(e){let{data:t}=await p.get(`/competitions/${e}/manage/report`);return t}var ie={class:`container-fluid p-3 p-md-4 manage-portal-dashboard`},ae={key:0,class:`text-secondary py-4 text-center`},m={key:1,class:`alert alert-warning`},h={class:`row g-3 mb-1`},g={class:`report-kpi-label`},_={class:`report-kpi-value`},v={class:`row g-3 mt-1 report-main-grid`},y={class:`col-lg-6`},b={class:`d-flex flex-column gap-3 h-100`},x={class:`card report-section-card h-100`},S={class:`card-body`},C={key:0,class:`text-secondary small mb-0`},w={class:`report-bar-head`},T={class:`report-bar-label`},E={class:`report-bar-meta`},D={class:`progress report-progress`},O={class:`card report-section-card h-100`},k={class:`card-body`},A={key:0,class:`text-secondary small mb-0`},j={class:`report-bar-head`},M={class:`report-bar-label`},N={class:`report-bar-meta`},P={class:`progress report-progress`},F={class:`card report-section-card h-100`},I={class:`card-body`},L={class:`table-responsive`},R={class:`table table-sm align-middle mb-0 report-table`},z={key:0},B={class:`col-lg-6`},V={class:`d-flex flex-column gap-3 h-100`},H={class:`card report-section-card h-100`},U={class:`card-body`},W={key:0,class:`text-secondary small mb-0`},G={class:`report-bar-head`},K={class:`report-bar-label`},q={class:`report-bar-meta`},J={class:`progress report-progress`},oe={key:1,class:`text-secondary small mb-0`},se={class:`report-bar-head`},ce={class:`report-bar-label`},le={class:`report-bar-meta`},ue={class:`progress report-progress`},de={class:`card report-section-card h-100`},fe={class:`card-body`},pe={class:`table-responsive`},me={class:`table table-sm align-middle mb-0 report-table`},he={key:0},ge={class:`row g-3 mt-1`},_e={class:`col-lg-5`},ve={class:`card report-section-card h-100`},ye={class:`card-body`},be={class:`table-responsive`},xe={class:`table table-sm align-middle mb-0 report-table`},Se={key:0},Ce={class:`col-lg-7`},we={class:`card report-section-card h-100`},Te={class:`card-body`},Ee={key:0,class:`text-secondary small mb-0`},De={key:1,class:`row g-2`},Oe={class:`top5-track-card h-100`},ke={class:`top5-track-title`},Ae={class:`top5-track-list`},je={class:`top5-item-rank`},Y={class:`top5-item-name`},Me={class:`top5-item-score`},X=te({__name:`ManageDashboardView`,setup(te){let p=n(`manageCompetitionId`,c(null)),X=c(!1),Z=c(null);async function Q(){let e=p.value;if(e){X.value=!0;try{Z.value=await re(e)}catch{Z.value=null}finally{X.value=!1}}}let Ne=ne(()=>Z.value?.kpis??[]);function Pe(e){return e?`report-kpi-card--${e}`:``}function $(e){return e??[]}return ee(p,()=>void Q(),{immediate:!0}),a(()=>void Q()),(n,a)=>(u(),i(`div`,ie,[a[14]||=r(`div`,{class:`d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3`},[r(`h5`,{class:`mb-0 section-title`},`综合看板`)],-1),X.value?(u(),i(`div`,ae,`加载中…`)):f(``,!0),!t(p)&&!X.value?(u(),i(`div`,m,`赛事信息加载失败,请检查链接 slug。`)):Z.value?(u(),i(s,{key:2},[r(`div`,h,[(u(!0),i(s,null,o(Ne.value,(t,n)=>(u(),i(`div`,{key:n,class:`col-12 col-md-6 col-lg-2`},[r(`div`,{class:e([`report-kpi-card`,Pe(t.type)])},[r(`div`,g,l(t.label),1),r(`div`,_,l(t.value),1)],2)]))),128))]),r(`div`,v,[r(`div`,y,[r(`div`,b,[r(`div`,x,[r(`div`,S,[a[0]||=r(`h6`,{class:`report-section-title`},`赛道报名结构`,-1),$(Z.value.track_counts).length?f(``,!0):(u(),i(`p`,C,`暂无赛道数据。`)),(u(!0),i(s,null,o($(Z.value.track_counts),e=>(u(),i(`div`,{key:e.label,class:`report-bar-row`},[r(`div`,w,[r(`span`,T,l(e.label),1),r(`span`,E,l(e.count)+`(`+l(e.percent)+`%)`,1)]),r(`div`,D,[r(`div`,{class:`progress-bar`,style:d({width:`${e.percent}%`})},null,4)])]))),128))])]),r(`div`,O,[r(`div`,k,[a[1]||=r(`h6`,{class:`report-section-title`},`学历结构`,-1),$(Z.value.degree_counts).length?f(``,!0):(u(),i(`p`,A,`暂无学历数据。`)),(u(!0),i(s,null,o($(Z.value.degree_counts),e=>(u(),i(`div`,{key:e.label,class:`report-bar-row`},[r(`div`,j,[r(`span`,M,l(e.label),1),r(`span`,N,l(e.count)+`(`+l(e.percent)+`%)`,1)]),r(`div`,P,[r(`div`,{class:`progress-bar`,style:d({width:`${e.percent}%`})},null,4)])]))),128))])]),r(`div`,F,[r(`div`,I,[a[4]||=r(`h6`,{class:`report-section-title`},`院校活跃度 TOP5`,-1),r(`div`,L,[r(`table`,R,[a[3]||=r(`thead`,null,[r(`tr`,null,[r(`th`,null,`排名`),r(`th`,null,`院校`),r(`th`,null,`报名数`),r(`th`,null,`通过率`)])],-1),r(`tbody`,null,[Z.value.school_top.length?f(``,!0):(u(),i(`tr`,z,[...a[2]||=[r(`td`,{colspan:`4`,class:`text-center text-secondary py-3`},`暂无数据`,-1)]])),(u(!0),i(s,null,o(Z.value.school_top,e=>(u(),i(`tr`,{key:e.rank},[r(`td`,null,l(e.rank),1),r(`td`,null,l(e.name),1),r(`td`,null,l(e.total),1),r(`td`,null,l(e.pass_rate),1)]))),128))])])])])])])]),r(`div`,B,[r(`div`,V,[r(`div`,H,[r(`div`,U,[a[5]||=r(`h6`,{class:`report-section-title`},`地区分布(国家)`,-1),$(Z.value.country_counts).length?f(``,!0):(u(),i(`p`,W,`暂无国家数据。`)),(u(!0),i(s,null,o($(Z.value.country_counts),e=>(u(),i(`div`,{key:e.label,class:`report-bar-row`},[r(`div`,G,[r(`span`,K,l(e.label),1),r(`span`,q,l(e.count)+`(`+l(e.percent)+`%)`,1)]),r(`div`,J,[r(`div`,{class:`progress-bar`,style:d({width:`${e.percent}%`})},null,4)])]))),128)),a[6]||=r(`hr`,{class:`my-4 report-split-line`},null,-1),a[7]||=r(`h6`,{class:`report-section-title`},`地区分布(省份TOP6)`,-1),$(Z.value.province_counts).length?f(``,!0):(u(),i(`p`,oe,`暂无省份数据。`)),(u(!0),i(s,null,o($(Z.value.province_counts),e=>(u(),i(`div`,{key:e.label,class:`report-bar-row`},[r(`div`,se,[r(`span`,ce,l(e.label),1),r(`span`,le,l(e.count)+`(`+l(e.percent)+`%)`,1)]),r(`div`,ue,[r(`div`,{class:`progress-bar`,style:d({width:`${e.percent}%`})},null,4)])]))),128))])]),r(`div`,de,[r(`div`,fe,[a[10]||=r(`h6`,{class:`report-section-title`},`城市活跃度 TOP5`,-1),r(`div`,pe,[r(`table`,me,[a[9]||=r(`thead`,null,[r(`tr`,null,[r(`th`,null,`排名`),r(`th`,null,`城市`),r(`th`,null,`报名数`),r(`th`,null,`通过率`)])],-1),r(`tbody`,null,[Z.value.city_top.length?f(``,!0):(u(),i(`tr`,he,[...a[8]||=[r(`td`,{colspan:`4`,class:`text-center text-secondary py-3`},`暂无数据`,-1)]])),(u(!0),i(s,null,o(Z.value.city_top,e=>(u(),i(`tr`,{key:e.rank},[r(`td`,null,l(e.rank),1),r(`td`,null,l(e.name),1),r(`td`,null,l(e.total),1),r(`td`,null,l(e.pass_rate),1)]))),128))])])])])])])])]),r(`div`,ge,[r(`div`,_e,[r(`div`,ve,[r(`div`,ye,[a[13]||=r(`h6`,{class:`report-section-title mb-2`},`赛道评审均分排行`,-1),r(`div`,be,[r(`table`,xe,[a[12]||=r(`thead`,null,[r(`tr`,null,[r(`th`,null,`排名`),r(`th`,null,`赛道`),r(`th`,null,`均分`),r(`th`,null,`项目数`)])],-1),r(`tbody`,null,[Z.value.track_score_rank.length?f(``,!0):(u(),i(`tr`,Se,[...a[11]||=[r(`td`,{colspan:`4`,class:`text-center text-secondary py-3`},`暂无评审数据`,-1)]])),(u(!0),i(s,null,o(Z.value.track_score_rank,e=>(u(),i(`tr`,{key:e.rank},[r(`td`,null,l(e.rank),1),r(`td`,null,l(e.track),1),r(`td`,null,l(e.avg.toFixed(2)),1),r(`td`,null,l(e.count),1)]))),128))])])])])])]),r(`div`,Ce,[r(`div`,we,[r(`div`,Te,[Z.value.track_top_projects.length?(u(),i(`div`,De,[(u(!0),i(s,null,o(Z.value.track_top_projects,e=>(u(),i(`div`,{key:e.track,class:`col-12 col-md-6`},[r(`div`,Oe,[r(`div`,ke,l(e.track)+` TOP3`,1),r(`ul`,Ae,[(u(!0),i(s,null,o(e.items,e=>(u(),i(`li`,{key:e.rank,class:`top5-item-row`},[r(`span`,je,l(e.rank),1),r(`span`,Y,l(e.name),1),r(`span`,Me,l(e.avg.toFixed(2)),1)]))),128))])])]))),128))])):(u(),i(`p`,Ee,`暂无评审数据`))])])])])],64)):f(``,!0)]))}});export{X as default};