import{Z as _,cp as v,S as A,_ as x,d as C,m as l,cC as b,r as p,o as w,A as y,x as E,h as B,u as m}from"./index.e80c366d.js";import{h as D,a as S,b as P,c as k}from"./index.0a7e25ad.js";import{h as L}from"./index.890a7690.js";import{u as M}from"./use-page-search.e3e95470.js";import{u as N}from"./use-page-modal.2afc964f.js";const H=[{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:"\u72B6\u6001",prop:"status","min-width":"80px",cellRenderer:({row:e,props:u})=>_(v,{size:u.size,type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name","min-width":"80px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime","min-width":"140px",formatter:({addtime:e})=>A(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:100,slot:"operation"}],I={title:"\u53EF\u7533\u8BF7\u62A5\u8868",superUserNoAction:!1,showCreate:e=>e,showStatus:e=>e,columns:H,apis:{httpList:D,httpAdd:S,httpStatus:P}},d={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u72B6\u6001",options:[{value:"0",label:"\u7981\u7528"},{value:"1",label:"\u542F\u7528"}]},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"}]},f={title:"\u53EF\u7533\u8BF7\u62A5\u8868",colLayout:{span:24},itemStyle:{},formItems:[{field:"name",type:"input",label:"\u62A5\u8868\u540D\u79F0",labelWidth:"120px",placeholder:"\u62A5\u8868\u540D\u79F0",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u62A5\u8868\u540D\u79F0"}],otherOptions:{disabled:!0}},{field:"action",type:"select",label:"\u62A5\u8868\u9009\u9879",labelWidth:"120px",placeholder:"\u62A5\u8868\u9009\u9879",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868\u9009\u9879"}],options:[]}]},R="personnelReport",Y=C({__name:"index",setup(e){const u=l(f),h=l(null),r=l([]),i=l([]);async function c(t){const a=[],{code:s,data:n}=t==1?await k({}):await L({page:1,size:1e4});return s===0&&(t==1?n:n.list).forEach(o=>{const F={value:t==1?o.action:o.companyNo,label:(t==1,o.name)};a.push(F)}),a}const g={pageSearchHook:()=>M(void 0,void 0,d),pageModalHook:t=>N({pageContentRef:t})};return b(async()=>{r.value=await c(1),i.value=await c(2),u.value.formItems[1].options=r.value,u.value.formItems[2].options=i.value}),f.onDataChange=function(t){const a=r.value.find(({value:s})=>s===t.action);return{...t,name:a?a.label:""}},(t,a)=>{const s=p("PageContainer"),n=p("PageAuth");return w(),y(n,{pageName:R},{default:E(()=>[B(s,{hooks:g,contentConfig:m(I),"search-config":m(d),"modal-config":u.value,"get-modal-ref":o=>h.value=o},null,8,["contentConfig","search-config","modal-config","get-modal-ref"])]),_:1})}}});var O=x(Y,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/reportForm/personnelReport/index.vue"]]);export{O as default};
