1 |
- import{ap as y,d as X,r as u,f as Y,P as G,o as k,c as L,i as t,w as r,a as l,y as g,C as Q,l as W,j as m,a2 as Z,F as $,H as ee,K as ae,v as te,J as le,E as re,s as se,z as oe,A as _e,cu as ue,_ as ne,__tla as ce}from"./index-b2b3c6c4.js";import pe,{__tla as ie}from"./ReplyForm-b2c9ed19.js";import{R as A,__tla as me}from"./TabNews-099983d7.js";import{__tla as de}from"./main-2c41dec3.js";import{__tla as ye}from"./useUpload-fb27bbcc.js";import{u as fe,__tla as ve}from"./useMessage-a5edbb0f.js";import{__tla as he}from"./TabImage-d6d8e825.js";import{__tla as Me}from"./main-a3bf7529.js";import{__tla as ge}from"./TabVoice-bab68bae.js";import{__tla as Ue}from"./main-5cbc3cda.js";import{__tla as we}from"./TabVideo-9ac2b7e8.js";import{__tla as Ie}from"./el-image-d434829d.js";import{__tla as be}from"./el-image-viewer-b5664270.js";import{__tla as Te}from"./main-9ec062cd.js";import{__tla as xe}from"./main-2142c07e.js";import Ve,{__tla as qe}from"./main-5aeecedf.js";import{_ as D,__tla as Ce}from"./ContentWrap-e91b2b5a.js";import ke,{__tla as Ae}from"./ReplyTable-a4d9ae84.js";import{M as d}from"./types-5e186e8c.js";import{__tla as De}from"./dict-7f0cc6d2.js";import{__tla as Ke}from"./index-341fc94c.js";import{__tla as Re}from"./index-2d76a87c.js";import{__tla as Fe}from"./index-23a6a8c6.js";import{__tla as He}from"./index-9fa58f2e.js";import{__tla as ze}from"./formatTime-7e07ce72.js";import{__tla as Ne}from"./TabText-f0a7a63a.js";import{__tla as Pe}from"./TabMusic-01c37607.js";import{__tla as Oe}from"./index-a14742f5.js";import{__tla as je}from"./el-card-bd6e27c9.js";import{__tla as Be}from"./DictTag-4199ec8d.js";import"./color-6e929987.js";import{__tla as Ee}from"./main-defd6d39.js";import{__tla as Je}from"./el-link-45ef051e.js";let K,Se=Promise.all([(()=>{try{return ce}catch{}})(),(()=>{try{return ie}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 Ue}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return qe}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return je}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Je}catch{}})()]).then(async()=>{K=ne(X({name:"MpAutoReply",__name:"index",setup(Xe){const f=fe(),C=u(-1),_=u(d.Keyword),U=u(!0),R=u(0),w=u([]),I=u(null),n=Y({pageNo:1,pageSize:10,accountId:C}),b=u(!1),c=u(!1),o=u({}),s=u({type:A.Text,accountId:-1}),F=e=>{C.value=e,s.value.accountId=e,n.pageNo=1,v()},v=async()=>{U.value=!0;try{const a=await(e={...n,type:_.value},y.get({url:"/mp/auto-reply/page",params:e}));w.value=a.list,R.value=a.total}finally{U.value=!1}var e},H=e=>{_.value=e,n.pageNo=1,v()},z=()=>{T(),s.value={type:A.Text,accountId:n.accountId},b.value=!0,c.value=!0},N=async e=>{T();const a=await(i=>y.get({url:"/mp/auto-reply/get?id="+i}))(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},P=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")},O=async()=>{var i;await((i=I.value)==null?void 0:i.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(x=>y.post({url:"/mp/auto-reply/create",data:x}))(e),f.success("\u65B0\u589E\u6210\u529F")),c.value=!1,await v()},T=()=>{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=I.value)==null||e.resetFields()},j=()=>{c.value=!1,T()};return(e,a)=>{const i=ee,x=ae,h=te,V=le,B=re,M=se,q=oe,E=_e,J=ue,S=G("hasPermi");return k(),L($,null,[t(l(D),null,{default:r(()=>[t(x,{class:"-mb-15px",model:l(n),inline:!0,"label-width":"68px"},{default:r(()=>[t(i,{label:"\u516C\u4F17\u53F7",prop:"accountId"},{default:r(()=>[t(l(Ve),{onChange:F})]),_:1})]),_:1},8,["model"])]),_:1}),t(l(D),null,{default:r(()=>[t(E,{modelValue:l(_),"onUpdate:modelValue":a[0]||(a[0]=p=>g(_)?_.value=p:null),onTabChange:H},{default:r(()=>[t(M,{gutter:10,class:"mb8"},{default:r(()=>[t(B,{span:1.5},{default:r(()=>[l(_)!==l(d).Follow||l(w).length<=0?Q((k(),W(V,{key:0,type:"primary",plain:"",onClick:z},{default:r(()=>[t(h,{icon:"ep:plus"}),m("\u65B0\u589E ")]),_:1})),[[S,["mp:auto-reply:create"]]]):Z("",!0)]),_:1})]),_:1}),t(q,{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(q,{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(q,{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(ke,{loading:l(U),list:l(w),"msg-type":l(_),onOnUpdate:N,onOnDelete:P},null,8,["loading","list","msg-type"]),t(J,{title:l(b)?"\u65B0\u589E\u81EA\u52A8\u56DE\u590D":"\u4FEE\u6539\u81EA\u52A8\u56DE\u590D",modelValue:l(c),"onUpdate:modelValue":a[3]||(a[3]=p=>g(c)?c.value=p:null),width:"800px","destroy-on-close":""},{footer:r(()=>[t(V,{onClick:j},{default:r(()=>[m("\u53D6 \u6D88")]),_:1}),t(V,{type:"primary",onClick:O},{default:r(()=>[m("\u786E \u5B9A")]),_:1})]),default:r(()=>[t(pe,{modelValue:l(o),"onUpdate:modelValue":a[1]||(a[1]=p=>g(o)?o.value=p:null),reply:l(s),"onUpdate:reply":a[2]||(a[2]=p=>g(s)?s.value=p:null),"msg-type":l(_),ref_key:"formRef",ref:I},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{Se as __tla,K as default};
|