import{ch as c,a5 as M,af as _,ce as F,a7 as s,_ as k,d as w,n as y,p as R,r as i,o as C,A as B,y as m,h as b,i as f,D as S,a as H,cC as P}from"./index.js";import{u as q}from"./use-page-modal.13b99c3b.js";const{VITE_PROXY_DOMAIN_REAL:J,VITE_PROXY_USER_REAL:I}=M(),p=I+"/admin/",L=e=>c.request("post",`${p}execstatlogadd`,{data:e}),z=e=>c.request("post",`${p}execstatloglist`,{data:{...e,type:[3,4]}}),N=e=>c.request("post",`${p}execlogdel`,{data:e}),O=e=>c.request("post",`${p}execstatall`,{data:e}),g=[{value:"3",label:"\u7ACB\u5373\u6267\u884C"},{value:"4",label:"\u5EF6\u8FDF\u6267\u884C"}],x=[{value:"1",label:"\u5F85\u6267\u884C",type:"warning"},{value:"2",label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:"3",label:"\u6267\u884C\u5931\u8D25",type:"error"},{value:"4",label:"\u6267\u884C\u4E2D",type:""}],V=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u62A5\u8868\u540D\u79F0",prop:"name"},{label:"\u6267\u884C\u7C7B\u578B",prop:"type",width:"90px",cellRenderer:({row:e,props:a})=>_(F,{size:a.size,type:String(e.type)==="1"?"":"success"},{default:()=>{var u;return(u=g.find(l=>String(e.type)===l.value))==null?void 0:u.label}})},{label:"\u72B6\u6001",prop:"status",width:"90px",cellRenderer:({row:e,props:a})=>{const{type:u,label:l}=x.find(h=>String(e.status)===h.value);return _(F,{size:a.size,type:u},{default:()=>l})}},{label:"\u5F00\u59CB\u65F6\u95F4",prop:"start",width:"140px",formatter:({start:e})=>s(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u7ED3\u675F\u65F6\u95F4",prop:"end",width:"140px",formatter:({end:e})=>s(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:"70px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:"140px",formatter:({addtime:e})=>s(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],$={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",columns:V,showDelete:e=>String(e.status)=="1"||String(e.status)==="3",apis:{httpList:z,httpAdd:L,httpDelete:N}},Y={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:x},{field:"type",type:"select",placeholder:"\u6267\u884C\u7C7B\u578B",options:g},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},T={title:"\u62A5\u8868\u7533\u8BF7",colLayout:{span:24},itemStyle:{},formItems:[{field:"id",type:"select",label:"\u62A5\u8868",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868"}],options:[]},{field:"type",type:"select",label:"\u6267\u884C\u7C7B\u578B",labelWidth:"120px",placeholder:"\u6267\u884C\u7C7B\u578B",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6267\u884C\u7C7B\u578B"}],options:g},{field:"create_timer",type:"date_picker",label:"\u62A5\u8868\u65F6\u95F4",labelWidth:"120px",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868\u65F6\u95F4"}],otherOptions:{placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868\u65F6\u95F4",format:"YYYY-MM",type:"month"}}]},W="personnelReportRecord",j=w({__name:"index",setup(e){const a=y(T),u=y([]);async function l(){const n=[],{code:r,data:o}=await O({});r===0&&o.forEach(t=>{const d={value:t.id,label:t.name,status:t.status,disabled:String(t.status)=="0"};n.push(d)}),u.value=n.filter(t=>t.status=="1"),a.value.formItems[0].options=u.value}const E={pageSearchHook:function(){return P(void 0,void 0,Y)},pageModalHook:function(n){return q({pageContentRef:n,confirmCallback:({create_timer:r})=>{const o=s(r).format("YYYY-MM-DD"),t=s(o).endOf("month").format("YYYY-MM-DD");return{start:o,end:t}}})}};return R(()=>l()),(n,r)=>{const o=i("ElButton"),t=i("el-link"),d=i("PageContainer"),A=i("PageAuth");return C(),B(A,{pageName:W},{default:m(()=>[b(d,{hooks:E,"content-config":f($),"search-config":f(Y),"modal-config":a.value},{content_action:m(({status:v,down_url:D})=>[String(v)==="2"?(C(),B(t,{key:0,href:D,target:"_blank",underline:!1},{default:m(()=>[b(o,{link:"",size:"small",type:"primary",icon:f(S)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):H("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var K=k(j,[["__file","D:/work/jiesuan/settle-vue3/src/views/reportForm/personnelReportRecord/index.vue"]]);export{K as default};
