1 |
- import{ap as k,d as _a,r as e,P as ca,o as d,c as b,i as s,w as y,a as _,C as E,g as v,t as ua,y as L,l as O,j as X,F as na,H as ia,K as sa,J as oa,N as ma,ac as pa,ad as da,_ as ya,__tla as va}from"./index-af173888.js";import{_ as ha,__tla as fa}from"./ContentWrap-b959c1be.js";import Ma,{__tla as xa}from"./main-b47fe5c9.js";import Ua,{__tla as ba}from"./MenuEditor-f2e4ce91.js";import ga,{__tla as Ia}from"./MenuPreviewer-176435c3.js";import{h as wa}from"./tree-02f455f9.js";import{u as Ca,__tla as Ta}from"./useMessage-170c1b43.js";import{__tla as ka}from"./el-card-178b9654.js";import{__tla as Ea}from"./index-ef06add8.js";import{__tla as Va}from"./main-88934550.js";import{__tla as qa}from"./TabNews-c4d41f0c.js";import{__tla as Da}from"./main-74339a6f.js";import{__tla as Sa}from"./el-image-fdde0035.js";import{__tla as Ha}from"./el-image-viewer-0d82b94c.js";import{__tla as Fa}from"./main-26111fdd.js";import{__tla as Na}from"./index-a33d7937.js";import{__tla as Pa}from"./index-54b8f773.js";import{__tla as Ra}from"./main-91abe1eb.js";import{__tla as $a}from"./main-efb6986a.js";import{__tla as Aa}from"./index-f187aea8.js";import{__tla as ja}from"./index-0ed9f1ba.js";import{__tla as za}from"./formatTime-8a6f6c49.js";import{__tla as Ba}from"./TabText-93c52683.js";import{__tla as Ja}from"./TabImage-cd1b2e6d.js";import{__tla as Ka}from"./useUpload-4e2d78e4.js";import{__tla as La}from"./TabVoice-eace5a76.js";import{__tla as Oa}from"./TabVideo-843c9555.js";import{__tla as Xa}from"./TabMusic-455e9382.js";import{__tla as Ga}from"./vuedraggable.umd-09fd9aad.js";let G,Qa=Promise.all([(()=>{try{return va}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Ga}catch{}})()]).then(async()=>{let V,q,D,S,H,F,N,P,R,x;V={class:"clearfix public-account-management"},q={class:"left"},D={class:"weixin-hd"},S={class:"weixin-title"},H={class:"clearfix weixin-menu"},F={class:"save_div"},N={key:0,class:"right"},P={key:1,class:"right"},R=[(U=>(pa("data-v-e74cfd0c"),U=U(),da(),U))(()=>v("p",null,"\u8BF7\u9009\u62E9\u83DC\u5355\u914D\u7F6E",-1))],x="__MENU_NOT_SELECTED__",G=ya(_a({name:"MpMenu",__name:"index",setup(U){const o=Ca(),c=e(!1),m=e(-1),$=e(""),u=e([]),h=e(x),g=e(-1),f=e(!1),I=e(!0),n=e({}),r=e({grand:"0",x:0,y:0}),Q=e(!1),W=(t,a)=>{m.value=t,$.value=a,w()},w=async()=>{c.value=!1;try{const t=await(l=>k.get({url:"/mp/menu/list?accountId="+l}))(m.value),a=Y(t);u.value=wa(a,"id")}finally{c.value=!1}},Y=t=>{if(!t)return[];const a=[];return t.forEach(l=>{const p={...l};p.reply={type:l.replyMessageType,accountId:l.accountId,content:l.replyContent,mediaId:l.replyMediaId,url:l.replyMediaUrl,title:l.replyTitle,description:l.replyDescription,thumbMediaId:l.replyThumbMediaId,thumbMediaUrl:l.replyThumbMediaUrl,articles:l.replyArticles,musicUrl:l.replyMusicUrl,hqMusicUrl:l.replyHqMusicUrl},a.push(p)}),a},Z=()=>{h.value=x,g.value=-1,f.value=!1,n.value={},r.value={grand:"0",x:0,y:0},Q.value=!1},aa=async()=>{var t;try{await o.confirm("\u786E\u5B9A\u8981\u5220\u9664\u5417?"),r.value.grand==="1"?u.value.splice(r.value.x,1):r.value.grand==="2"&&((t=u.value[r.value.x].children)==null||t.splice(r.value.y,1)),o.notifySuccess("\u5220\u9664\u6210\u529F"),n.value={},f.value=!1,h.value=x}catch{}},ta=async()=>{try{await o.confirm("\u786E\u5B9A\u8981\u4FDD\u5B58\u5417?"),c.value=!0,await((t,a)=>k.post({url:"/mp/menu/save",data:{accountId:t,menus:a}}))(m.value,ra()),w(),o.notifySuccess("\u53D1\u5E03\u6210\u529F")}finally{c.value=!1}},la=async()=>{try{await o.confirm("\u786E\u5B9A\u8981\u5220\u9664\u5417?"),c.value=!0,await(t=>k.delete({url:"/mp/menu/delete?accountId="+t}))(m.value),Z(),w(),o.notifySuccess("\u6E05\u7A7A\u6210\u529F")}finally{c.value=!1}},ra=()=>{const t=[];return u.value.forEach(a=>{const l=A(a);t.push(l),!a.children||a.children.length<=0||(l.children=[],a.children.forEach(p=>{l.children.push(A(p))}))}),t},A=t=>{let a={...t,children:void 0,reply:void 0};return a.replyMessageType=t.reply.type,a.replyContent=t.reply.content,a.replyMediaId=t.reply.mediaId,a.replyMediaUrl=t.reply.url,a.replyTitle=t.reply.title,a.replyDescription=t.reply.description,a.replyThumbMediaId=t.reply.thumbMediaId,a.replyThumbMediaUrl=t.reply.thumbMediaUrl,a.replyArticles=t.reply.articles,a.replyMusicUrl=t.reply.musicUrl,a.replyHqMusicUrl=t.reply.hqMusicUrl,a};return(t,a)=>{const l=ia,p=sa,j=ha,z=oa,B=ca("hasPermi"),ea=ma;return d(),b(na,null,[s(j,null,{default:y(()=>[s(p,{class:"-mb-15px",ref:"queryFormRef",inline:!0,"label-width":"68px"},{default:y(()=>[s(l,{label:"\u516C\u4F17\u53F7",prop:"accountId"},{default:y(()=>[s(_(Ma),{onChange:W})]),_:1})]),_:1},512)]),_:1}),s(j,null,{default:y(()=>[E((d(),b("div",V,[v("div",q,[v("div",D,[v("div",S,ua(_($)),1)]),v("div",H,[s(ga,{modelValue:_(u),"onUpdate:modelValue":a[0]||(a[0]=i=>L(u)?u.value=i:null),"account-id":_(m),"active-index":_(h),"parent-index":_(g),onMenuClicked:a[1]||(a[1]=(i,C)=>((T,M)=>{f.value=!0,n.value=T,r.value.grand="1",r.value.x=M,I.value=!0,h.value=`${M}`,g.value=M})(i,C)),onSubmenuClicked:a[2]||(a[2]=(i,C,T)=>((M,J,K)=>{f.value=!0,n.value=M,r.value.grand="2",r.value.x=J,r.value.y=K,I.value=!1,h.value=`${J}-${K}`})(i,C,T))},null,8,["modelValue","account-id","active-index","parent-index"])]),v("div",F,[E((d(),O(z,{class:"save_btn",type:"success",onClick:ta},{default:y(()=>[X("\u4FDD\u5B58\u5E76\u53D1\u5E03\u83DC\u5355")]),_:1})),[[B,["mp:menu:save"]]]),E((d(),O(z,{class:"save_btn",type:"danger",onClick:la},{default:y(()=>[X("\u6E05\u7A7A\u83DC\u5355")]),_:1})),[[B,["mp:menu:delete"]]])])]),_(f)?(d(),b("div",N,[s(Ua,{"account-id":_(m),"is-parent":_(I),modelValue:_(n),"onUpdate:modelValue":a[3]||(a[3]=i=>L(n)?n.value=i:null),onDelete:aa},null,8,["account-id","is-parent","modelValue"])])):(d(),b("div",P,[...R]))])),[[ea,_(c)]])]),_:1})],64)}}}),[["__scopeId","data-v-e74cfd0c"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/menu/index.vue"]])});export{Qa as __tla,G as default};
|