2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
|
import{w as V,L as O,_ as S,M as z,I as P,N as G}from"./element-plus.bb5d129a.js";import{M as h,f as I,b as K}from"./index.69ffdd93.js";import{a as j,e as q}from"./menu.5f6063de.js";import{u as H}from"./usePaging.160b82b8.js";import{_ as J}from"./edit.vue_vue_type_script_setup_true_lang.069a91c0.js";import{d as N,s as x,r as Q,af as W,o as a,c as v,U as n,L as t,K as r,u as p,R as E,a as D,M as c,S as d,n as T}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.c5177e7a.js";import"./axios.ba5f746b.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.5226da61.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ee641d3d.js";import"./color.cbc2f3a9.js";import"./clone.7fddbad2.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a7d78d4d.js";import"./ms.a9ae1d6d.js";import"./nprogress.cc41886d.js";import"./vue-clipboard3.7988db4f.js";import"./clipboard.cb7a871d.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";import"./picker.vue_vue_type_script_setup_true_lang.1ac5ef38.js";import"./index.a82f0063.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},ie={class:"flex"},ae=d("\u6B63\u5E38"),ne=d("\u505C\u7528"),se=d(" \u65B0\u589E "),le=d(" \u7F16\u8F91 "),ue=d(" \u5220\u9664 "),re=N({name:"menu"}),We=N({...re,setup(pe){const b=x(),m=x();let y=!1;const _=Q(!1),{pager:k,getLists:C}=H({fetchFun:j,params:{page_type:0}}),g=async i=>{var o,s;_.value=!0,await T(),i&&((o=m.value)==null||o.setFormData({pid:i})),(s=m.value)==null||s.open("add")},R=async i=>{var o,s;_.value=!0,await T(),(o=m.value)==null||o.open("edit"),(s=m.value)==null||s.getDetail(i)},$=async i=>{await I.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await q({id:i}),C()},L=()=>{y=!y,w(k.lists,y)},w=(i,o=!0)=>{var s;for(const l in i)(s=b.value)==null||s.toggleRowExpansion(i[l],o),i[l].children&&w(i[l].children,o)};return C(),(i,o)=>{const s=K,l=V,u=O,B=S,A=z,M=P,f=W("perms"),U=G;return a(),v("div",X,[n(M,{class:"!border-none",shadow:"never"},{default:t(()=>[D("div",null,[c((a(),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:L},{default:t(()=>[Z]),_:1})]),c((a(),r(A,{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?(a(),v("div",ee,"\u76EE\u5F55")):e.type==p(h).MENU?(a(),v("div",te,"\u83DC\u5355")):e.type==p(h).BUTTON?(a(),v("div",oe,"\u6309\u94AE")):E("",!0)]),_:1}),n(u,{label:"\u56FE\u6807",prop:"icon","min-width":"80"},{default:t(({row:e})=>[D("div",ie,[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?(a(),r(B,{key:0},{default:t(()=>[ae]),_:1})):(a(),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((a(),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((a
|