import{d as ee,a as s,K as te,o as oe,b1 as le,h as c,b2 as ae,b as i,j as x,e as l,w as e,A as u,f as m,F as A,y as ne,c as C,z as b,b3 as se,a4 as re,$ as ie,a2 as ue,aJ as de,U as ce,t as h,b4 as me,b5 as pe,aM as _e}from"./index-7b3f5fdc.js";import{s as fe}from"./index-ed1abe32.js";import{W as ye,B as ve}from"./index-09a64fc5.js";import{c as ge}from"./index-a832a56d.js";import{a as xe}from"./index-e96dc078.js";import{V as be}from"./index-a513db85.js";import{y as he,f as ke}from"./index-4ab1e1d9.js";/* empty css */import{d as $}from"./dayjs.min-bfe09ff2.js";import{j as we}from"./index-d0b57c12.js";const Ve={style:{padding:"10px"}},Ce=["onClick"],Se=["onClick"],Ue={style:{height:"70px",width:"100%"}},Me=ee({__name:"index",setup(ze){const r=s(1),S=s([]),U=te(),D=s(-1),d=s(!1);s({total:100,limit:10,current:2});const k=s([]),f=s(1),z=s("");oe(()=>{E()});const E=()=>{le({}).then(o=>{console.log(o),o.code==1?(S.value=o.data,r.value=o.data[0].id,y()):c.msg(o.msg,{icon:2})})},M=o=>{console.log(o),r.value=o,k.value=[],y()},F=o=>{d.value=!0,f.value=1,z.value=o.year,R()},J=o=>{d.value=!0,f.value=2,console.log(o),me({evaluation_schedule_id:r.value,user_id:U.userInfo.id,year:o.year}).then(t=>{console.log(t),t.code==1?v.value=t.data:c.msg(t.msg,{icon:2})})},y=()=>{ae({id:r.value,time:p.value}).then(o=>{console.log(o),o.code==1?k.value=o.data:c.msg(o.msg,{icon:2})})},v=s([]),R=()=>{pe({id:r.value}).then(o=>{console.log(o),o.code==1?v.value=o.data:c.msg(o.msg,{icon:2})})},T=[{title:"考评项目",width:"300px",key:"project_name"},{title:"分值",width:"100px",align:"center",key:"base_score"},{title:"自评分",width:"100px",align:"center",customSlot:"input",key:"input"}],K=[{title:"年度",width:"100px",align:"center",key:"year"},{title:"考评对象",width:"150px",align:"center",key:"user"},{title:"参评时间",width:"180px",align:"center",key:"createtime"},{title:"自评总分",key:"self_score",align:"center"},{title:"科室评分",key:"department_score",customSlot:"department_score",align:"center"},{title:"医院评分",key:"hospital_score",align:"center"},{title:"操作",width:"180px",customSlot:"operator",key:"operator",align:"center",fixed:"right"}];function O(){console.log(p.value),y()}const p=s($().year());function W(){p.value=$().year()}const Z=s([{text:"确认",callback:async()=>{var o=JSON.stringify(v.value),t=await se({term:z.value,json:o,user_id:U.userInfo.id,evaluation_schedule_id:r.value});console.log(t),t.code==1?(c.msg("提交成功!",{icon:1}),d.value=!1,y()):c.msg(t.msg,{icon:2})}},{text:"取消",callback:()=>{d.value=!1}}]);return(o,t)=>{const q=re,I=ie,g=he,w=ue,Y=ke,G=we,V=be,j=xe,H=_e,P=de,B=ge,L=ye,Q=ve,N=fe,X=ce;return i(),x(A,null,[l(B,{fluid:"true",style:{padding:"20px"}},{default:e(()=>[l(Y,{space:10},{default:e(()=>[l(g,{md:24},{default:e(()=>[l(V,null,{default:e(()=>[l(G,{style:{"margin-top":"20px"}},{default:e(()=>[l(Y,null,{default:e(()=>[l(g,{md:5},{default:e(()=>[l(I,{label:"年度:","label-width":"50"},{default:e(()=>[l(q,{type:"year",modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),placeholder:"请选择","allow-clear":""},null,8,["modelValue"])]),_:1})]),_:1}),l(g,{md:4},{default:e(()=>[l(I,{"label-width":"0"},{default:e(()=>[l(w,{type:"primary",onClick:O},{default:e(()=>t[3]||(t[3]=[u("查询")])),_:1}),l(w,{onClick:W},{default:e(()=>t[4]||(t[4]=[u("重置")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l(g,{md:24},{default:e(()=>[l(V,null,{default:e(()=>[m("div",Ve,[t[6]||(t[6]=m("span",{style:{"font-size":"18px","vertical-align":"center","margin-right":"20px"}},"年度自评列表",-1)),l(w,{type:"primary",size:"sm"},{default:e(()=>t[5]||(t[5]=[u("导出Excel")])),_:1})]),l(P,{modelValue:r.value,"onUpdate:modelValue":t[1]||(t[1]=a=>r.value=a),type:"brief",onChange:M},{default:e(()=>[(i(!0),x(A,null,ne(S.value,a=>(i(),C(H,{title:a.title,id:a.id},{default:e(()=>[l(j,{columns:K,dataSource:k.value,even:!0,height:"500px",size:"md"},{id:e(({data:n})=>[u(h(n.id),1)]),department_score:e(({data:n})=>[u(h(n.department_score==0?"-":n.department_score),1)]),username:e(({data:n})=>[u(h(n.username),1)]),password:e(({data:n})=>[u(h(n.password),1)]),operator:e(({data:n})=>[n.if_period==1?(i(),x("span",{key:0,style:{color:"#00A394",cursor:"pointer"},onClick:_=>J(n)},"详情",8,Ce)):b("",!0),n.if_period==2?(i(),x("span",{key:1,style:{color:"#00A394",cursor:"pointer"},onClick:_=>F(n)},"开始自评",8,Se)):b("",!0)]),_:1},8,["dataSource"])]),_:2},1032,["title","id"]))),256))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}),l(X,{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=a=>d.value=a),title:"月度自评详情",type:4,shade:!0,area:["950px","100%"],btn:f.value==1?Z.value:""},{default:e(()=>[l(B,{fluid:"true",style:{padding:"20px"}},{default:e(()=>[l(V,{shadow:"always"},{default:e(()=>[m("div",Ue,[l(Q,{"current-status":"primary",style:{margin:"0 auto"},direction:"horizontal",active:D.value,space:"100%",center:!0},{default:e(()=>[l(L,null,{default:e(()=>t[7]||(t[7]=[m("div",{style:{"font-size":"18px","font-weight":"bold",color:"#009688"}},"个人自评",-1)])),_:1}),l(L,null,{default:e(()=>t[8]||(t[8]=[m("div",{style:{"font-size":"18px","font-weight":"bold",color:"#009688"}},"科室考评",-1),m("div",{style:{color:"#999999"}},null,-1)])),_:1})]),_:1},8,["active"])])]),_:1}),l(j,{"default-expand-all":!0,ref:"tableRef6","children-column-name":"children",columns:T,"data-source":v.value},{input:e(({data:a,rowIndex:n})=>[a.pid==0?(i(),C(N,{key:0,disabled:!0,min:0,max:a.base_score,modelValue:a.base_score,"onUpdate:modelValue":_=>a.base_score=_,position:"right"},null,8,["max","modelValue","onUpdate:modelValue"])):b("",!0),a.pid!=0?(i(),C(N,{key:1,disabled:f.value==2,min:0,max:a.base_score,modelValue:a.content_score,"onUpdate:modelValue":_=>a.content_score=_,position:"right"},null,8,["disabled","max","modelValue","onUpdate:modelValue"])):b("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["modelValue","btn"])],64)}}});export{Me as default};