import{_ as V,i as C,o as a,c as n,a as c,d as r,w as o,n as u,p as x,h as g,r as f,u as B,b as _,t as s,F as N,s as z}from"./index-BQtfiLxw.js";import{periodApi as A,scoreApi as I}from"./index-CuBy5RvH.js";import{P as R}from"./PeriodBanner-AvQIBJIq.js";const U={class:"app-page scoring-worklist"},$={class:"page-hero"},D={key:1,class:"empty-state"},E={key:1,class:"text-muted"},F={class:"final-score"},L={key:1,class:"text-muted"},P={key:0,class:"breakdown"},T={key:1,class:"text-muted"},q={__name:"ScoringListView",setup(H){const k=B(),p=g([]),i=g(null),m=g([]);C(async()=>{p.value=await A.list();const l=p.value.filter(t=>t.status!=="ARCHIVED");l.length&&(i.value=l[0].id,await y())});async function y(){i.value&&(m.value=await I.getSubordinates(i.value))}function h(l){k.push({path:`/scoring/${l.targetUser.id}`,query:{periodId:i.value}})}function b(l){return{S:"",A:"success",B:"primary",C:"danger"}[l]||"info"}return(l,t)=>{const v=f("el-button"),d=f("el-table-column"),S=f("el-tag"),w=f("el-table");return a(),n("div",U,[c("div",$,[t[3]||(t[3]=c("div",{class:"hero-info"},[c("h2",null,"绩效打分"),c("p",null,"下属绩效考评管理")],-1)),r(v,{onClick:t[0]||(t[0]=e=>l.$router.push("/scores/history")),round:""},{default:o(()=>[...t[2]||(t[2]=[_("历史记录",-1)])]),_:1})]),p.value.length?(a(),u(R,{key:0,periods:p.value,modelValue:i.value,"onUpdate:modelValue":[t[1]||(t[1]=e=>i.value=e),y]},null,8,["periods","modelValue"])):x("",!0),m.value.length===0?(a(),n("div",D,"暂无下属数据")):(a(),u(w,{key:2,data:m.value,stripe:"",style:{width:"100%"},onRowClick:h,class:"data-table"},{default:o(()=>[r(d,{prop:"targetUser.realName",label:"姓名","min-width":"100","show-overflow-tooltip":""}),r(d,{prop:"targetUser.position",label:"职位","min-width":"120","show-overflow-tooltip":""}),r(d,{label:"自评分数","min-width":"110",align:"center"},{default:o(({row:e})=>[e.selfScore?(a(),u(S,{key:0,size:"small",effect:"plain",type:"info"},{default:o(()=>[_(s(e.selfScore.total)+" 分",1)]),_:2},1024)):(a(),n("span",E,"未评"))]),_:1}),r(d,{label:"终审结果","min-width":"180",align:"center"},{default:o(({row:e})=>[e.superiorScore?(a(),u(S,{key:0,size:"small",effect:"dark",type:b(e.superiorScore.grade),round:""},{default:o(()=>[_(s(e.superiorScore.grade)+" · "+s(e.superiorScore.total)+" 分 ",1)]),_:2},1032,["type"])):(a(),u(v,{key:1,size:"small",type:"primary",round:""},{default:o(()=>[...t[4]||(t[4]=[_("去打分",-1)])]),_:1}))]),_:1}),r(d,{label:"最终评级","min-width":"160",align:"center"},{default:o(({row:e})=>[e.finalScore?(a(),n(N,{key:0},[c("span",{class:z(["final-grade","grade-"+e.finalScore.grade])},s(e.finalScore.grade),3),c("span",F,s(e.finalScore.total)+" 分",1)],64)):(a(),n("span",L,"--"))]),_:1}),r(d,{label:"OKR / 绩效 / 加减分","min-width":"220",align:"center"},{default:o(({row:e})=>[e.finalScore?(a(),n("span",P,s(e.finalScore.okrScore)+" / "+s(e.finalScore.kpiScore)+" / +"+s(e.finalScore.bonus)+" -"+s(e.finalScore.penalty),1)):(a(),n("span",T,"--"))]),_:1})]),_:1},8,["data"]))])}}},j=V(q,[["__scopeId","data-v-75eea999"]]);export{j as default};
