2 lines
4.1 KiB
JavaScript
2 lines
4.1 KiB
JavaScript
|
import{w as S,P as L,Q as j,J as Q,R as U}from"./element-plus.ff90c99c.js";import{_ as q}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{f as z,b as I}from"./index.872975fb.js";import{c as J,d as W}from"./role.a5106d89.js";import{u as G}from"./usePaging.bd7a7dec.js";import{_ as H}from"./edit.vue_vue_type_script_setup_true_lang.b1b117d0.js";import{_ as K}from"./auth.vue_vue_type_script_setup_true_lang.d620dc3e.js";import{d as D,s as F,r as g,aq as M,o as a,c as E,W as t,Q as i,a as C,R as c,P as m,U as h,u as n,j as O,T as B,n as y}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";import"./index.000fc3bb.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./menu.28ddae64.js";const X={class:"role-lists"},Y={class:"mt-4"},Z={class:"flex justify-end mt-4"},ee=D({name:"role"}),He=D({...ee,setup(te){const d=F(),k=F(),_=g(!1),w=g(!1),{pager:u,getLists:p}=G({fetchFun:W}),$=async()=>{var o;_.value=!0,await y(),(o=d.value)==null||o.open("add")},R=async o=>{var e,l;_.value=!0,await y(),(e=d.value)==null||e.open("edit"),(l=d.value)==null||l.setFormData(o)},x=async o=>{var e,l;w.value=!0,await y(),(e=k.value)==null||e.open(),(l=k.value)==null||l.setFormData(o)},A=async o=>{await z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await J({id:o}),p()};return p(),(o,e)=>{const l=I,f=S,r=L,V=j,T=q,N=Q,v=M("perms"),P=U;return a(),E("div",X,[t(N,{class:"!border-none",shadow:"never"},{default:i(()=>[C("div",null,[c((a(),m(f,{type:"primary",onClick:$},{icon:i(()=>[t(l,{name:"el-icon-Plus"})]),default:i(()=>[h(" \u65B0\u589E ")]),_:1})),[[v,["auth.role/add"]]])]),c((a(),E("div",Y,[C("div",null,[t(V,{data:n(u).lists,size:"large"},{default:i(()=>[t(r,{prop:"id",label:"ID","min-width":"100"}),t(r,{prop:"name",label:"\u540D\u79F0","min-width":"150"}),t(r,{prop:"desc",label:"\u5907\u6CE8","min-width":"150","show-overflow-tooltip":""}),t(r,{prop:"sort",label:"\u6392\u5E8F","min-width":"100"}),t(r,{prop:"num",label:"\u7BA1\u7406\u5458\u4EBA\u6570","min-width":"100"}),t(r,{prop:"create_time",label:"\u521B\u5EFA\u65F6\u95F4","min-width":"180"}),t(r,{label:"\u64CD\u4F5C",width:"200",fixed:"right"},{default:i(({row:s})=>[c((a(),m(f,{link:"",type:"primary",onClick:b=>R(s)},{default:i(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((a(),m(f,{link:"",type:"primary",onClick:b=>x(s)},{default:i(()=>[h(" \u5206\u914D\u6743\u9650 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((a(),m(f,{link:"",type:"danger",onClick:b=>A(s.id)},{default:i(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["auth.role/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",Z,[t(T,{modelValue:n(u),"onUpdate:modelValue":e[0]||(e[0]=s=>O(u)?u.value=s:null),onChange:n(p)},null,8,["modelValue","onChange"])])])),[[P,n(u).loading]])]),_:1}),n(_)?(a(),m(H,{key:0,ref_key:"editRef",ref:d,onSuccess:n(p),onClose:e[1]||(e[1]=s=>_.value=!1)},null,8,["onSuccess"])):B("",!0),n(w)?(a(),m(K,{key:1,ref_key:"authRef",ref:k,onSuccess:n(p),onClose:e[2]||(e[2]
|