2023-09-19 14:34:21 +08:00
|
|
|
import{B as Qe,u as je,r as _,D as te,ab as Ae,P as He,Y as Ge,d,O as ae,o as s,c as S,e as l,w as t,k,f as a,F as O,G as y,i as ne,Q as T,R as D,j as r,m as v,H as oe,l as h,x as ue,s as Je}from"./index.42ab3fdc.js";import{e as We,l as Xe,f as Ze,h as el,r as ll,i as se,j as tl,k as al}from"./user.1b0a3484.js";const nl={class:"app-container"},ol={class:"head-container"},ul={class:"head-container"},sl={class:"dialog-footer"},dl=k("div",{class:"el-upload__text"},[v("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\uFF0C\u6216"),k("em",null,"\u70B9\u51FB\u4E0A\u4F20")],-1),rl={class:"el-upload__tip text-center"},il={class:"el-upload__tip"},pl=k("span",null,"\u4EC5\u5141\u8BB8\u5BFC\u5165xls\u3001xlsx\u683C\u5F0F\u6587\u4EF6\u3002",-1),ml={class:"dialog-footer"},cl=Qe({name:"User"}),gl=Object.assign(cl,{setup(fl){const de=je(),{proxy:i}=Je(),{sys_normal_disable:H,sys_user_sex:re}=i.useDict("sys_normal_disable","sys_user_sex"),G=_([]),x=_(!1),L=_(!0),P=_(!0),z=_([]),J=_(!0),W=_(!0),E=_(0),M=_(""),$=_([]),F=_(""),Y=_(void 0),ie=_(void 0),Q=_([]),j=_([]),b=te({open:!1,title:"",isUploading:!1,updateSupport:0,headers:{Authorization:"Bearer "+Ae()},url:"http://36.134.44.75:6901/system/user/importData"}),I=_([{key:0,label:"\u7528\u6237\u7F16\u53F7",visible:!0},{key:1,label:"\u7528\u6237\u540D\u79F0",visible:!0},{key:2,label:"\u7528\u6237\u6635\u79F0",visible:!0},{key:3,label:"\u90E8\u95E8",visible:!0},{key:4,label:"\u624B\u673A\u53F7\u7801",visible:!0},{key:5,label:"\u72B6\u6001",visible:!0},{key:6,label:"\u521B\u5EFA\u65F6\u95F4",visible:!0}]),pe=te({form:{},queryParams:{pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,status:void 0,deptId:void 0},rules:{userName:[{required:!0,message:"\u7528\u6237\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{min:2,max:20,message:"\u7528\u6237\u540D\u79F0\u957F\u5EA6\u5FC5\u987B\u4ECB\u4E8E 2 \u548C 20 \u4E4B\u95F4",trigger:"blur"}],nickName:[{required:!0,message:"\u7528\u6237\u6635\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],password:[{required:!0,message:"\u7528\u6237\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{min:5,max:20,message:"\u7528\u6237\u5BC6\u7801\u957F\u5EA6\u5FC5\u987B\u4ECB\u4E8E 5 \u548C 20 \u4E4B\u95F4",trigger:"blur"}],email:[{type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740",trigger:["blur","change"]}],phonenumber:[{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801",trigger:"blur"}]}}),{queryParams:c,form:u,rules:me}=He(pe),ce=(o,n)=>o?n.label.indexOf(o)!==-1:!0;Ge(F,o=>{i.$refs.deptTreeRef.filter(o)});function fe(){We().then(o=>{Y.value=o.data})}function U(){L.value=!0,Xe(i.addDateRange(c.value,$.value)).then(o=>{L.value=!1,G.value=o.rows,E.value=o.total})}function _e(o){c.value.deptId=o.id,R()}function R(){c.value.pageNum=1,U()}function be(){$.value=[],i.resetForm("queryRef"),c.value.deptId=void 0,i.$refs.tree.setCurrentKey(null),R()}function X(o){const n=o.userId||z.value;i.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u7528\u6237\u7F16\u53F7\u4E3A"'+n+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return Ze(n)}).then(()=>{U(),i.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}function ge(){i.download("system/user/export",{...c.value},`user_${new Date().getTime()}.xlsx`)}function ve(o){let n=o.status==="0"?"\u542F\u7528":"\u505C\u7528";i.$modal.confirm('\u786E\u8BA4\u8981"'+n+'""'+o.userName+'"\u7528\u6237\u5417?').then(function(){return el(o.userId,o.status)}).then(()=>{i.$modal.msgSuccess(n+"\u6210\u529F")}).catch(function(){o.status=o.status==="0"?"1":"0"})}function he(o){const n=o.userId;de.push("/system/user-auth/role/"+n)}function ye(o){i.$prompt('\u8BF7\u8F93\u5165"'+o.userName+'"\u7684\u65B0\u5BC6\u7801',"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",closeOnClickModal:!1,inputPattern:/^.{5,20}$/,inputErrorMessage:"\u7528\u6237\u5BC6\u7801\u957F\u5EA6\u5FC5\u987B\u4ECB\u4E8E 5 \u548C 20 \u4E4B\u95F4"}).then(({value:n})=>{ll(o.userId,n).then(p=>{i.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F\uFF0
|