WokerTask/public/admin/assets/index.2a4f3acf.js

2 lines
5.3 KiB
JavaScript

import{a6 as I,B as Q,C as j,w as q,D as K,I as O,O as z,P as G,Q as H}from"./element-plus.10e48c93.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.579ca8f7.js";import{f as W,b as X}from"./index.c35b5194.js";import{u as Y}from"./usePaging.60d02673.js";import{u as Z}from"./useDictOptions.df4cc64d.js";import{d as ee,e as oe}from"./user_menu.56e2acbd.js";import"./lodash.08438971.js";import te from"./edit.d001b518.js";import{d as F,s as ae,r as y,$ as le,w as se,af as ne,o as n,c as re,U as o,L as e,u as l,R as u,M as v,K as p,a as b,k as ie,Q as ue,n as D}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.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.40d5feba.js";import"./index.e02c2f77.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";const pe={class:"mt-4"},me=["src"],de={class:"flex mt-4 justify-end"},ce=F({name:"userMenuLists"}),to=F({...ce,setup(_e){const _=ae(),f=y(!1),h=le({pid:"",type:"",name:"",icon:"",sort:"",paths:"",params:"",is_show:"",is_disable:""}),g=y([]),x=t=>{g.value=t.map(({id:s})=>s)},{dictData:B}=Z(""),{pager:m,getLists:C,resetParams:L,resetPage:P}=Y({fetchFun:oe,params:h}),V=async()=>{var t;f.value=!0,await D(),(t=_.value)==null||t.open("add")},$=async t=>{var s,r;f.value=!0,await D(),(s=_.value)==null||s.open("edit"),(r=_.value)==null||r.setFormData(t)},N=async t=>{await W.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ee({id:t}),C()};return C(),se(()=>m.lists,(t,s)=>{t==null||t.forEach(r=>{var c;(c=r==null?void 0:r.children)==null||c.forEach(d=>{d.parentName=r.name})})}),(t,s)=>{const r=Q,c=j,d=q,R=K,k=O,T=X,i=z,w=I,U=G,A=J,E=ne("perms"),M=H;return n(),re("div",null,[o(k,{class:"!border-none mb-4",shadow:"never"},{default:e(()=>[o(R,{class:"mb-[-16px]",model:l(h),inline:""},{default:e(()=>[o(c,{label:"\u83DC\u5355\u540D\u79F0",prop:"name"},{default:e(()=>[o(r,{class:"w-[280px]",modelValue:l(h).name,"onUpdate:modelValue":s[0]||(s[0]=a=>l(h).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(c,null,{default:e(()=>[o(d,{type:"primary",onClick:l(P)},{default:e(()=>[u("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(d,{onClick:l(L)},{default:e(()=>[u("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((n(),p(k,{class:"!border-none",shadow:"never"},{default:e(()=>[v((n(),p(d,{type:"primary",onClick:V},{icon:e(()=>[o(T,{name:"el-icon-Plus"})]),default:e(()=>[u(" \u65B0\u589E ")]),_:1})),[[E,["user.user_menu/add"]]]),b("div",pe,[o(U,{data:l(m).lists,"default-expand-all":"","expand-all":!0,onSelectionChange:x,"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:e(()=>[o(i,{label:"\u83DC\u5355\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(i,{label:"\u83DC\u5355\u56FE\u6807",prop:"icon","show-overflow-tooltip":""},{default:e(({row:a})=>[b("img",{src:a.icon,style:{width:"50px",height:"50px"}},null,8,me)]),_:1}),o(i,{label:"\u83DC\u5355\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),o(i,{label:"\u83DC\u5355\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),o(i,{label:"\u8DEF\u7531\u5730\u5740",prop:"paths","show-overflow-tooltip":"",width:"320px"}),o(i,{label:"\u8DEF\u7531\u53C2\u6570",prop:"params","show-overflow-tooltip":""}),o(i,{label:"\u662F\u5426\u663E\u793A",prop:"is_show","show-overflow-tooltip":""},{default:e(({row:a})=>[a.is_show==1?(n(),p(w,{key:0},{default:e(()=>[u("\u663E\u793A")]),_:1})):(n(),p(w,{key:1,type:"danger"},{default:e(()=>[u("\u9690\u85CF")]),_:1}))]),_:1}),o(i,{label:"\u662F\u5426\u7981\u7528",prop:"is_disable","show-overflow-tooltip":""},{default:e(({row:a})=>[a.is_disable==0?(n(),p(w,{key:0},{default:e(()=>[u("\u6B63\u5E38")]),_:1})):(n(),p(w,{key:1,type:"danger"},{default:e(()=>[u("\u7981\u7528")]),_:1}))]),_:1}),o(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:e(({row:a})=>[v((n(),p(d,{type:"primary",link:"",onClick:S=>$(a)},{default:e(()=>[u(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["user.user_menu/edit"]]]),v((n(),p(d,{type:"danger",link:"",onClick:S=>N(a.id)},{default:e(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[E,["user.user_menu/delete"]]])]),_:1})]),_:1},8,["data"])]),b("div",de,[o(A,{modelValue:l(m),"onUpdate:modelValue":s[1]||(s[1]=a=>ie(m)?m.value=a:null),onChange:l(C)},null,8,["modelValue","onChange"])])]),_:1})),[[M,l(m).loading]]),l(f)?(n(),p(te,{key:0,ref_key:"editRef",ref:_,"dict-data":l(B),menuList:l(m).lists,onSuccess:l(C),onClose:s[2]||(s[2]=a=>f.value=!1)},null,8,["dict-data","menuList","onSuccess"])):ue("",!0)])}}});export{to as default};