1 |
- import{az as E,d as _a,r as e,a3 as ca,o as d,c as U,f as s,B as y,a as _,k,C as v,G as ua,a2 as R,A as W,E as Z,F as na,V as ia,W as sa,K as oa,Z as ma,M as pa,N as da,__tla as ya}from"./index-e8bff8cb.js";import{_ as va,__tla as ha}from"./ContentWrap.vue_vue_type_script_setup_true_lang-33dea697.js";import{_ as fa,__tla as Ma}from"./main.vue_vue_type_script_setup_true_lang-32a7a920.js";import xa,{__tla as ga}from"./MenuEditor-d824cb79.js";import Ua,{__tla as Ia}from"./MenuPreviewer-eafd52b2.js";import{h as ba}from"./tree-0af4953a.js";import{u as wa,__tla as Ca}from"./useMessage-de42a595.js";import{_ as Ta}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ea}from"./el-card-f9558d99.js";import{__tla as ka}from"./index-72553c28.js";import{__tla as Va}from"./main-974ce862.js";import{__tla as qa}from"./TabNews-1cd859a0.js";import{__tla as Sa}from"./main-555e2935.js";import{__tla as Da}from"./el-image-7cacfc0f.js";import{__tla as Aa}from"./el-image-viewer-aab7739e.js";import{__tla as Fa}from"./main-72778113.js";import{__tla as Na}from"./index.vue_vue_type_script_setup_true_lang-75f84d87.js";import{__tla as $a}from"./index-35928fe5.js";import{__tla as Ba}from"./main-e1788fb7.js";import{__tla as Ga}from"./main.vue_vue_type_script_setup_true_lang-dc78df78.js";import{__tla as Ha}from"./index-417b4018.js";import{__tla as Pa}from"./index-2a11aba2.js";import{__tla as za}from"./formatTime-4fdd5566.js";import{__tla as Ka}from"./TabText.vue_vue_type_script_setup_true_lang-8bc4f5b9.js";import{__tla as La}from"./TabImage-af69f9af.js";import{__tla as Oa}from"./useUpload-4185b598.js";import{__tla as Ra}from"./TabVoice-b774d9cb.js";import{__tla as Wa}from"./TabVideo-caa3e5e7.js";import{__tla as Za}from"./TabMusic.vue_vue_type_script_setup_true_lang-2f88b7ed.js";import{__tla as ja}from"./vuedraggable.umd-e6dc7eda.js";let j,Ja=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 Va}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return ja}catch{}})()]).then(async()=>{let V,q,S,D,A,F,N,$,B,x;V={class:"clearfix public-account-management"},q={class:"left"},S={class:"weixin-hd"},D={class:"weixin-title"},A={class:"clearfix weixin-menu"},F={class:"save_div"},N={key:0,class:"right"},$={key:1,class:"right"},B=[(g=>(pa("data-v-c849596e"),g=g(),da(),g))(()=>v("p",null,"\u8BF7\u9009\u62E9\u83DC\u5355\u914D\u7F6E",-1))],x="__MENU_NOT_SELECTED__",j=Ta(_a({name:"MpMenu",__name:"index",setup(g){const o=wa(),c=e(!1),m=e(-1),G=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}),J=e(!1),Q=(t,a)=>{m.value=t,G.value=a,w()},w=async()=>{c.value=!1;try{const t=await(r=>E.get({url:"/mp/menu/list?accountId="+r}))(m.value),a=X(t);u.value=ba(a,"id")}finally{c.value=!1}},X=t=>{if(!t)return[];const a=[];return t.forEach(r=>{const p={...r};p.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(p)}),a},Y=()=>{h.value=x,I.value=-1,f.value=!1,n.value={},l.value={grand:"0",x:0,y:0},J.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}}))(m.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}))(m.value),Y(),w(),o.notifySuccess("\u6E05\u7A7A\u6210\u529F")}finally{c.value=!1}},la=()=>{const t=[];return u.value.forEach(a=>{const r=H(a);t.push(r),!a.children||a.children.length<=0||(r.children=[],a.children.forEach(p=>{r.children.push(H(p))}))}),t},H=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,p=sa,P=va,z=oa,K=ca("hasPermi"),ea=ma;return d(),U(na,null,[s(P,null,{default:y(()=>[s(p,{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:Q})]),_:1})]),_:1},512)]),_:1}),s(P,null,{default:y(()=>[k((d(),U("div",V,[v("div",q,[v("div",S,[v("div",D,ua(_(G)),1)]),v("div",A,[s(Ua,{modelValue:_(u),"onUpdate:modelValue":a[0]||(a[0]=i=>R(u)?u.value=i:null),"account-id":_(m),"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",F,[k((d(),W(z,{class:"save_btn",type:"success",onClick:ta},{default:y(()=>[Z("\u4FDD\u5B58\u5E76\u53D1\u5E03\u83DC\u5355")]),_:1})),[[K,["mp:menu:save"]]]),k((d(),W(z,{class:"save_btn",type:"danger",onClick:ra},{default:y(()=>[Z("\u6E05\u7A7A\u83DC\u5355")]),_:1})),[[K,["mp:menu:delete"]]])])]),_(f)?(d(),U("div",N,[s(xa,{"account-id":_(m),"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",$,B))])),[[ea,_(c)]])]),_:1})],64)}}}),[["__scopeId","data-v-c849596e"]])});export{Ja as __tla,j as default};
|