import{P as $,u as I}from"./index.9e8820cd.js";import{P as N}from"./index.35b8c9ab.js";import{d as j,b as q,r as w,p as R,o as S,cH as V,ct as H,cI as M,cr as T,_ as G,c as n,at as J,e as _,f as C,g as c,h as e,i as o,w as K,k as y,F as P,j as O,m as p}from"./index.0308b213.js";const Q=j({components:{Pagination:$,Popup:N},setup(){const a=q({page_no:1,page_size:10,account:"",name:"",role_id:""}),s=w([]),f=w(0),{pager:b,requestApi:u,resetParams:v,resetPage:m}=I({callback:V,params:a}),r=l=>{H({id:l.id,account:l.account,name:l.name,role_id:l.role_id,disable:l.disable,multipoint_login:l.multipoint_login}).finally(()=>{u()})},g=l=>{M({id:l}).then(()=>{u()})},h=()=>{T({page_type:1}).then(l=>{s.value=l.lists,f.value=l.count})};return R(()=>[a.page_no,a.page_size],()=>{u()}),S(()=>{u(),h()}),{formData:a,roleList:s,count:f,pager:b,requestApi:u,resetParams:v,resetPage:m,adminLists:V,changeStatus:r,handleDelete:g}}});const W={class:"admin"},X={class:"m-l-20"},Y=p("\u67E5\u8BE2"),Z=p("\u91CD\u7F6E"),x=p("\u65B0\u589E\u7BA1\u7406\u5458"),ee={class:"m-t-15"},ae=p("\u7F16\u8F91"),te=p("\u5220\u9664"),oe={class:"pagination"};function le(a,s,f,b,u,v){const m=n("el-input"),r=n("el-form-item"),g=n("el-option"),h=n("el-select"),l=n("el-button"),k=n("el-form"),D=n("el-card"),F=n("router-link"),i=n("el-table-column"),z=n("el-avatar"),B=n("el-switch"),E=n("popup"),A=n("el-table"),U=n("el-pagination"),L=J("loading");return _(),C(P,null,[c("div",W,[e(D,{shadow:"never"},{default:o(()=>[e(k,{class:"ls-form",model:a.formData,"label-width":"80px",size:"small",inline:""},{default:o(()=>[e(r,{label:"\u8D26\u53F7\uFF1A"},{default:o(()=>[e(m,{modelValue:a.formData.account,"onUpdate:modelValue":s[0]||(s[0]=t=>a.formData.account=t),class:"ls-input"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u540D\u79F0\uFF1A"},{default:o(()=>[e(m,{modelValue:a.formData.name,"onUpdate:modelValue":s[1]||(s[1]=t=>a.formData.name=t),class:"ls-input"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u89D2\u8272\uFF1A"},{default:o(()=>[e(h,{modelValue:a.formData.role_id,"onUpdate:modelValue":s[2]||(s[2]=t=>a.formData.role_id=t),placeholder:"\u5168\u90E8"},{default:o(()=>[(_(!0),C(P,null,O(a.roleList,(t,d)=>(_(),y(g,{key:d,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[c("div",X,[e(l,{type:"primary",onClick:a.resetPage},{default:o(()=>[Y]),_:1},8,["onClick"]),e(l,{onClick:a.resetParams},{default:o(()=>[Z]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["model"])]),_:1}),K((_(),y(D,{class:"m-t-15",shadow:"never"},{default:o(()=>[e(F,{to:"/saas/permission/admin/edit"},{default:o(()=>[e(l,{type:"primary",size:"small"},{default:o(()=>[x]),_:1})]),_:1}),c("div",ee,[e(A,{data:a.pager.lists},{default:o(()=>[e(i,{label:"ID",prop:"id","min-width":"60"}),e(i,{label:"\u5934\u50CF","min-width":"100"},{default:o(({row:t})=>[e(z,{size:50,src:t.avatar},null,8,["src"])]),_:1}),e(i,{label:"\u8D26\u53F7",prop:"account","min-width":"100"}),e(i,{label:"\u540D\u79F0",prop:"name","min-width":"100"}),e(i,{label:"\u89D2\u8272",prop:"role_name","min-width":"100"}),e(i,{label:"\u5E73\u53F0\u540D\u79F0",prop:"uniacid_name","min-width":"100"}),e(i,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"150"}),e(i,{label:"\u6700\u8FD1\u767B\u5F55\u65F6\u95F4",prop:"login_time","min-width":"150"}),e(i,{label:"\u6700\u8FD1\u767B\u5F55IP",prop:"login_ip","min-width":"100"}),e(i,{label:"\u72B6\u6001","min-width":"100"},{default:o(({row:t})=>[e(B,{modelValue:t.disable,"onUpdate:modelValue":d=>t.disable=d,"active-value":0,"inactive-value":1,onChange:d=>a.changeStatus(t)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(i,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:o(({row:t})=>[e(F,{class:"m-r-10",to:{path:"/saas/permission/admin/edit",query:{id:t.id}}},{default:o(()=>[e(l,{type:"primary",text:""},{default:o(()=>[ae]),_:1})]),_:2},1032,["to"]),e(E,{class:"m-r-10 inline",onConfirm:d=>a.handleDelete(t.id)},{trigger:o(()=>[e(l,{type:"danger",text:""},{default:o(()=>[te]),_:1})]),_:2},1032,["onConfirm"])]),_:1})]),_:1},8,["data"])])]),_:1})),[[L,a.pager.loading]])]),c("div",oe,[e(U,{currentPage:a.formData.page_no,"onUpdate:currentPage":s[3]||(s[3]=t=>a.formData.page_no=t),"page-size":a.formData.page_size,"onUpdate:page-size":s[4]||(s[4]=t=>a.formData.page_size=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a.pager.count},null,8,["currentPage","page-size","total"])])],64)}const ue=G(Q,[["render",le],["__scopeId","data-v-436109a8"]]);export{ue as default};
