1 |
- import{am as y,d as Y,r as u,e as B,M as J,o as q,c as L,f as t,w as r,a as l,l as g,z as Q,x as W,y as m,a0 as Z,F as $,C as ee,H as ae,j as te,G as le,E as re,i as se,m as oe,n as _e,bk as ue,_ as ne,__tla as ce}from"./index-8dc1e40a.js";import ie,{__tla as pe}from"./ReplyForm-1367bbd9.js";import{R as D,__tla as me}from"./TabNews-ccb905af.js";import{__tla as de}from"./main-69d14ed2.js";import{__tla as ye}from"./useUpload-18ed0543.js";import{u as fe,__tla as ve}from"./useMessage-7a27dd80.js";import{__tla as he}from"./TabImage-3b92c4cc.js";import{__tla as Me}from"./main-e9c0874d.js";import{__tla as ge}from"./TabVoice-6f6a7bcf.js";import{__tla as we}from"./main-e0b1ced1.js";import{__tla as Ie}from"./TabVideo-f3c1d4df.js";import{__tla as Ue}from"./el-image-6a48e9f1.js";import{__tla as be}from"./el-image-viewer-3b8905e6.js";import{__tla as xe}from"./main-a65bb27b.js";import{__tla as Te}from"./main-3498e37c.js";import Ce,{__tla as Ve}from"./main-bd78da4d.js";import{_ as H,__tla as ke}from"./ContentWrap-0aca5216.js";import qe,{__tla as De}from"./ReplyTable-0c546842.js";import{M as d}from"./types-5e186e8c.js";import{__tla as He}from"./dict-f13a3c8f.js";import{__tla as Re}from"./index-64aeaa78.js";import{__tla as Ae}from"./index-803dbf9a.js";import{__tla as Fe}from"./index-e8092043.js";import{__tla as Ke}from"./index-df9490d5.js";import{__tla as ze}from"./formatTime-8a155b2e.js";import{__tla as Ne}from"./TabText-a4a8dec2.js";import{__tla as Oe}from"./TabMusic-eeef6145.js";import{__tla as Pe}from"./index-65dd95f5.js";import{__tla as Se}from"./el-card-18df90f0.js";import{__tla as je}from"./DictTag-85aade2b.js";import"./color-6e929987.js";import{__tla as Ee}from"./main-3b32d1ab.js";import{__tla as Ge}from"./el-link-a41356f3.js";let R,Xe=Promise.all([(()=>{try{return ce}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return je}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Ge}catch{}})()]).then(async()=>{R=ne(Y({name:"MpAutoReply",__name:"index",setup(Ye){const f=fe(),k=u(-1),_=u(d.Keyword),w=u(!0),A=u(0),I=u([]),U=u(null),n=B({pageNo:1,pageSize:10,accountId:k}),b=u(!1),c=u(!1),o=u({}),s=u({type:D.Text,accountId:-1}),F=e=>{k.value=e,s.value.accountId=e,n.pageNo=1,v()},v=async()=>{w.value=!0;try{const a=await(e={...n,type:_.value},y.get({url:"/mp/auto-reply/page",params:e}));I.value=a.list,A.value=a.total}finally{w.value=!1}var e},K=e=>{_.value=e,n.pageNo=1,v()},z=()=>{x(),s.value={type:D.Text,accountId:n.accountId},b.value=!0,c.value=!0},N=async e=>{x();const a=await(p=>y.get({url:"/mp/auto-reply/get?id="+p}))(e);o.value={...a},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:a.responseMessageType,accountId:n.accountId,content:a.responseContent,mediaId:a.responseMediaId,url:a.responseMediaUrl,title:a.responseTitle,description:a.responseDescription,thumbMediaId:a.responseThumbMediaId,thumbMediaUrl:a.responseThumbMediaUrl,articles:a.responseArticles,musicUrl:a.responseMusicUrl,hqMusicUrl:a.responseHqMusicUrl},b.value=!1,c.value=!0},O=async e=>{await f.confirm("\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u6570\u636E?"),await(a=>y.delete({url:"/mp/auto-reply/delete?id="+a}))(e),await v(),f.success("\u5220\u9664\u6210\u529F")},P=async()=>{var p;await((p=U.value)==null?void 0:p.validate());const e={...o.value};var a;e.responseMessageType=s.value.type,e.responseContent=s.value.content,e.responseMediaId=s.value.mediaId,e.responseMediaUrl=s.value.url,e.responseTitle=s.value.title,e.responseDescription=s.value.description,e.responseThumbMediaId=s.value.thumbMediaId,e.responseThumbMediaUrl=s.value.thumbMediaUrl,e.responseArticles=s.value.articles,e.responseMusicUrl=s.value.musicUrl,e.responseHqMusicUrl=s.value.hqMusicUrl,o.value.id!==void 0?(await(a=e,y.put({url:"/mp/auto-reply/update",data:a})),f.success("\u4FEE\u6539\u6210\u529F")):(await(T=>y.post({url:"/mp/auto-reply/create",data:T}))(e),f.success("\u65B0\u589E\u6210\u529F")),c.value=!1,await v()},x=()=>{var e;o.value={id:void 0,accountId:n.accountId,type:_.value,requestKeyword:void 0,requestMatch:_.value===d.Keyword?1:void 0,requestMessageType:void 0},(e=U.value)==null||e.resetFields()},S=()=>{c.value=!1,x()};return(e,a)=>{const p=ee,T=ae,h=te,C=le,j=re,M=se,V=oe,E=_e,G=ue,X=J("hasPermi");return q(),L($,null,[t(l(H),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(Ce),{onChange:F})]),_:1})]),_:1},8,["model"])]),_:1}),t(l(H),null,{default:r(()=>[t(E,{modelValue:l(_),"onUpdate:modelValue":a[0]||(a[0]=i=>g(_)?_.value=i:null),onTabChange:K},{default:r(()=>[t(M,{gutter:10,class:"mb8"},{default:r(()=>[t(j,{span:1.5},{default:r(()=>[l(_)!==l(d).Follow||l(I).length<=0?Q((q(),W(C,{key:0,type:"primary",plain:"",onClick:z},{default:r(()=>[t(h,{icon:"ep:plus"}),m("\u65B0\u589E ")]),_:1})),[[X,["mp:auto-reply:create"]]]):Z("",!0)]),_:1})]),_:1}),t(V,{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(V,{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(V,{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(qe,{loading:l(w),list:l(I),"msg-type":l(_),onOnUpdate:N,onOnDelete:O},null,8,["loading","list","msg-type"]),t(G,{title:l(b)?"\u65B0\u589E\u81EA\u52A8\u56DE\u590D":"\u4FEE\u6539\u81EA\u52A8\u56DE\u590D",modelValue:l(c),"onUpdate:modelValue":a[3]||(a[3]=i=>g(c)?c.value=i:null),width:"800px","destroy-on-close":""},{footer:r(()=>[t(C,{onClick:S},{default:r(()=>[m("\u53D6 \u6D88")]),_:1}),t(C,{type:"primary",onClick:P},{default:r(()=>[m("\u786E \u5B9A")]),_:1})]),default:r(()=>[t(ie,{modelValue:l(o),"onUpdate:modelValue":a[1]||(a[1]=i=>g(o)?o.value=i:null),reply:l(s),"onUpdate:reply":a[2]||(a[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","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/autoReply/index.vue"]])});export{Xe as __tla,R as default};
|