suyuan/public/admin/assets/index.90622b31.js

2 lines
4.0 KiB
JavaScript

import{w as S,L as j,M as I,I as P,N as z}from"./element-plus.5df6f736.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.1938e45e.js";import{f as K,b as M}from"./index.1f78e617.js";import{c as Q,d as U}from"./role.89849e2e.js";import{u as q}from"./usePaging.2a59f422.js";import{_ as G}from"./edit.vue_vue_type_script_setup_true_lang.cbd521e9.js";import{_ as H}from"./auth.vue_vue_type_script_setup_true_lang.ef8836be.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.50c3b6f7.js";import"./axios.c2a2014a.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.33f675f2.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.5d5b8bda.js";import"./color.da05fa89.js";import"./clone.06747a68.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.1c707d7b.js";import"./ms.a9ae1d6d.js";import"./nprogress.fc605139.js";import"./vue-clipboard3.dc900a40.js";import"./clipboard.6beb87aa.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.5f547370.js";import"./menu.6c5160df.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 K.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await U({id:o}),p()};return p(),(o,e)=>{const s=M,f=S,l=j,V=I,L=J,N=P,h=O("perms"),T=z;return i(),B("div",X,[t(N,{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(L,{modelValue:u(m),"onUpdate:modelValue":e[0]||(e[0]=a=>W(m)?m.value=a:null),onChange:u(p)},null,8,["modelValue","onChange"])])])),[[T,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};