index-9ab3886a.js 8.6 KB

1
  1. import{d as _e,n as ie,r as d,f as ce,B as me,P as pe,o as n,c as H,i as e,w as a,a as l,Q as I,F as j,k as de,l as _,j as i,C as h,g as fe,a2 as S,E as ye,U as he,H as we,D as ve,G as ge,I as be,v as ke,J as xe,K as Ce,L as Ve,b$ as Ne,M as Ue,s as Se,N as Re,_ as De,__tla as Ee}from"./index-b2b3c6c4.js";import{_ as Te,__tla as Fe}from"./index-341fc94c.js";import{E as Pe,a as Ae,b as Be,__tla as Le}from"./el-dropdown-item-19b5f720.js";import{_ as Me,__tla as Ye}from"./ContentWrap-e91b2b5a.js";import{a as ze,D as He,__tla as Ie}from"./dict-7f0cc6d2.js";import{c as R,__tla as je}from"./permission-11ab3e6b.js";import{d as Ke,__tla as Oe}from"./formatTime-7e07ce72.js";import{d as qe}from"./download-20922b56.js";import{C as x}from"./constants-a1da293a.js";import{d as Ge,e as Qe,f as Je,h as Xe,r as $e,__tla as We}from"./index-292d166c.js";import Ze,{__tla as ea}from"./UserForm-f10227d5.js";import aa,{__tla as ta}from"./UserImportForm-43c0c7c7.js";import la,{__tla as ra}from"./UserAssignRoleForm-66d433df.js";import sa,{__tla as oa}from"./DeptTree-eba110ee.js";import{u as na,__tla as ua}from"./useMessage-a5edbb0f.js";import{__tla as _a}from"./index-2d76a87c.js";import{__tla as ia}from"./el-card-bd6e27c9.js";import{__tla as ca}from"./Dialog-70b24cbf.js";import{__tla as ma}from"./el-tree-select-7784ba1b.js";import"./tree-0af4953a.js";import{__tla as pa}from"./index-aaf296a4.js";import{__tla as da}from"./index-5a106189.js";import{__tla as fa}from"./el-link-45ef051e.js";import{__tla as ya}from"./index-f119fff1.js";import{__tla as ha}from"./index-b9a0b231.js";let K,wa=Promise.all([(()=>{try{return Ee}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return je}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})()]).then(async()=>{let D;D={class:"flex items-center justify-center"},K=De(_e({name:"SystemUser",__name:"index",setup(va){const y=na(),{t:E}=ie(),C=d(!0),T=d(0),F=d([]),o=ce({pageNo:1,pageSize:10,username:void 0,mobile:void 0,status:void 0,deptId:void 0,createTime:[]}),P=d(),c=async()=>{C.value=!0;try{const r=await Ge(o);F.value=r.list,T.value=r.total}finally{C.value=!1}},k=()=>{o.pageNo=1,c()},O=()=>{var r;(r=P.value)==null||r.resetFields(),k()},q=async r=>{o.deptId=r.id,await c()},A=d(),B=(r,s)=>{A.value.open(r,s)},L=d(),G=()=>{L.value.open()},V=d(!1),Q=async()=>{try{await y.exportConfirm(),V.value=!0;const r=await Je(o);qe.excel(r,"\u7528\u6237\u6570\u636E.xls")}catch{}finally{V.value=!1}},J=async r=>{try{await y.delConfirm(),await Xe(r),y.success(E("common.delSuccess")),await c()}catch{}},X=async r=>{try{const s=(await y.prompt('\u8BF7\u8F93\u5165"'+r.username+'"\u7684\u65B0\u5BC6\u7801',E("common.reminder"))).value;await $e(r.id,s),y.success("\u4FEE\u6539\u6210\u529F\uFF0C\u65B0\u5BC6\u7801\u662F\uFF1A"+s)}catch{}},M=d(),$=r=>{M.value.open(r)};return me(()=>{c()}),(r,s)=>{const N=Me,Y=ye,z=he,w=we,W=ve,Z=ge,ee=be,u=ke,f=xe,ae=Ce,m=Ve,te=Ne,U=Pe,le=Ae,re=Be,se=Ue,oe=Te,ne=Se,v=pe("hasPermi"),ue=Re;return n(),H(j,null,[e(ne,{gutter:20},{default:a(()=>[e(Y,{span:4,xs:24},{default:a(()=>[e(N,{class:"h-1/1"},{default:a(()=>[e(sa,{onNodeClick:q})]),_:1})]),_:1}),e(Y,{span:20,xs:24},{default:a(()=>[e(N,null,{default:a(()=>[e(ae,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:P,inline:!0,"label-width":"68px"},{default:a(()=>[e(w,{label:"\u7528\u6237\u540D\u79F0",prop:"username"},{default:a(()=>[e(z,{modelValue:l(o).username,"onUpdate:modelValue":s[0]||(s[0]=t=>l(o).username=t),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0",clearable:"",onKeyup:I(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(w,{label:"\u624B\u673A\u53F7\u7801",prop:"mobile"},{default:a(()=>[e(z,{modelValue:l(o).mobile,"onUpdate:modelValue":s[1]||(s[1]=t=>l(o).mobile=t),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801",clearable:"",onKeyup:I(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(w,{label:"\u72B6\u6001",prop:"status"},{default:a(()=>[e(Z,{modelValue:l(o).status,"onUpdate:modelValue":s[2]||(s[2]=t=>l(o).status=t),placeholder:"\u7528\u6237\u72B6\u6001",clearable:"",class:"!w-240px"},{default:a(()=>[(n(!0),H(j,null,de(l(ze)(l(He).COMMON_STATUS),t=>(n(),_(W,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(w,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:a(()=>[e(ee,{modelValue:l(o).createTime,"onUpdate:modelValue":s[3]||(s[3]=t=>l(o).createTime=t),"value-format":"YYYY-MM-DD HH:mm:ss",type:"datetimerange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F",class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(w,null,{default:a(()=>[e(f,{onClick:k},{default:a(()=>[e(u,{icon:"ep:search"}),i("\u641C\u7D22")]),_:1}),e(f,{onClick:O},{default:a(()=>[e(u,{icon:"ep:refresh"}),i("\u91CD\u7F6E")]),_:1}),h((n(),_(f,{type:"primary",plain:"",onClick:s[4]||(s[4]=t=>B("create"))},{default:a(()=>[e(u,{icon:"ep:plus"}),i(" \u65B0\u589E ")]),_:1})),[[v,["system:user:create"]]]),h((n(),_(f,{type:"warning",plain:"",onClick:G},{default:a(()=>[e(u,{icon:"ep:upload"}),i(" \u5BFC\u5165 ")]),_:1})),[[v,["system:user:import"]]]),h((n(),_(f,{type:"success",plain:"",onClick:Q,loading:l(V)},{default:a(()=>[e(u,{icon:"ep:download"}),i("\u5BFC\u51FA ")]),_:1},8,["loading"])),[[v,["system:user:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(N,null,{default:a(()=>[h((n(),_(se,{data:l(F)},{default:a(()=>[e(m,{label:"\u7528\u6237\u7F16\u53F7",align:"center",key:"id",prop:"id"}),e(m,{label:"\u7528\u6237\u540D\u79F0",align:"center",prop:"username","show-overflow-tooltip":!0}),e(m,{label:"\u7528\u6237\u6635\u79F0",align:"center",prop:"nickname","show-overflow-tooltip":!0}),e(m,{label:"\u90E8\u95E8",align:"center",key:"deptName",prop:"deptName","show-overflow-tooltip":!0}),e(m,{label:"\u624B\u673A\u53F7\u7801",align:"center",prop:"mobile",width:"120"}),e(m,{label:"\u72B6\u6001",key:"status"},{default:a(t=>[e(te,{modelValue:t.row.status,"onUpdate:modelValue":g=>t.row.status=g,"active-value":0,"inactive-value":1,onChange:g=>(async p=>{try{const b=p.status===x.ENABLE?"\u542F\u7528":"\u505C\u7528";await y.confirm('\u786E\u8BA4\u8981"'+b+'""'+p.username+'"\u7528\u6237\u5417?'),await Qe(p.id,p.status),await c()}catch{p.status=p.status===x.ENABLE?x.DISABLE:x.ENABLE}})(t.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(m,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:l(Ke),width:"180"},null,8,["formatter"]),e(m,{label:"\u64CD\u4F5C",align:"center",width:"160"},{default:a(t=>[fe("div",D,[h((n(),_(f,{type:"primary",link:"",onClick:g=>B("update",t.row.id)},{default:a(()=>[e(u,{icon:"ep:edit"}),i("\u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[v,["system:user:update"]]]),h((n(),_(re,{onCommand:g=>((p,b)=>{switch(p){case"handleDelete":J(b.id);break;case"handleResetPwd":X(b);break;case"handleRole":$(b)}})(g,t.row)},{dropdown:a(()=>[e(le,null,{default:a(()=>[l(R)(["system:user:delete"])?(n(),_(U,{key:0,command:"handleDelete"},{default:a(()=>[e(u,{icon:"ep:delete"}),i("\u5220\u9664 ")]),_:1})):S("",!0),l(R)(["system:user:update-password"])?(n(),_(U,{key:1,command:"handleResetPwd"},{default:a(()=>[e(u,{icon:"ep:key"}),i("\u91CD\u7F6E\u5BC6\u7801 ")]),_:1})):S("",!0),l(R)(["system:permission:assign-user-role"])?(n(),_(U,{key:2,command:"handleRole"},{default:a(()=>[e(u,{icon:"ep:circle-check"}),i("\u5206\u914D\u89D2\u8272 ")]),_:1})):S("",!0)]),_:1})]),default:a(()=>[e(f,{type:"primary",link:""},{default:a(()=>[e(u,{icon:"ep:d-arrow-right"}),i(" \u66F4\u591A")]),_:1})]),_:2},1032,["onCommand"])),[[v,["system:user:delete","system:user:update-password","system:permission:assign-user-role"]]])])]),_:1})]),_:1},8,["data"])),[[ue,l(C)]]),e(oe,{total:l(T),page:l(o).pageNo,"onUpdate:page":s[5]||(s[5]=t=>l(o).pageNo=t),limit:l(o).pageSize,"onUpdate:limit":s[6]||(s[6]=t=>l(o).pageSize=t),onPagination:c},null,8,["total","page","limit"])]),_:1})]),_:1})]),_:1}),e(Ze,{ref_key:"formRef",ref:A,onSuccess:c},null,512),e(aa,{ref_key:"importFormRef",ref:L,onSuccess:c},null,512),e(la,{ref_key:"assignRoleFormRef",ref:M,onSuccess:c},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/system/user/index.vue"]])});export{wa as __tla,K as default};