import{_ as f,E as x,o as n,c as o,a as e,F as y,i as v,G as E,h as b,r as O,t as l,d as i,w as g,b as S}from"./index-BKsb6cIX.js";import{c as w}from"./client-BoY9t-gR.js";import{S as T}from"./StatusLabel-DjR17Pph.js";import"./index-B8_nURbH.js";function V(u){return w.get(`/okr/period/${u}/my`)}const R={class:"okr-execution-view"},C={key:0,class:"data-table"},h={style:{"font-weight":"600"}},k={style:{color:"var(--color-text-secondary)"}},D={key:1,class:"empty-state"},L={__name:"OkrExecutionView",setup(u){const c=E(),r=b(null);function p(t){return t.targetValue<=0?0:Math.round(t.currentValue/t.targetValue*100)}function d(t){return{NOT_STARTED:"未开始",IN_PROGRESS:"进行中",COMPLETED:"完成",BLOCKED:"阻塞"}[t]||t}function _(t){return{NOT_STARTED:"info",IN_PROGRESS:"active",COMPLETED:"success",BLOCKED:"danger"}[t]||"info"}return x(async()=>{const t=c.query.periodId;if(t){const a=await V(t);r.value=a.data}}),(t,a)=>{const m=O("el-button");return n(),o("div",R,[a[2]||(a[2]=e("div",{class:"data-toolbar"},[e("span",{class:"data-toolbar__title"},"执行进度")],-1)),r.value?(n(),o("div",C,[a[1]||(a[1]=e("div",{class:"data-table__header",style:{"grid-template-columns":"1fr 80px 80px 100px 80px"}},[e("span",null,"KR"),e("span",null,"进度"),e("span",null,"当前/目标"),e("span",null,"状态"),e("span",null,"操作")],-1)),(n(!0),o(y,null,v(r.value.keyResults,s=>(n(),o("div",{key:s.id,class:"data-table__row",style:{"grid-template-columns":"1fr 80px 80px 100px 80px"}},[e("span",null,l(s.title),1),e("span",h,l(p(s))+"%",1),e("span",k,l(s.currentValue)+"/"+l(s.targetValue),1),i(T,{tone:_(s.status),label:d(s.status)},null,8,["tone","label"]),i(m,{size:"small",onClick:N=>s._showUpdate=!s._showUpdate},{default:g(()=>[...a[0]||(a[0]=[S("更新",-1)])]),_:1},8,["onClick"])]))),128))])):(n(),o("div",D,"加载中..."))])}}},G=f(L,[["__scopeId","data-v-87730cde"]]);export{G as default};
