2 lines
4.0 KiB
JavaScript
2 lines
4.0 KiB
JavaScript
import{w as S,K as j,M as J,J as K,N as P}from"./element-plus.ae8e286c.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.4acf6c9d.js";import{f as I,b as M}from"./index.fccb4ef5.js";import{c as Q,d as U}from"./role.ea3e91a8.js";import{u as q}from"./usePaging.2a59f422.js";import{_ as G}from"./edit.vue_vue_type_script_setup_true_lang.b05b8f8d.js";import{_ as H}from"./auth.vue_vue_type_script_setup_true_lang.d57798cc.js";import{d as D,s as g,r as E,ae as O,o as i,c as B,T as t,K as n,J as r,u,Q as w,a as y,L as c,j as W,R as v,n as b}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.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.e92d81a1.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.0d3bed35.js";import"./menu.a29e1d50.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=g(),k=g(),_=E(!1),C=E(!1),{pager:m,getLists:p}=q({fetchFun:Q}),$=async()=>{var o;_.value=!0,await b(),(o=d.value)==null||o.open("add")},x=async o=>{var e,s;_.value=!0,await b(),(e=d.value)==null||e.open("edit"),(s=d.value)==null||s.setFormData(o)},A=async o=>{var e,s;C.value=!0,await b(),(e=k.value)==null||e.open(),(s=k.value)==null||s.setFormData(o)},R=async o=>{await I.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await U({id:o}),p()};return p(),(o,e)=>{const s=M,f=S,l=j,V=J,N=z,T=K,h=O("perms"),L=P;return i(),B("div",X,[t(T,{class:"!border-none",shadow:"never"},{default:n(()=>[y("div",null,[c((i(),r(f,{type:"primary",onClick:$},{icon:n(()=>[t(s,{name:"el-icon-Plus"})]),default:n(()=>[Y]),_:1})),[[h,["auth.role/add"]]])]),c((i(),B("div",Z,[y("div",null,[t(V,{data:u(m).lists,size:"large"},{default:n(()=>[t(l,{prop:"id",label:"ID","min-width":"100"}),t(l,{prop:"name",label:"\u540D\u79F0","min-width":"150"}),t(l,{prop:"desc",label:"\u5907\u6CE8","min-width":"150","show-overflow-tooltip":""}),t(l,{prop:"sort",label:"\u6392\u5E8F","min-width":"100"}),t(l,{prop:"num",label:"\u7BA1\u7406\u5458\u4EBA\u6570","min-width":"100"}),t(l,{prop:"create_time",label:"\u521B\u5EFA\u65F6\u95F4","min-width":"180"}),t(l,{label:"\u64CD\u4F5C",width:"200",fixed:"right"},{default:n(({row:a})=>[c((i(),r(f,{link:"",type:"primary",onClick:F=>x(a)},{default:n(()=>[ee]),_:2},1032,["onClick"])),[[h,["auth.role/edit"]]]),c((i(),r(f,{link:"",type:"primary",onClick:F=>A(a)},{default:n(()=>[te]),_:2},1032,["onClick"])),[[h,["auth.role/edit"]]]),a.id!=1?c((i(),r(f,{key:0,link:"",type:"danger",onClick:F=>R(a.id)},{default:n(()=>[oe]),_:2},1032,["onClick"])),[[h,["auth.role/delete"]]]):w("",!0)]),_:1})]),_:1},8,["data"])]),y("div",ae,[t(N,{modelValue:u(m),"onUpdate:modelValue":e[0]||(e[0]=a=>W(m)?m.value=a:null),onChange:u(p)},null,8,["modelValue","onChange"])])])),[[L,u(m).loading]])]),_:1}),_.value?(i(),r(G,{key:0,ref_key:"editRef",ref:d,onSuccess:u(p),onClose:e[1]||(e[1]=a=>_.value=!1)},null,8,["onSuccess"])):w("",!0),C.value?(i(),r(H,{key:1,ref_key:"authRef",ref:k,onSuccess:u(p),onClose:e[2]||(e[2]=a=>C.value=!1)},null,8,["onSuccess"])):w("",!0)])}}});export{Ge as default};
|