ERP-admin/build/admin/assets/index.77aa0998.js

2 lines
3.8 KiB
JavaScript

import{w as T,M as j,N as M,L as P,O as U}from"./element-plus.f1cfb480.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.dacce304.js";import{f as I,b as K}from"./index.52f16d07.js";import{c as O,d as Q}from"./role.09909827.js";import{u as q}from"./usePaging.77fa9d39.js";import{_ as G}from"./edit.vue_vue_type_script_setup_true_lang.a486a23b.js";import{_ as H}from"./auth.vue_vue_type_script_setup_true_lang.55840162.js";import{d as D,s as F,r as g,ap as J,o as a,c as E,U as t,L as n,a as C,M as c,K as u,R as h,u as i,j as W,Q as B,n as y}from"./@vue.663bc523.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.4b5afb22.js";import"./@element-plus.8b1118e2.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.403d4198.js";import"./vue-router.58fac957.js";import"./pinia.068f0ef2.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.e6143ca6.js";import"./color.d79aa98b.js";import"./clone.a63396d9.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.8485a033.js";import"./zrender.b2f30540.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.85e4ac8b.js";import"./index.6c86ef69.js";import"./menu.41697fba.js";const X={class:"role-lists"},Y={class:"mt-4"},Z={class:"flex justify-end mt-4"},ee=D({name:"role"}),Me=D({...ee,setup(te){const d=F(),k=F(),_=g(!1),w=g(!1),{pager:m,getLists:p}=q({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)},R=async o=>{await I.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await O({id:o}),p()};return p(),(o,e)=>{const l=K,f=T,s=j,V=M,L=z,N=P,v=J("perms"),S=U;return a(),E("div",X,[t(N,{class:"!border-none",shadow:"never"},{default:n(()=>[C("div",null,[c((a(),u(f,{type:"primary",onClick:$},{icon:n(()=>[t(l,{name:"el-icon-Plus"})]),default:n(()=>[h(" \u65B0\u589E ")]),_:1})),[[v,["auth.role/add"]]])]),c((a(),E("div",Y,[C("div",null,[t(V,{data:i(m).lists,size:"large"},{default:n(()=>[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:n(({row:r})=>[c((a(),u(f,{link:"",type:"primary",onClick:b=>x(r)},{default:n(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((a(),u(f,{link:"",type:"primary",onClick:b=>A(r)},{default:n(()=>[h(" \u5206\u914D\u6743\u9650 ")]),_:2},1032,["onClick"])),[[v,["auth.role/edit"]]]),c((a(),u(f,{link:"",type:"danger",onClick:b=>R(r.id)},{default:n(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["auth.role/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",Z,[t(L,{modelValue:i(m),"onUpdate:modelValue":e[0]||(e[0]=r=>W(m)?m.value=r:null),onChange:i(p)},null,8,["modelValue","onChange"])])])),[[S,i(m).loading]])]),_:1}),i(_)?(a(),u(G,{key:0,ref_key:"editRef",ref:d,onSuccess:i(p),onClose:e[1]||(e[1]=r=>_.value=!1)},null,8,["onSuccess"])):B("",!0),i(w)?(a(),u(H,{key:1,ref_key:"authRef",ref:k,onSuccess:i(p),onClose:e[2]||(e[2]=r=>w.value=!1)},null,8,["onSuccess"])):B("",!0)])}}});export{Me as default};