import{_ as z,r as u,c as i,x as D,o as b,d as V,e,f as o,y as x,z as q,A as B,k as p,t as U,q as $}from"./index-BkCHPRXb.js";import{p as I,a as L}from"./personnel-CrmtlWW_.js";const P={class:"app-container"},Q={__name:"index",setup(R){const{proxy:_}=$(),f=u([]),c=u(!1),m=u(0),a=u({pageNum:1,pageSize:10});function r(){const s={...a.value};c.value=!0,I(s).then(t=>{f.value=t.data.list,m.value=t.data.total,c.value=!1})}function v(){a.value.pageNum=1,a.value.pageSize=10,r()}function y(){a.value={pageNum:1,pageSize:10},v()}function h(s){_.$modal.confirm("您确定要删除吗？").then(function(){return L({id:s.id})}).then(t=>{r(),_.$modal.msgSuccess("删除成功")}).catch(()=>{})}return r(),(s,t)=>{const k=i("el-input"),g=i("el-form-item"),d=i("el-button"),S=i("el-form"),n=i("el-table-column"),N=i("el-table"),C=i("pagination"),w=D("loading");return b(),V("div",P,[e(S,{model:a.value,ref:"queryRef",inline:!0},{default:o(()=>[e(g,{label:"姓名"},{default:o(()=>[e(k,{placeholder:"请输入",modelValue:a.value.name,"onUpdate:modelValue":t[0]||(t[0]=l=>a.value.name=l)},null,8,["modelValue"])]),_:1}),e(g,null,{default:o(()=>[e(d,{type:"primary",icon:"Search",onClick:v},{default:o(()=>[p("搜索")]),_:1}),e(d,{icon:"Refresh",onClick:y},{default:o(()=>[p("重置")]),_:1})]),_:1})]),_:1},8,["model"]),x((b(),q(N,{data:f.value,"show-overflow-tooltip":""},{default:o(()=>[e(n,{label:"姓名",prop:"name"}),e(n,{label:"手机号",prop:"phoneNumber"}),e(n,{label:"年龄",prop:"age",align:"center"}),e(n,{label:"性别",prop:"sex"},{default:o(({row:l})=>[p(U(l.sex?"男":"女"),1)]),_:1}),e(n,{label:"民族",prop:"nation"}),e(n,{label:"创建时间",prop:"createTime",align:"center"}),e(n,{label:"操作",width:"160",align:"center"},{default:o(({row:l})=>[e(d,{link:"",type:"primary",icon:"Delete",onClick:T=>h(l)},{default:o(()=>[p("删除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[w,c.value]]),x(e(C,{total:m.value,page:a.value.pageNum,"onUpdate:page":t[1]||(t[1]=l=>a.value.pageNum=l),limit:a.value.pageSize,"onUpdate:limit":t[2]||(t[2]=l=>a.value.pageSize=l),onPagination:r},null,8,["total","page","limit"]),[[B,m.value>0]])])}}},j=z(Q,[["__scopeId","data-v-c947af0c"]]);export{j as default};
