2023-11-23 11:13:45 +08:00
|
|
|
import{w as T,L as I,M,I as P,N as U}from"./element-plus.f958bb38.js";import{_ as j}from"./index.vue_vue_type_script_setup_true_lang.437cabf2.js";import{f as z,b as K}from"./index.0782a5be.js";import{c as q,d as G}from"./role.7ff007dd.js";import{u as H}from"./usePaging.160b82b8.js";import{_ as J}from"./edit.vue_vue_type_script_setup_true_lang.10e8c429.js";import{_ as O}from"./auth.vue_vue_type_script_setup_true_lang.94640ffb.js";import{d as D,s as F,r as g,af as Q,o as a,c as E,U as t,L as i,K as r,u,R as B,a as C,M as c,k as W,S as v,n as y}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.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.12d45bc3.js";import"./pinia.dfca86b4.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.2cdc8407.js";import"./index.dbd8caa3.js";import"./menu.ebcfb64b.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"}),Je=D({...ie,setup(ne){const d=F(),k=F(),_=g(!1),w=g(!1),{pager:m,getLists:p}=H({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 z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await G({id:o}),p()};return p(),(o,e)=>{const n=K,f=T,s=I,V=M,L=j,N=P,h=Q("perms"),S=U;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"])])])),[[S,u(m).loading]])]),_:1}),_.value?(a(),r(J,{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(O,{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{Je as default};
|