2 lines
5.3 KiB
JavaScript
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.b0ecf6ae.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.ebbecf1a.js";import{f as W,b as X}from"./index.9e5a9063.js";import{u as Y}from"./usePaging.2ad8e1e6.js";import{u as Z}from"./useDictOptions.adeec031.js";import{d as ee,e as oe}from"./user_menu.92b621e3.js";import"./lodash.ffb5376d.js";import te from"./edit.ec925885.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 i,M as v,K as p,a as b,k as ue,Q as ie,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"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.f9df025a.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.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.3a572f9b.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"}),eo=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,u=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(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(d,{onClick:l(L)},{default:e(()=>[i("\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(()=>[i(" \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(u,{label:"\u83DC\u5355\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(u,{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(u,{label:"\u83DC\u5355\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),o(u,{label:"\u83DC\u5355\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),o(u,{label:"\u8DEF\u7531\u5730\u5740",prop:"paths","show-overflow-tooltip":"",width:"320px"}),o(u,{label:"\u8DEF\u7531\u53C2\u6570",prop:"params","show-overflow-tooltip":""}),o(u,{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(()=>[i("\u663E\u793A")]),_:1})):(n(),p(w,{key:1,type:"danger"},{default:e(()=>[i("\u9690\u85CF")]),_:1}))]),_:1}),o(u,{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(()=>[i("\u6B63\u5E38")]),_:1})):(n(),p(w,{key:1,type:"danger"},{default:e(()=>[i("\u7981\u7528")]),_:1}))]),_:1}),o(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:e(({row:a})=>[v((n(),p(d,{type:"primary",link:"",onClick:S=>$(a)},{default:e(()=>[i(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["user.user_menu/edit"]]]),v((n(),p(d,{type:"danger",link:"",onClick:S=>N(a.id)},{default:e(()=>[i(" \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=>ue(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"])):ie("",!0)])}}});export{eo as default};
|