engineering/public/admin/assets/index.1cc95290.js
2024-02-20 17:15:05 +08:00

2 lines
4.4 KiB
JavaScript

import{w as O,L as U,V as S,M as z,C as P,N as G}from"./element-plus.b3353ca6.js";import{M as h,f as j,a as q}from"./index.892155dd.js";import{a as H,e as I}from"./menu.ea11c62e.js";import{u as J}from"./usePaging.f6660143.js";import{_ as K}from"./edit.vue_vue_type_script_setup_true_lang.8db7b8d2.js";import{d as N,s as x,r as Q,ai as W,o as i,c as v,V as n,M as t,L as r,u as p,S as E,a as T,O as c,T as d,n as D}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.771e5a41.js";const X={class:"menu-lists"},Y=d(" \u65B0\u589E "),Z=d(" \u5C55\u5F00/\u6298\u53E0 "),ee={key:0},te={key:1},oe={key:2},ae={class:"flex"},ie=d("\u6B63\u5E38"),ne=d("\u505C\u7528"),se=d(" \u65B0\u589E "),le=d(" \u7F16\u8F91 "),ue=d(" \u5220\u9664 "),re=N({name:"menu"}),Ke=N({...re,setup(pe){const b=x(),m=x();let y=!1;const _=Q(!1),{pager:k,getLists:C}=J({fetchFun:H,params:{page_type:0}}),g=async a=>{var o,s;_.value=!0,await D(),a&&((o=m.value)==null||o.setFormData({pid:a})),(s=m.value)==null||s.open("add")},$=async a=>{var o,s;_.value=!0,await D(),(o=m.value)==null||o.open("edit"),(s=m.value)==null||s.getDetail(a)},L=async a=>{await j.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await I({id:a}),C()},R=()=>{y=!y,w(k.lists,y)},w=(a,o=!0)=>{var s;for(const l in a)(s=b.value)==null||s.toggleRowExpansion(a[l],o),a[l].children&&w(a[l].children,o)};return C(),(a,o)=>{const s=q,l=O,u=U,B=S,V=z,A=P,f=W("perms"),M=G;return i(),v("div",X,[n(A,{class:"!border-none",shadow:"never"},{default:t(()=>[T("div",null,[c((i(),r(l,{type:"primary",onClick:o[0]||(o[0]=e=>g())},{icon:t(()=>[n(s,{name:"el-icon-Plus"})]),default:t(()=>[Y]),_:1})),[[f,["auth.menu/add"]]]),n(l,{onClick:R},{default:t(()=>[Z]),_:1})]),c((i(),r(V,{ref_key:"tableRef",ref:b,class:"mt-4",size:"large",data:p(k).lists,"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:t(()=>[n(u,{label:"\u83DC\u5355\u540D\u79F0",prop:"name","min-width":"150","show-overflow-tooltip":""}),n(u,{label:"\u7C7B\u578B",prop:"type","min-width":"80"},{default:t(({row:e})=>[e.type==p(h).CATALOGUE?(i(),v("div",ee,"\u76EE\u5F55")):e.type==p(h).MENU?(i(),v("div",te,"\u83DC\u5355")):e.type==p(h).BUTTON?(i(),v("div",oe,"\u6309\u94AE")):E("",!0)]),_:1}),n(u,{label:"\u56FE\u6807",prop:"icon","min-width":"80"},{default:t(({row:e})=>[T("div",ae,[n(s,{name:e.icon,size:20},null,8,["name"])])]),_:1}),n(u,{label:"\u6743\u9650\u6807\u8BC6",prop:"perms","min-width":"150","show-overflow-tooltip":""}),n(u,{label:"\u72B6\u6001",prop:"is_disable","min-width":"100"},{default:t(({row:e})=>[e.is_disable==0?(i(),r(B,{key:0},{default:t(()=>[ie]),_:1})):(i(),r(B,{key:1,type:"danger"},{default:t(()=>[ne]),_:1}))]),_:1}),n(u,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),n(u,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time","min-width":"180"}),n(u,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:t(({row:e})=>[e.type!==p(h).BUTTON?c((i(),r(l,{key:0,type:"primary",link:"",onClick:F=>g(e.id)},{default:t(()=>[se]),_:2},1032,["onClick"])),[[f,["auth.menu/add"]]]):E("",!0),c((i(),r(l,{type:"primary",link:"",onClick:F=>$(e)},{default:t(()=>[le]),_:2},1032,["onClick"])),[[f,["auth.menu/edit"]]]),c((i(),r(l,{type:"danger",link:"",onClick:F=>L(e.id)},{default:t(()=>[ue]),_:2},1032,["onClick"])),[[f,["auth.menu/delete"]]])]),_:1})]),_:1},8,["data"])),[[M,p(k).loading]])]),_:1}),_.value?(i(),r(K,{key:0,ref_key:"editRef",ref:m,onSuccess:p(C),onClose:o[1]||(o[1]=e=>_.value=!1)},null,8,["onSuccess"])):E("",!0)])}}});export{Ke as default};