WokerTask/public/admin/assets/index.b0d24424.js

2 lines
4.6 KiB
JavaScript

import{a7 as V,w as M,P as O,Q as z,J as Q,R as S}from"./element-plus.ff90c99c.js";import{M as h,f as q,b as G}from"./index.c5585224.js";import{e as J,a as W}from"./menu.01047163.js";import{u as j}from"./usePaging.bd7a7dec.js";import{_ as H}from"./edit.vue_vue_type_script_setup_true_lang.2033f768.js";import{d as R,s as x,r as I,aq as K,o as i,c as v,W as n,Q as o,a as T,R as c,P as u,U as m,u as p,T as E,n as D}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";import"./picker.vue_vue_type_script_setup_true_lang.8246f20a.js";import"./index.b419b92b.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";const X={class:"menu-lists"},Y={key:0},Z={key:1},ee={key:2},te={class:"flex"},oe=R({name:"menu"}),je=R({...oe,setup(ae){const b=x(),d=x();let y=!1;const _=I(!1),{pager:k,getLists:C}=j({fetchFun:W,params:{page_type:0}}),g=async e=>{var a,s;_.value=!0,await D(),e&&((a=d.value)==null||a.setFormData({pid:e})),(s=d.value)==null||s.open("add")},N=async e=>{var a,s;_.value=!0,await D(),(a=d.value)==null||a.open("edit"),(s=d.value)==null||s.getDetail(e)},$=async e=>{await q.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await J({id:e}),C()},A=()=>{y=!y,w(k.lists,y)},w=(e,a=!0)=>{var s;for(const l in e)(s=b.value)==null||s.toggleRowExpansion(e[l],a),e[l].children&&w(e[l].children,a)};return C().then(e=>{console.log(e)}),(e,a)=>{const s=G,l=M,r=O,B=V,U=z,L=Q,f=K("perms"),P=S;return i(),v("div",X,[n(L,{class:"!border-none",shadow:"never"},{default:o(()=>[T("div",null,[c((i(),u(l,{type:"primary",onClick:a[0]||(a[0]=t=>g())},{icon:o(()=>[n(s,{name:"el-icon-Plus"})]),default:o(()=>[m(" \u65B0\u589E ")]),_:1})),[[f,["auth.menu/add"]]]),n(l,{onClick:A},{default:o(()=>[m(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1})]),c((i(),u(U,{ref_key:"tableRef",ref:b,class:"mt-4",size:"large",data:p(k).lists,"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:o(()=>[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:o(({row:t})=>[t.type==p(h).CATALOGUE?(i(),v("div",Y,"\u76EE\u5F55")):t.type==p(h).MENU?(i(),v("div",Z,"\u83DC\u5355")):t.type==p(h).BUTTON?(i(),v("div",ee,"\u6309\u94AE")):E("",!0)]),_:1}),n(r,{label:"\u56FE\u6807",prop:"icon","min-width":"80"},{default:o(({row:t})=>[T("div",te,[n(s,{name:t.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:o(({row:t})=>[t.is_disable==0?(i(),u(B,{key:0},{default:o(()=>[m("\u6B63\u5E38")]),_:1})):(i(),u(B,{key:1,type:"danger"},{default:o(()=>[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:o(({row:t})=>[t.type!==p(h).BUTTON?c((i(),u(l,{key:0,type:"primary",link:"",onClick:F=>g(t.id)},{default:o(()=>[m(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[f,["auth.menu/add"]]]):E("",!0),c((i(),u(l,{type:"primary",link:"",onClick:F=>N(t)},{default:o(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["auth.menu/edit"]]]),c((i(),u(l,{type:"danger",link:"",onClick:F=>$(t.id)},{default:o(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["auth.menu/delete"]]])]),_:1})]),_:1},8,["data"])),[[P,p(k).loading]])]),_:1}),p(_)?(i(),u(H,{key:0,ref_key:"editRef",ref:d,onSuccess:p(C),onClose:a[1]||(a[1]=t=>_.value=!1)},null,8,["onSuccess"])):E("",!0)])}}});export{je as default};