2 lines
3.8 KiB
JavaScript
2 lines
3.8 KiB
JavaScript
import{w as L,L as P,M as j,I,N as M}from"./element-plus.0a93cab1.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.3863431c.js";import{f as O,b as U}from"./index.31294648.js";import{c as W,d as q}from"./role.4fb1a2f9.js";import{u as G}from"./usePaging.d25ebf19.js";import{_ as H}from"./edit.vue_vue_type_script_setup_true_lang.36df7dd8.js";import{_ as J}from"./auth.vue_vue_type_script_setup_true_lang.0b06a3db.js";import{d as D,s as F,r as g,am as K,o as a,c as E,W as t,O as i,a as C,P as c,M as u,T as h,u as n,j as Q,S as B,n as y}from"./@vue.c3e77981.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.16ed1fda.js";import"./axios.a8078129.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.a2abcd4b.js";import"./vue-router.43c06794.js";import"./pinia.b5130627.js";import"./css-color-function.975e80a5.js";import"./color.d986aa86.js";import"./clone.704d8332.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.ded7f805.js";import"./vue-clipboard3.987889a8.js";import"./clipboard.af74a91f.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";import"./index.82dd7095.js";import"./menu.123c4c22.js";const X={class:"role-lists"},Y={class:"mt-4"},Z={class:"flex justify-end mt-4"},ee=D({name:"role"}),ze=D({...ee,setup(te){const d=F(),k=F(),_=g(!1),w=g(!1),{pager:m,getLists:p}=G({fetchFun:q}),$=async()=>{var o;_.value=!0,await y(),(o=d.value)==null||o.open("add")},x=async o=>{var e,l;_.value=!0,await y(),(e=d.value)==null||e.open("edit"),(l=d.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)},V=async o=>{await O.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await W({id:o}),p()};return p(),(o,e)=>{const l=U,f=L,s=P,R=j,N=z,S=I,v=K("perms"),T=M;return a(),E("div",X,[t(S,{class:"!border-none",shadow:"never"},{default:i(()=>[C("div",null,[c((a(),u(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(R,{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})=>[c((a(),u(f,{link:"",type:"primary",onClick:b=>x(r)},{default:i(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((a(),u(f,{link:"",type:"primary",onClick:b=>A(r)},{default:i(()=>[h(" \u5206\u914D\u6743\u9650 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((a(),u(f,{link:"",type:"danger",onClick:b=>V(r.id)},{default:i(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["auth.role/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",Z,[t(N,{modelValue:n(m),"onUpdate:modelValue":e[0]||(e[0]=r=>Q(m)?m.value=r:null),onChange:n(p)},null,8,["modelValue","onChange"])])])),[[T,n(m).loading]])]),_:1}),n(_)?(a(),u(H,{key:0,ref_key:"editRef",ref:d,onSuccess:n(p),onClose:e[1]||(e[1]=r=>_.value=!1)},null,8,["onSuccess"])):B("",!0),n(w)?(a(),u(J,{key:1,ref_key:"authRef",ref:k,onSuccess:n(p),onClose:e[2]||(e[2]=r=>w.value=!1)},null,8,["onSuccess"])):B("",!0)])}}});export{ze as default};
|