import{r as d,A as E,B as L,c as i,C as N,d as x,e as Q,D as g,E as k,i as t,f as e,h as o,G as $,l as C,m as y,y as A,v as F}from"./index-BrMZ2dIo.js";import{p as G}from"./personArchives-aQvZsc_N.js";const I={class:"app-container"},J={__name:"index",setup(T){const{proxy:b}=F(),v=d([]),m=d(!0),w=d(!0),c=d(0),q=E({queryParams:{page:1,limit:10}}),{queryParams:l}=L(q);function _(){m.value=!0,G(l.value).then(p=>{v.value=p.data.data,c.value=p.data.count,m.value=!1})}function s(){l.value.page=1,l.value.limit=10,_()}function D(){b.resetForm("queryRef"),s()}function K(p){b.$router.push("/person/archives/details?id="+p.id)}return _(),(p,n)=>{const V=i("el-input"),u=i("el-form-item"),h=i("el-option"),U=i("el-select"),f=i("el-button"),B=i("el-form"),r=i("el-table-column"),R=i("el-table"),S=i("pagination"),P=N("loading");return x(),Q("div",I,[g(e(B,{model:t(l),ref:"queryRef",inline:!0},{default:o(()=>[e(u,{label:"姓名",prop:"name"},{default:o(()=>[e(V,{modelValue:t(l).name,"onUpdate:modelValue":n[0]||(n[0]=a=>t(l).name=a),clearable:"",style:{width:"300px"},onKeyup:C(s,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(u,{label:"证件号码",prop:"id_no"},{default:o(()=>[e(V,{modelValue:t(l).id_no,"onUpdate:modelValue":n[1]||(n[1]=a=>t(l).id_no=a),clearable:"",style:{width:"300px"},onKeyup:C(s,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(u,{label:"状态",prop:"state"},{default:o(()=>[e(U,{modelValue:t(l).state,"onUpdate:modelValue":n[2]||(n[2]=a=>t(l).state=a),placeholder:"请选择",style:{width:"300px"}},{default:o(()=>[e(h,{value:"entry",label:"在职"}),e(h,{value:"quit",label:"离职"})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:o(()=>[e(f,{type:"primary",icon:"Search",onClick:s},{default:o(()=>[y("搜索")]),_:1}),e(f,{icon:"Refresh",onClick:D},{default:o(()=>[y("重置")]),_:1})]),_:1})]),_:1},8,["model"]),[[k,t(w)]]),g((x(),$(R,{data:t(v)},{default:o(()=>[e(r,{label:"证件号码",align:"left",prop:"id_no"}),e(r,{label:"姓名",align:"left",prop:"name"},{default:o(({row:a})=>[e(f,{link:"",type:"primary",onClick:j=>K(a)},{default:o(()=>[y(A(a.name),1)]),_:2},1032,["onClick"])]),_:1}),e(r,{label:"性别",align:"center",prop:"sex"}),e(r,{label:"年龄",align:"center",prop:"age"}),e(r,{label:"籍贯",align:"center",prop:"register"}),e(r,{label:"状态",align:"left",prop:"state"}),e(r,{label:"入库时间",align:"left",prop:"create_time"}),e(r,{label:"更新时间",align:"left",prop:"update_time"})]),_:1},8,["data"])),[[P,t(m)]]),g(e(S,{total:t(c),page:t(l).page,"onUpdate:page":n[3]||(n[3]=a=>t(l).page=a),limit:t(l).limit,"onUpdate:limit":n[4]||(n[4]=a=>t(l).limit=a),onPagination:_},null,8,["total","page","limit"]),[[k,t(c)>0]])])}}};export{J as default};
