2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
|
import{w as O,O as V,a6 as P,P as z,I as Q,Q as S}from"./element-plus.9c2fdfa8.js";import{M as h,f as G,b as I}from"./index.5be037e5.js";import{a as K,e as j}from"./menu.c25789b7.js";import{u as q}from"./usePaging.c22e2b6f.js";import{_ as H}from"./edit.vue_vue_type_script_setup_true_lang.83f2678b.js";import{d as N,s as x,r as J,af as W,o as i,c as v,U as n,L as t,u,K as p,Q as E,a as D,M as c,R as m,n as T}from"./@vue.53f8d7c3.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.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.47b8af7d.js";import"./axios.96be3cef.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./picker.vue_vue_type_script_setup_true_lang.74612732.js";import"./index.da6dd366.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";const X={class:"menu-lists"},Y={key:0},Z={key:1},ee={key:2},te={class:"flex"},oe=N({name:"menu"}),Ke=N({...oe,setup(ae){const b=x(),d=x();let y=!1;const _=J(!1),{pager:k,getLists:C}=q({fetchFun:K,params:{page_type:0}}),g=async a=>{var o,s;_.value=!0,await T(),a&&((o=d.value)==null||o.setFormData({pid:a})),(s=d.value)==null||s.open("add")},R=async a=>{var o,s;_.value=!0,await T(),(o=d.value)==null||o.open("edit"),(s=d.value)==null||s.getDetail(a)},$=async a=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await j({id:a}),C()},A=()=>{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=I,l=O,r=V,B=P,L=z,U=Q,f=W("perms"),M=S;return i(),v("div",X,[n(U,{class:"!border-none",shadow:"never"},{default:t(()=>[D("div",null,[c((i(),p(l,{type:"primary",onClick:o[0]||(o[0]=e=>g())},{icon:t(()=>[n(s,{name:"el-icon-Plus"})]),default:t(()=>[m(" \u65B0\u589E ")]),_:1})),[[f,["auth.menu/add"]]]),n(l,{onClick:A},{default:t(()=>[m(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1})]),c((i(),p(L,{ref_key:"tableRef",ref:b,class:"mt-4",size:"large",data:u(k).lists,"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:t(()=>[n(r,{label:"\u83DC\u5355\u540D\u79F0",prop:"name","min-width":"150","show-overflow-tooltip":""}),n(r,{label:"\u7C7B\u578B",prop:"type","min-width":"80"},{default:t(({row:e})=>[e.type==u(h).CATALOGUE?(i(),v("div",Y,"\u76EE\u5F55")):e.type==u(h).MENU?(i(),v("div",Z,"\u83DC\u5355")):e.type==u(h).BUTTON?(i(),v("div",ee,"\u6309\u94AE")):E("",!0)]),_:1}),n(r,{label:"\u56FE\u6807",prop:"icon","min-width":"80"},{default:t(({row:e})=>[D("div",te,[n(s,{name:e.icon,size:20},null,8,["name"])])]),_:1}),n(r,{label:"\u6743\u9650\u6807\u8BC6",prop:"perms","min-width":"150","show-overflow-tooltip":""}),n(r,{label:"\u72B6\u6001",prop:"is_disable","min-width":"100"},{default:t(({row:e})=>[e.is_disable==0?(i(),p(B,{key:0},{default:t(()=>[m("\u6B63\u5E38")]),_:1})):(i(),p(B,{key:1,type:"danger"},{default:t(()=>[m("\u505C\u7528")]),_:1}))]),_:1}),n(r,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),n(r,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time","min-width":"180"}),n(r,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:t(({row:e})=>[e.type!==u(h).BUTTON?c((i(),p(l,{key:0,type:"primary",link:"",onClick:F=>g(e.id)},{default:t(()=>[m(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[f,["auth.men
|