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