index-121f5d17.js 7.2 KB

1
  1. import{aA as y,d as X,r as u,x as j,a4 as B,o as k,c as E,f as t,A as r,a as l,a2 as g,k as G,C as Y,D as m,a3 as Z,F as $,V as aa,W as ea,Q as ta,J as la,H as ra,K as sa,aa as oa,ab as _a,a_ as ua,_ as na,__tla as ca}from"./index-286756b9.js";import ia,{__tla as pa}from"./ReplyForm-3f1f4bc9.js";import{R as A,__tla as ma}from"./TabNews-aaea42ae.js";import{__tla as da}from"./main-fb0230ec.js";import{__tla as ya}from"./useUpload-3c8bb42c.js";import{u as fa,__tla as va}from"./useMessage-084b1e70.js";import{__tla as ha}from"./TabImage-da6f1423.js";import{__tla as Ma}from"./main-12ab9f27.js";import{__tla as ga}from"./TabVoice-0e9a0b66.js";import{__tla as Ia}from"./main-53b5a2f2.js";import{__tla as wa}from"./TabVideo-a27283f3.js";import{__tla as Ua}from"./el-image-73c105b7.js";import{__tla as ba}from"./el-image-viewer-e0e5d3be.js";import{__tla as xa}from"./main-2691e73f.js";import{__tla as Ta}from"./main-a55ef504.js";import Va,{__tla as Ca}from"./main-88f2ab85.js";import{_ as D,__tla as qa}from"./ContentWrap-83998678.js";import ka,{__tla as Aa}from"./ReplyTable-33f6673f.js";import{M as d}from"./types-5e186e8c.js";import{__tla as Da}from"./dict-82dca549.js";import{__tla as Fa}from"./index-ed6c67a8.js";import{__tla as Ka}from"./index-fb47c94c.js";import{__tla as Ra}from"./index-dab960b4.js";import{__tla as za}from"./index-2090e37e.js";import{__tla as Ha}from"./formatTime-83e416ef.js";import{__tla as Na}from"./TabText-b969d16a.js";import{__tla as Oa}from"./TabMusic-43e47306.js";import{__tla as Pa}from"./index-cc358278.js";import{__tla as Ja}from"./el-card-d3d5a654.js";import{__tla as La}from"./DictTag-f72b04ca.js";import"./color-6e929987.js";import{__tla as Qa}from"./main-4caf94c8.js";import{__tla as Sa}from"./el-link-c30faa98.js";let F,Wa=Promise.all([(()=>{try{return ca}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Sa}catch{}})()]).then(async()=>{F=na(X({name:"MpAutoReply",__name:"index",setup(Xa){const f=fa(),q=u(-1),_=u(d.Keyword),I=u(!0),K=u(0),w=u([]),U=u(null),n=j({pageNo:1,pageSize:10,accountId:q}),b=u(!1),c=u(!1),o=u({}),s=u({type:A.Text,accountId:-1}),R=a=>{q.value=a,s.value.accountId=a,n.pageNo=1,v()},v=async()=>{I.value=!0;try{const e=await(a={...n,type:_.value},y.get({url:"/mp/auto-reply/page",params:a}));w.value=e.list,K.value=e.total}finally{I.value=!1}var a},z=a=>{_.value=a,n.pageNo=1,v()},H=()=>{x(),s.value={type:A.Text,accountId:n.accountId},b.value=!0,c.value=!0},N=async a=>{x();const e=await(p=>y.get({url:"/mp/auto-reply/get?id="+p}))(a);o.value={...e},delete o.value.responseMessageType,delete o.value.responseContent,delete o.value.responseMediaId,delete o.value.responseMediaUrl,delete o.value.responseDescription,delete o.value.responseArticles,s.value={type:e.responseMessageType,accountId:n.accountId,content:e.responseContent,mediaId:e.responseMediaId,url:e.responseMediaUrl,title:e.responseTitle,description:e.responseDescription,thumbMediaId:e.responseThumbMediaId,thumbMediaUrl:e.responseThumbMediaUrl,articles:e.responseArticles,musicUrl:e.responseMusicUrl,hqMusicUrl:e.responseHqMusicUrl},b.value=!1,c.value=!0},O=async a=>{await f.confirm("\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u6570\u636E?"),await(e=>y.delete({url:"/mp/auto-reply/delete?id="+e}))(a),await v(),f.success("\u5220\u9664\u6210\u529F")},P=async()=>{var p;await((p=U.value)==null?void 0:p.validate());const a={...o.value};var e;a.responseMessageType=s.value.type,a.responseContent=s.value.content,a.responseMediaId=s.value.mediaId,a.responseMediaUrl=s.value.url,a.responseTitle=s.value.title,a.responseDescription=s.value.description,a.responseThumbMediaId=s.value.thumbMediaId,a.responseThumbMediaUrl=s.value.thumbMediaUrl,a.responseArticles=s.value.articles,a.responseMusicUrl=s.value.musicUrl,a.responseHqMusicUrl=s.value.hqMusicUrl,o.value.id!==void 0?(await(e=a,y.put({url:"/mp/auto-reply/update",data:e})),f.success("\u4FEE\u6539\u6210\u529F")):(await(T=>y.post({url:"/mp/auto-reply/create",data:T}))(a),f.success("\u65B0\u589E\u6210\u529F")),c.value=!1,await v()},x=()=>{var a;o.value={id:void 0,accountId:n.accountId,type:_.value,requestKeyword:void 0,requestMatch:_.value===d.Keyword?1:void 0,requestMessageType:void 0},(a=U.value)==null||a.resetFields()},J=()=>{c.value=!1,x()};return(a,e)=>{const p=aa,T=ea,h=ta,V=la,L=ra,M=sa,C=oa,Q=_a,S=ua,W=B("hasPermi");return k(),E($,null,[t(l(D),null,{default:r(()=>[t(T,{class:"-mb-15px",model:l(n),inline:!0,"label-width":"68px"},{default:r(()=>[t(p,{label:"\u516C\u4F17\u53F7",prop:"accountId"},{default:r(()=>[t(l(Va),{onChange:R})]),_:1})]),_:1},8,["model"])]),_:1}),t(l(D),null,{default:r(()=>[t(Q,{modelValue:l(_),"onUpdate:modelValue":e[0]||(e[0]=i=>g(_)?_.value=i:null),onTabChange:z},{default:r(()=>[t(M,{gutter:10,class:"mb8"},{default:r(()=>[t(L,{span:1.5},{default:r(()=>[l(_)!==l(d).Follow||l(w).length<=0?G((k(),Y(V,{key:0,type:"primary",plain:"",onClick:H},{default:r(()=>[t(h,{icon:"ep:plus"}),m("\u65B0\u589E ")]),_:1})),[[W,["mp:auto-reply:create"]]]):Z("",!0)]),_:1})]),_:1}),t(C,{name:l(d).Follow},{label:r(()=>[t(M,{align:"middle"},{default:r(()=>[t(h,{icon:"ep:star",class:"mr-2px"}),m(" \u5173\u6CE8\u65F6\u56DE\u590D")]),_:1})]),_:1},8,["name"]),t(C,{name:l(d).Message},{label:r(()=>[t(M,{align:"middle"},{default:r(()=>[t(h,{icon:"ep:chat-line-round",class:"mr-2px"}),m(" \u6D88\u606F\u56DE\u590D")]),_:1})]),_:1},8,["name"]),t(C,{name:l(d).Keyword},{label:r(()=>[t(M,{align:"middle"},{default:r(()=>[t(h,{icon:"fa:newspaper-o",class:"mr-2px"}),m(" \u5173\u952E\u8BCD\u56DE\u590D")]),_:1})]),_:1},8,["name"])]),_:1},8,["modelValue"]),t(ka,{loading:l(I),list:l(w),"msg-type":l(_),onOnUpdate:N,onOnDelete:O},null,8,["loading","list","msg-type"]),t(S,{title:l(b)?"\u65B0\u589E\u81EA\u52A8\u56DE\u590D":"\u4FEE\u6539\u81EA\u52A8\u56DE\u590D",modelValue:l(c),"onUpdate:modelValue":e[3]||(e[3]=i=>g(c)?c.value=i:null),width:"800px","destroy-on-close":""},{footer:r(()=>[t(V,{onClick:J},{default:r(()=>[m("\u53D6 \u6D88")]),_:1}),t(V,{type:"primary",onClick:P},{default:r(()=>[m("\u786E \u5B9A")]),_:1})]),default:r(()=>[t(ia,{modelValue:l(o),"onUpdate:modelValue":e[1]||(e[1]=i=>g(o)?o.value=i:null),reply:l(s),"onUpdate:reply":e[2]||(e[2]=i=>g(s)?s.value=i:null),"msg-type":l(_),ref_key:"formRef",ref:U},null,8,["modelValue","reply","msg-type"])]),_:1},8,["title","modelValue"])]),_:1})],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mp/autoReply/index.vue"]])});export{Wa as __tla,F as default};