1 |
- import{ap as E,d as _a,r as e,P as ca,o as d,c as U,f as s,w as y,a as _,v as k,g as v,t as ua,N as R,q as J,m as K,F as na,z as ia,C as sa,B as oa,H as pa,p as ma,j as da,__tla as ya}from"./index-2eab2d23.js";import{_ as va,__tla as ha}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{_ as fa,__tla as Ma}from"./main.vue_vue_type_script_setup_true_lang-9ca53d42.js";import xa,{__tla as ga}from"./MenuEditor-0d9f9918.js";import Ua,{__tla as Ia}from"./MenuPreviewer-f9d4b991.js";import{h as ba}from"./tree-fd3a041e.js";import{u as wa,__tla as Ca}from"./useMessage-171aa63e.js";import{_ as Ta}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ea}from"./el-card-c558f0ec.js";import{__tla as ka}from"./index-a72a8920.js";import{__tla as qa}from"./main-6787445e.js";import{__tla as Va}from"./TabNews-e6b53f0c.js";import{__tla as Sa}from"./main-74cfbf31.js";import{__tla as Da}from"./el-image-2171f3ff.js";import{__tla as $a}from"./el-image-viewer-5d14bc77.js";import{__tla as Aa}from"./main-16c68401.js";import{__tla as Ha}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{__tla as Na}from"./index-cc63c3c4.js";import{__tla as Pa}from"./main-ec2be832.js";import{__tla as Fa}from"./main.vue_vue_type_script_setup_true_lang-0610a4e1.js";import{__tla as ja}from"./index-4663832c.js";import{__tla as za}from"./index-5f871167.js";import{__tla as Ba}from"./formatTime-41155543.js";import{__tla as Ga}from"./TabText.vue_vue_type_script_setup_true_lang-684c2db6.js";import{__tla as La}from"./TabImage-5c826f21.js";import{__tla as Oa}from"./useUpload-1c63b1eb.js";import{__tla as Ra}from"./TabVoice-07daad5d.js";import{__tla as Ja}from"./TabVideo-c2bd716c.js";import{__tla as Ka}from"./TabMusic.vue_vue_type_script_setup_true_lang-0e983a81.js";import{__tla as Qa}from"./vuedraggable.umd-67523a5c.js";let Q,Wa=Promise.all([(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Qa}catch{}})()]).then(async()=>{let q,V,S,D,$,A,H,N,P,x;q={class:"clearfix public-account-management"},V={class:"left"},S={class:"weixin-hd"},D={class:"weixin-title"},$={class:"clearfix weixin-menu"},A={class:"save_div"},H={key:0,class:"right"},N={key:1,class:"right"},P=[(g=>(ma("data-v-c849596e"),g=g(),da(),g))(()=>v("p",null,"\u8BF7\u9009\u62E9\u83DC\u5355\u914D\u7F6E",-1))],x="__MENU_NOT_SELECTED__",Q=Ta(_a({name:"MpMenu",__name:"index",setup(g){const o=wa(),c=e(!1),p=e(-1),F=e(""),u=e([]),h=e(x),I=e(-1),f=e(!1),b=e(!0),n=e({}),l=e({grand:"0",x:0,y:0}),W=e(!1),X=(t,a)=>{p.value=t,F.value=a,w()},w=async()=>{c.value=!1;try{const t=await(r=>E.get({url:"/mp/menu/list?accountId="+r}))(p.value),a=Y(t);u.value=ba(a,"id")}finally{c.value=!1}},Y=t=>{if(!t)return[];const a=[];return t.forEach(r=>{const m={...r};m.reply={type:r.replyMessageType,accountId:r.accountId,content:r.replyContent,mediaId:r.replyMediaId,url:r.replyMediaUrl,title:r.replyTitle,description:r.replyDescription,thumbMediaId:r.replyThumbMediaId,thumbMediaUrl:r.replyThumbMediaUrl,articles:r.replyArticles,musicUrl:r.replyMusicUrl,hqMusicUrl:r.replyHqMusicUrl},a.push(m)}),a},Z=()=>{h.value=x,I.value=-1,f.value=!1,n.value={},l.value={grand:"0",x:0,y:0},W.value=!1},aa=async()=>{var t;try{await o.confirm("\u786E\u5B9A\u8981\u5220\u9664\u5417?"),l.value.grand==="1"?u.value.splice(l.value.x,1):l.value.grand==="2"&&((t=u.value[l.value.x].children)==null||t.splice(l.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)=>E.post({url:"/mp/menu/save",data:{accountId:t,menus:a}}))(p.value,la()),w(),o.notifySuccess("\u53D1\u5E03\u6210\u529F")}finally{c.value=!1}},ra=async()=>{try{await o.confirm("\u786E\u5B9A\u8981\u5220\u9664\u5417?"),c.value=!0,await(t=>E.delete({url:"/mp/menu/delete?accountId="+t}))(p.value),Z(),w(),o.notifySuccess("\u6E05\u7A7A\u6210\u529F")}finally{c.value=!1}},la=()=>{const t=[];return u.value.forEach(a=>{const r=j(a);t.push(r),!a.children||a.children.length<=0||(r.children=[],a.children.forEach(m=>{r.children.push(j(m))}))}),t},j=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 r=ia,m=sa,z=va,B=oa,G=ca("hasPermi"),ea=pa;return d(),U(na,null,[s(z,null,{default:y(()=>[s(m,{class:"-mb-15px",ref:"queryFormRef",inline:!0,"label-width":"68px"},{default:y(()=>[s(r,{label:"\u516C\u4F17\u53F7",prop:"accountId"},{default:y(()=>[s(_(fa),{onChange:X})]),_:1})]),_:1},512)]),_:1}),s(z,null,{default:y(()=>[k((d(),U("div",q,[v("div",V,[v("div",S,[v("div",D,ua(_(F)),1)]),v("div",$,[s(Ua,{modelValue:_(u),"onUpdate:modelValue":a[0]||(a[0]=i=>R(u)?u.value=i:null),"account-id":_(p),"active-index":_(h),"parent-index":_(I),onMenuClicked:a[1]||(a[1]=(i,C)=>((T,M)=>{f.value=!0,n.value=T,l.value.grand="1",l.value.x=M,b.value=!0,h.value=`${M}`,I.value=M})(i,C)),onSubmenuClicked:a[2]||(a[2]=(i,C,T)=>((M,L,O)=>{f.value=!0,n.value=M,l.value.grand="2",l.value.x=L,l.value.y=O,b.value=!1,h.value=`${L}-${O}`})(i,C,T))},null,8,["modelValue","account-id","active-index","parent-index"])]),v("div",A,[k((d(),J(B,{class:"save_btn",type:"success",onClick:ta},{default:y(()=>[K("\u4FDD\u5B58\u5E76\u53D1\u5E03\u83DC\u5355")]),_:1})),[[G,["mp:menu:save"]]]),k((d(),J(B,{class:"save_btn",type:"danger",onClick:ra},{default:y(()=>[K("\u6E05\u7A7A\u83DC\u5355")]),_:1})),[[G,["mp:menu:delete"]]])])]),_(f)?(d(),U("div",H,[s(xa,{"account-id":_(p),"is-parent":_(b),modelValue:_(n),"onUpdate:modelValue":a[3]||(a[3]=i=>R(n)?n.value=i:null),onDelete:aa},null,8,["account-id","is-parent","modelValue"])])):(d(),U("div",N,P))])),[[ea,_(c)]])]),_:1})],64)}}}),[["__scopeId","data-v-c849596e"]])});export{Wa as __tla,Q as default};
|