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