2023-11-25 14:28:04 +08:00
|
|
|
import{w as V,I as O,_ as S,J as z,H as K,K as P}from"./element-plus.c4a2af8a.js";import{M as h,f as G,b as H}from"./index.7c5c8d56.js";import{a as I,e as J}from"./menu.87ae1a4e.js";import{u as j}from"./usePaging.160b82b8.js";import{_ as q}from"./edit.vue_vue_type_script_setup_true_lang.3e77488a.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.ff93117e.js";import"./axios.eb055ccc.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.ec5da75f.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.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.3b83d75e.js";import"./index.36a7ea39.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}=j({fetchFun:I,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 G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await J({id:i}),C()},A=()=>{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=H,l=V,u=O,B=S,L=z,U=K,f=W("perms"),M=P;return a(),v("div",X,[n(U,{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:A},{default:t(()=>[Z]),_:1})]),c((a(),r(L,{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
|