Agriculture-front-end/dist/assets/index.8a6e5966.js

2 lines
17 KiB
JavaScript
Raw Normal View History

import{G as Ye,u as je,r as _,I as te,ak as Qe,U as Ge,a2 as He,d,T as ae,o as s,c as S,e as l,w as t,l as k,f as a,J as L,K as y,j as ne,V as T,W as D,k as r,n as g,M as oe,m as h,A as ue,v as Je}from"./index.064676a5.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.12858b8e.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"},[g("\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=Ye({name:"User"}),vl=Object.assign(cl,{setup(fl){const de=je(),{proxy:i}=Je(),{sys_normal_disable:G,sys_user_sex:re}=i.useDict("sys_normal_disable","sys_user_sex"),H=_([]),x=_(!1),M=_(!0),P=_(!0),O=_([]),J=_(!0),W=_(!0),z=_(0),E=_(""),$=_([]),F=_(""),A=_(void 0),ie=_(void 0),Y=_([]),j=_([]),b=te({open:!1,title:"",isUploading:!1,updateSupport:0,headers:{Authorization:"Bearer "+Qe()},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}=Ge(pe),ce=(o,n)=>o?n.label.indexOf(o)!==-1:!0;He(F,o=>{i.$refs.deptTreeRef.filter(o)});function fe(){We().then(o=>{A.value=o.data})}function U(){M.value=!0,Xe(i.addDateRange(c.value,$.value)).then(o=>{M.value=!1,H.value=o.rows,z.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||O.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 ve(){i.download("system/user/export",{...c.value},`user_${new Date().getTime()}.xlsx`)}function ge(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\u529