1 |
- import{ar as k,d as _a,r as e,S as ca,o as d,c as I,i as s,w as y,a as _,D as E,k as v,t as ua,R as B,j as G,m as K,F as ia,I as na,J as sa,q as oa,M as ma,v as pa,x as da,__tla as ya}from"./index-1e808f2e.js";import{_ as va,__tla as ha}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{_ as fa,__tla as Ma}from"./main.vue_vue_type_script_setup_true_lang-89c20857.js";import xa,{__tla as ga}from"./MenuEditor-e02650cb.js";import Ia,{__tla as Ua}from"./MenuPreviewer-91514db5.js";import{h as ba}from"./tree-fd3a041e.js";import{u as wa,__tla as Ta}from"./useMessage-5f9e8917.js";import{_ as Ca}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ka}from"./el-card-03b3588b.js";import{__tla as Ea}from"./index-828195e8.js";import{__tla as qa}from"./main-8798f0ef.js";import{__tla as Sa}from"./TabNews-85923e2b.js";import{__tla as Va}from"./main-fae03c69.js";import{__tla as Da}from"./el-image-263fb014.js";import{__tla as Aa}from"./el-image-viewer-dddb6285.js";import{__tla as Fa}from"./main-7080b19d.js";import{__tla as $a}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{__tla as Ha}from"./index-73afebcf.js";import{__tla as Na}from"./main-c2ebd06d.js";import{__tla as Pa}from"./main.vue_vue_type_script_setup_true_lang-068c3b56.js";import{__tla as Ra}from"./index-1a14fda3.js";import{__tla as ja}from"./index-6e04feee.js";import{__tla as za}from"./formatTime-a348c3be.js";import{__tla as Ja}from"./TabText.vue_vue_type_script_setup_true_lang-2d568111.js";import{__tla as La}from"./TabImage-ce08097d.js";import{__tla as Oa}from"./useUpload-3083c231.js";import{__tla as Ba}from"./TabVoice-ce8309cb.js";import{__tla as Ga}from"./TabVideo-5d915b7f.js";import{__tla as Ka}from"./TabMusic.vue_vue_type_script_setup_true_lang-4033d899.js";import{__tla as Qa}from"./vuedraggable.umd-66af1f13.js";let Q,Wa=Promise.all([(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Qa}catch{}})()]).then(async()=>{let q,S,V,D,A,F,$,H,N,x;q={class:"clearfix public-account-management"},S={class:"left"},V={class:"weixin-hd"},D={class:"weixin-title"},A={class:"clearfix weixin-menu"},F={class:"save_div"},$={key:0,class:"right"},H={key:1,class:"right"},N=[(g=>(pa("data-v-c849596e"),g=g(),da(),g))(()=>v("p",null,"\u8BF7\u9009\u62E9\u83DC\u5355\u914D\u7F6E",-1))],x="__MENU_NOT_SELECTED__",Q=Ca(_a({name:"MpMenu",__name:"index",setup(g){const o=wa(),c=e(!1),m=e(-1),P=e(""),u=e([]),h=e(x),U=e(-1),f=e(!1),b=e(!0),i=e({}),l=e({grand:"0",x:0,y:0}),W=e(!1),X=(t,a)=>{m.value=t,P.value=a,w()},w=async()=>{c.value=!1;try{const t=await(r=>k.get({url:"/mp/menu/list?accountId="+r}))(m.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 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},Z=()=>{h.value=x,U.value=-1,f.value=!1,i.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"),i.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,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=>k.delete({url:"/mp/menu/delete?accountId="+t}))(m.value),Z(),w(),o.notifySuccess("\u6E05\u7A7A\u6210\u529F")}finally{c.value=!1}},la=()=>{const t=[];return u.value.forEach(a=>{const r=R(a);t.push(r),!a.children||a.children.length<=0||(r.children=[],a.children.forEach(p=>{r.children.push(R(p))}))}),t},R=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=na,p=sa,j=va,z=oa,J=ca("hasPermi"),ea=ma;return d(),I(ia,null,[s(j,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:X})]),_:1})]),_:1},512)]),_:1}),s(j,null,{default:y(()=>[E((d(),I("div",q,[v("div",S,[v("div",V,[v("div",D,ua(_(P)),1)]),v("div",A,[s(Ia,{modelValue:_(u),"onUpdate:modelValue":a[0]||(a[0]=n=>B(u)?u.value=n:null),"account-id":_(m),"active-index":_(h),"parent-index":_(U),onMenuClicked:a[1]||(a[1]=(n,T)=>((C,M)=>{f.value=!0,i.value=C,l.value.grand="1",l.value.x=M,b.value=!0,h.value=`${M}`,U.value=M})(n,T)),onSubmenuClicked:a[2]||(a[2]=(n,T,C)=>((M,L,O)=>{f.value=!0,i.value=M,l.value.grand="2",l.value.x=L,l.value.y=O,b.value=!1,h.value=`${L}-${O}`})(n,T,C))},null,8,["modelValue","account-id","active-index","parent-index"])]),v("div",F,[E((d(),G(z,{class:"save_btn",type:"success",onClick:ta},{default:y(()=>[K("\u4FDD\u5B58\u5E76\u53D1\u5E03\u83DC\u5355")]),_:1})),[[J,["mp:menu:save"]]]),E((d(),G(z,{class:"save_btn",type:"danger",onClick:ra},{default:y(()=>[K("\u6E05\u7A7A\u83DC\u5355")]),_:1})),[[J,["mp:menu:delete"]]])])]),_(f)?(d(),I("div",$,[s(xa,{"account-id":_(m),"is-parent":_(b),modelValue:_(i),"onUpdate:modelValue":a[3]||(a[3]=n=>B(i)?i.value=n:null),onDelete:aa},null,8,["account-id","is-parent","modelValue"])])):(d(),I("div",H,N))])),[[ea,_(c)]])]),_:1})],64)}}}),[["__scopeId","data-v-c849596e"]])});export{Wa as __tla,Q as default};
|