1 |
- /* empty css *//* empty css */import{u as e,_ as a}from"./useOpen-a24750bc.js";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-8d4d2c2d.js";import{u as s}from"./useGetList-10bd17fb.js";/* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{_ as t}from"./destroy.vue_vue_type_script_setup_true_lang-3e425698.js";import{_ as r}from"./update.vue_vue_type_script_setup_true_lang-03546537.js";import{_ as o}from"./index.vue_vue_type_script_setup_true_lang-a6bb1841.js";import{_ as u}from"./operate.vue_vue_type_script_setup_true_lang-e1034c0d.js";import{_ as p}from"./search.vue_vue_type_script_setup_true_lang-5fdc06f2.js";import{_ as i}from"./index.vue_vue_type_script_setup_true_lang-bbb77980.js";/* empty css *//* empty css */import{_ as m}from"./create.vue_vue_type_script_setup_true_lang-97cec0ff.js";import{u as _}from"./useDestroy-ee426241.js";import{d,u as n,n as c,q as f,z as j,cy as v,o as b,c as y,e as w,a as V,w as g,f as h,Z as x,l as k,F as U,p as C,b as z,t as q,a9 as F,H as G,a5 as H,a6 as L,aa as O,cz as R,ah as Z,ab as D,a2 as I}from"./index-fe6c8641.js";/* empty css *//* empty css *//* empty css */import"./index-7cd89372.js";/* empty css *//* empty css */import"./add.vue_vue_type_script_setup_true_lang-ff3ef2bf.js";/* empty css *//* empty css */import"./useCreate-21e18dc5.js";import"./useShow-401252b0.js";import"./index-aef7c7a3.js";import"./http-3c23965b.js";const K={class:"flex flex-col justify-between w-full sm:flex-row"},M={class:"table-default"},P=d({__name:"index",setup(d){const P=n(),S="users",{data:W,query:Y,search:A,reset:B,loading:E}=s(S),{destroy:J,deleted:N}=_(),{open:Q,close:T,title:X,visible:$,id:ee}=e(),ae=c((()=>{var e;return null==(e=W.value)?void 0:e.data}));f();const le=f(!1);return j((()=>{A(),N(B),le.value=!v(P.getRoles)})),(e,s)=>{const _=H,d=L,n=i,c=p,f=u,j=O,v=R,P=o,W=Z,N=r,se=t,te=D,re=l,oe=a,ue=I;return b(),y("div",K,[w("div",{class:G(le.value?"w-full ml-0 sm:ml-2 mt-2 sm:mt-0":"w-full")},[V(c,{search:h(A),reset:h(B)},{body:g((()=>[V(d,{label:"用户名"},{default:g((()=>[V(_,{modelValue:h(Y).username,"onUpdate:modelValue":s[0]||(s[0]=e=>h(Y).username=e),clearable:""},null,8,["modelValue"])])),_:1}),V(d,{label:"邮箱"},{default:g((()=>[V(_,{modelValue:h(Y).email,"onUpdate:modelValue":s[1]||(s[1]=e=>h(Y).email=e),clearable:""},null,8,["modelValue"])])),_:1}),V(d,{label:"状态"},{default:g((()=>[V(n,{modelValue:h(Y).status,"onUpdate:modelValue":s[2]||(s[2]=e=>h(Y).status=e),clearable:"",api:"status"},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),w("div",M,[V(f,{show:h(Q)},null,8,["show"]),x((b(),k(te,{data:h(ae),class:"mt-3"},{default:g((()=>[V(j,{prop:"username",label:"用户名",width:"150"}),V(j,{prop:"avatar",label:"头像"},{default:g((e=>[V(v,{src:e.row.avatar},null,8,["src"])])),_:1}),V(j,{prop:"email",label:"邮箱"}),V(j,{prop:"status",label:"状态"},{default:g((e=>[V(P,{modelValue:e.row.status,"onUpdate:modelValue":a=>e.row.status=a,id:e.row.id,api:S},null,8,["modelValue","onUpdate:modelValue","id"])])),_:1}),V(j,{prop:"status",label:"所属角色"},{default:g((e=>[(b(!0),y(U,null,C(e.row.roles,(e=>(b(),k(W,{type:"success",class:"m-1",size:"default",effect:"dark",key:e.id},{default:g((()=>[z(q(e.role_name),1)])),_:2},1024)))),128))])),_:1}),V(j,{prop:"created_at",label:"创建时间"}),V(j,{label:"操作",width:"200"},{default:g((e=>[V(N,{onClick:a=>h(Q)(e.row.id)},null,8,["onClick"]),V(se,{onClick:a=>h(J)(S,e.row.id)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])),[[ue,h(E)]]),V(re)]),V(oe,{modelValue:h($),"onUpdate:modelValue":s[4]||(s[4]=e=>F($)?$.value=e:null),title:h(X),"destroy-on-close":""},{default:g((()=>[V(m,{onClose:s[3]||(s[3]=e=>h(T)(h(B))),primary:h(ee),api:S,"has-roles":le.value},null,8,["primary","has-roles"])])),_:1},8,["modelValue","title"])],2)])}}});export{P as default};
|