2023-05-12 18:10:29 +08:00
|
|
|
import{_ as G,O as H,u as J,r as d,B as M,d as r,V,o as h,c as W,Q as m,R as x,f as o,e,w as t,j as R,m as _,k as w,P as X,l as Y,x as Z,s as ee}from"./index.be11ec00.js";import oe from"./selectUser.cc64958c.js";import{a as te,b as le,c as ne}from"./role.432a7e6f.js";const ae={class:"app-container"},se=H({name:"AuthUser"}),re=Object.assign(se,{setup(ue){const P=J(),{proxy:u}=ee(),{sys_normal_disable:$}=u.useDict("sys_normal_disable"),k=d([]),y=d(!0),g=d(!0),S=d(!0),v=d(0),N=d([]),n=M({pageNum:1,pageSize:10,roleId:P.params.roleId,userName:void 0,phonenumber:void 0});function c(){y.value=!0,te(n).then(s=>{k.value=s.rows,v.value=s.total,y.value=!1})}function A(){const s={path:"/system/role"};u.$tab.closeOpenPage(s)}function f(){n.pageNum=1,c()}function B(){u.resetForm("queryRef"),f()}function D(s){N.value=s.map(a=>a.userId),S.value=!s.length}function K(){u.$refs.selectRef.show()}function T(s){u.$modal.confirm('\u786E\u8BA4\u8981\u53D6\u6D88\u8BE5\u7528\u6237"'+s.userName+'"\u89D2\u8272\u5417\uFF1F').then(function(){return le({userId:s.userId,roleId:n.roleId})}).then(()=>{c(),u.$modal.msgSuccess("\u53D6\u6D88\u6388\u6743\u6210\u529F")}).catch(()=>{})}function j(s){const a=n.roleId,b=N.value.join(",");u.$modal.confirm("\u662F\u5426\u53D6\u6D88\u9009\u4E2D\u7528\u6237\u6388\u6743\u6570\u636E\u9879?").then(function(){return ne({roleId:a,userIds:b})}).then(()=>{c(),u.$modal.msgSuccess("\u53D6\u6D88\u6388\u6743\u6210\u529F")}).catch(()=>{})}return c(),(s,a)=>{const b=r("el-input"),C=r("el-form-item"),p=r("el-button"),O=r("el-form"),I=r("el-col"),Q=r("right-toolbar"),q=r("el-row"),i=r("el-table-column"),z=r("dict-tag"),L=r("el-table"),E=r("pagination"),U=V("hasPermi"),F=V("loading");return h(),W("div",ae,[m(e(O,{model:o(n),ref:"queryRef",inline:!0},{default:t(()=>[e(C,{label:"\u7528\u6237\u540D\u79F0",prop:"userName"},{default:t(()=>[e(b,{modelValue:o(n).userName,"onUpdate:modelValue":a[0]||(a[0]=l=>o(n).userName=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0",clearable:"",style:{width:"240px"},onKeyup:R(f,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(C,{label:"\u624B\u673A\u53F7\u7801",prop:"phonenumber"},{default:t(()=>[e(b,{modelValue:o(n).phonenumber,"onUpdate:modelValue":a[1]||(a[1]=l=>o(n).phonenumber=l),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801",clearable:"",style:{width:"240px"},onKeyup:R(f,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(C,null,{default:t(()=>[e(p,{type:"primary",icon:"Search",onClick:f},{default:t(()=>[_("\u641C\u7D22")]),_:1}),e(p,{icon:"Refresh",onClick:B},{default:t(()=>[_("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[x,o(g)]]),e(q,{gutter:10,class:"mb8"},{default:t(()=>[e(I,{span:1.5},{default:t(()=>[m((h(),w(p,{type:"primary",plain:"",icon:"Plus",onClick:K},{default:t(()=>[_("\u6DFB\u52A0\u7528\u6237")]),_:1})),[[U,["system:role:add"]]])]),_:1},8,["span"]),e(I,{span:1.5},{default:t(()=>[m((h(),w(p,{type:"danger",plain:"",icon:"CircleClose",disabled:o(S),onClick:j},{default:t(()=>[_("\u6279\u91CF\u53D6\u6D88\u6388\u6743")]),_:1},8,["disabled"])),[[U,["system:role:remove"]]])]),_:1},8,["span"]),e(I,{span:1.5},{default:t(()=>[e(p,{type:"warning",plain:"",icon:"Close",onClick:A},{default:t(()=>[_("\u5173\u95ED")]),_:1})]),_:1},8,["span"]),e(Q,{showSearch:o(g),"onUpdate:showSearch":a[2]||(a[2]=l=>X(g)?g.value=l:null),onQueryTable:c},null,8,["showSearch"])]),_:1}),m((h(),w(L,{data:o(k),onSelectionChange:D},{default:t(()=>[e(i,{type:"selection",width:"55",align:"center"}),e(i,{label:"\u7528\u6237\u540D\u79F0",prop:"userName","show-overflow-tooltip":!0}),e(i,{label:"\u7528\u6237\u6635\u79F0",prop:"nickName","show-overflow-tooltip":!0}),e(i,{label:"\u90AE\u7BB1",prop:"email","show-overflow-tooltip":!0}),e(i,{label:"\u624B\u673A",prop:"phonenumber","show-overflow-tooltip":!0}),e(i,{label:"\u72B6\u6001",align:"center",prop:"status"},{default:t(l=>[e(z,{options:o($),value:l.row.status},null,8,["options","value"])]),_:1}),e(i,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180"},{default:t(l=>[Y("span",null,Z(s.parseTime(l.row.createTime
|