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