2024-11-21 17:27:37 +08:00
|
|
|
import{w as T,M as j,N as M,L as P,O as U}from"./element-plus.91c68cc0.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as I,b as K}from"./index.d12b3af4.js";import{c as O,d as Q}from"./role.91f5501d.js";import{u as q}from"./usePaging.f8c888e4.js";import{_ as G}from"./edit.vue_vue_type_script_setup_true_lang.c35a1fdc.js";import{_ as H}from"./auth.vue_vue_type_script_setup_true_lang.3d85b8ec.js";import{d as D,s as F,r as g,ap as J,o as a,c as E,U as t,L as i,a as C,M as d,K as u,R as h,u as n,j as W,Q as B,n as y}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.e03c2e5b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./menu.4dbf783b.js";const X={class:"role-lists"},Y={class:"mt-4"},Z={class:"flex justify-end mt-4"},ee=D({name:"role"}),Oe=D({...ee,setup(te){const c=F(),k=F(),f=g(!1),w=g(!1),{pager:m,getLists:p}=q({fetchFun:Q}),$=async()=>{var o;f.value=!0,await y(),(o=c.value)==null||o.open("add")},x=async o=>{var e,l;f.value=!0,await y(),(e=c.value)==null||e.open("edit"),(l=c.value)==null||l.setFormData(o)},A=async o=>{var e,l;w.value=!0,await y(),(e=k.value)==null||e.open(),(l=k.value)==null||l.setFormData(o)},R=async o=>{await I.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await O({id:o}),p()};return p(),(o,e)=>{const l=K,_=T,s=j,V=M,L=z,N=P,v=J("perms"),S=U;return a(),E("div",X,[t(N,{class:"!border-none",shadow:"never"},{default:i(()=>[C("div",null,[d((a(),u(_,{type:"primary",onClick:$},{icon:i(()=>[t(l,{name:"el-icon-Plus"})]),default:i(()=>[e[3]||(e[3]=h(" \u65B0\u589E "))]),_:1})),[[v,["auth.role/add"]]])]),d((a(),E("div",Y,[C("div",null,[t(V,{data:n(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:r})=>[d((a(),u(_,{link:"",type:"primary",onClick:b=>x(r)},{default:i(()=>e[4]||(e[4]=[h(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),d((a(),u(_,{link:"",type:"primary",onClick:b=>A(r)},{default:i(()=>e[5]||(e[5]=[h(" \u5206\u914D\u6743\u9650 ")])),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),d((a(),u(_,{link:"",type:"danger",onClick:b=>R(r.id)},{default:i(()=>e[6]||(e[6]=[h(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[v,["auth.role/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",Z,[t(L,{modelValue:n(m),"onUpdate:modelValue":e[0]||(e[0]=r=>W(m)?m.value=r:null),onChange:n(p)},null,8,["modelValue","onChange"])])])),[[S,n(m).loading]])]),_:1}),n(f)?(a(),u(G,{key:0,ref_key:"editRef",ref:c,onSuccess:n(p),onClose:e[1]||(e[1]=r=>f.value=!1)},null,8,["onSuccess"])):B("",!0),n(w)?(a(),u(H,{key:1,ref_key:"authRef",ref:k,onSuccess:n(p),onClose:e[2]||(e[2]=r=>w.value=!1)},null,8,["onSuccess"])):B("",!0)])}}
|