data_center/public/admin/assets/index.7e92da00.js

2 lines
5.3 KiB
JavaScript

import{B as I,C as Q,w as j,D as q,I as K,O,a6 as z,P as G,Q as H}from"./element-plus.9c2fdfa8.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{f as W,b as X}from"./index.6e8143ba.js";import{u as Y}from"./usePaging.c22e2b6f.js";import{u as Z}from"./useDictOptions.a13e8a93.js";import{d as ee,e as oe}from"./user_menu.7fa3aa0e.js";import"./lodash.47b8af7d.js";import te from"./edit.f960d9de.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,M as v,u as l,K as u,Q as ie,R as p,a as b,k as ue,n as D}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"./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"./index.6be73b2c.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";const pe={class:"mt-4"},me=["src"],de={class:"flex mt-4 justify-end"},ce=F({name:"userMenuLists"}),ao=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:ee,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 oe({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=I,c=Q,d=j,R=q,k=K,T=X,i=O,w=z,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(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(d,{onClick:l(L)},{default:e(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((n(),u(k,{class:"!border-none",shadow:"never"},{default:e(()=>[v((n(),u(d,{type:"primary",onClick:V},{icon:e(()=>[o(T,{name:"el-icon-Plus"})]),default:e(()=>[p(" \u65B0\u589E ")]),_:1})),[[E,["user.user_menu/add"]]]),b("div",pe,[o(U,{data:l(m).lists,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(),u(w,{key:0},{default:e(()=>[p("\u663E\u793A")]),_:1})):(n(),u(w,{key:1,type:"danger"},{default:e(()=>[p("\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(),u(w,{key:0},{default:e(()=>[p("\u6B63\u5E38")]),_:1})):(n(),u(w,{key:1,type:"danger"},{default:e(()=>[p("\u7981\u7528")]),_:1}))]),_:1}),o(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:e(({row:a})=>[v((n(),u(d,{type:"primary",link:"",onClick:S=>$(a)},{default:e(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["user.user_menu/edit"]]]),v((n(),u(d,{type:"danger",link:"",onClick:S=>N(a.id)},{default:e(()=>[p(" \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(),u(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{ao as default};