2023-12-01 10:40:59 +08:00
|
|
|
import{w as S,L as j,M as I,I as P,N as z}from"./element-plus.a3f01f50.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.b069f63a.js";import{f as K,b as M}from"./index.8b9a2a7d.js";import{c as Q,d as U}from"./role.ecb22719.js";import{u as q}from"./usePaging.2a59f422.js";import{_ as G}from"./edit.vue_vue_type_script_setup_true_lang.5a1c9070.js";import{_ as H}from"./auth.vue_vue_type_script_setup_true_lang.977eb0b9.js";import{d as D,s as F,r as g,ae as O,o as a,c as E,T as t,K as i,J as r,u,Q as B,a as C,L as c,j as W,R as v,n as y}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.f258b2c3.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.ec5da75f.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.9a4d0376.js";import"./menu.387d2f55.js";const X={class:"role-lists"},Y=v(" \u65B0\u589E "),Z={class:"mt-4"},ee=v(" \u7F16\u8F91 "),te=v(" \u5206\u914D\u6743\u9650 "),oe=v(" \u5220\u9664 "),ae={class:"flex justify-end mt-4"},ie=D({name:"role"}),Ge=D({...ie,setup(ne){const d=F(),k=F(),_=g(!1),w=g(!1),{pager:m,getLists:p}=q({fetchFun:Q}),$=async()=>{var o;_.value=!0,await y(),(o=d.value)==null||o.open("add")},x=async o=>{var e,n;_.value=!0,await y(),(e=d.value)==null||e.open("edit"),(n=d.value)==null||n.setFormData(o)},A=async o=>{var e,n;w.value=!0,await y(),(e=k.value)==null||e.open(),(n=k.value)==null||n.setFormData(o)},R=async o=>{await K.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await U({id:o}),p()};return p(),(o,e)=>{const n=M,f=S,s=j,V=I,L=J,N=P,h=O("perms"),T=z;return a(),E("div",X,[t(N,{class:"!border-none",shadow:"never"},{default:i(()=>[C("div",null,[c((a(),r(f,{type:"primary",onClick:$},{icon:i(()=>[t(n,{name:"el-icon-Plus"})]),default:i(()=>[Y]),_:1})),[[h,["auth.role/add"]]])]),c((a(),E("div",Z,[C("div",null,[t(V,{data:u(m).lists,size:"large"},{default:i(()=>[t(s,{prop:"id",label:"ID","min-width":"100"}),t(s,{prop:"name",label:"\u540D\u79F0","min-width":"150"}),t(s,{prop:"desc",label:"\u5907\u6CE8","min-width":"150","show-overflow-tooltip":""}),t(s,{prop:"sort",label:"\u6392\u5E8F","min-width":"100"}),t(s,{prop:"num",label:"\u7BA1\u7406\u5458\u4EBA\u6570","min-width":"100"}),t(s,{prop:"create_time",label:"\u521B\u5EFA\u65F6\u95F4","min-width":"180"}),t(s,{label:"\u64CD\u4F5C",width:"200",fixed:"right"},{default:i(({row:l})=>[c((a(),r(f,{link:"",type:"primary",onClick:b=>x(l)},{default:i(()=>[ee]),_:2},1032,["onClick"])),[[h,["auth.role/edit"]]]),c((a(),r(f,{link:"",type:"primary",onClick:b=>A(l)},{default:i(()=>[te]),_:2},1032,["onClick"])),[[h,["auth.role/edit"]]]),c((a(),r(f,{link:"",type:"danger",onClick:b=>R(l.id)},{default:i(()=>[oe]),_:2},1032,["onClick"])),[[h,["auth.role/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",ae,[t(L,{modelValue:u(m),"onUpdate:modelValue":e[0]||(e[0]=l=>W(m)?m.value=l:null),onChange:u(p)},null,8,["modelValue","onChange"])])])),[[T,u(m).loading]])]),_:1}),_.value?(a(),r(G,{key:0,ref_key:"editRef",ref:d,onSuccess:u(p),onClose:e[1]||(e[1]=l=>_.value=!1)},null,8,["onSuccess"])):B("",!0),w.value?(a(),r(H,{key:1,ref_key:"authRef",ref:k,onSuccess:u(p),onClose:e[2]||(e[2]=l=>w.value=!1)},null,8,["onSuccess"])):B("",!0)])}}});export{Ge as default};
|