2 lines
5.4 KiB
JavaScript
2 lines
5.4 KiB
JavaScript
import{a7 as j,C as q,D as I,w as Q,F as J,J as W,P as z,Q as G,R as H}from"./element-plus.ff90c99c.js";import{_ as K}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{f as O,b as X}from"./index.69a22209.js";import{u as Y}from"./usePaging.bd7a7dec.js";import{u as Z}from"./useDictOptions.bbee1576.js";import{d as ee,e as oe}from"./user_menu.fc942b7c.js";import"./lodash.3e731b89.js";import te from"./edit.2bae9b1a.js";import{d as D,s as ae,r as k,$ as le,w as se,aq as ne,o as n,c as re,W as o,Q as e,u as l,U as u,R as v,P as p,a as b,j as ie,T as ue,n as y}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"./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"./index.928157d8.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";const pe={class:"mt-4"},me=["src"],de={class:"flex mt-4 justify-end"},ce=D({name:"userMenuLists"}),so=D({...ce,setup(_e){const _=ae(),f=k(!1),h=le({pid:"",type:"",name:"",icon:"",sort:"",paths:"",params:"",is_show:"",is_disable:""}),g=k([]),x=t=>{g.value=t.map(({id:s})=>s)},{dictData:B}=Z(""),{pager:m,getLists:C,resetParams:P,resetPage:V}=Y({fetchFun:oe,params:h}),L=async()=>{var t;f.value=!0,await y(),(t=_.value)==null||t.open("add")},R=async t=>{var s,r;f.value=!0,await y(),(s=_.value)==null||s.open("edit"),(r=_.value)==null||r.setFormData(t)},T=async t=>{await O.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=I,d=Q,$=J,F=W,N=X,i=z,w=j,U=G,A=K,E=ne("perms"),S=H;return n(),re("div",null,[o(F,{class:"!border-none mb-4",shadow:"never"},{default:e(()=>[o($,{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(V)},{default:e(()=>[u("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(d,{onClick:l(P)},{default:e(()=>[u("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((n(),p(F,{class:"!border-none",shadow:"never"},{default:e(()=>[v((n(),p(d,{type:"primary",onClick:L},{icon:e(()=>[o(N,{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:M=>R(a)},{default:e(()=>[u(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["user.user_menu/edit"]]]),v((n(),p(d,{type:"danger",link:"",onClick:M=>T(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})),[[S,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{so as default};
|