index-caf05a8d.js 7.2 KB

1
  1. import{as as y,d as $,r as u,g as j,T as B,o as q,c as G,i as t,w as r,a as l,R as g,D as Q,k as W,l as m,S as X,F as Y,I as ee,J as ae,n as te,s as le,E as re,p as se,Z as oe,$ as _e,aA as ue,_ as ne,__tla as ce}from"./index-2f799233.js";import ie,{__tla as pe}from"./ReplyForm-ff1a83b7.js";import{R as k,__tla as me}from"./TabNews-479ff07e.js";import{__tla as de}from"./main-3a758e9c.js";import{__tla as ye}from"./useUpload-56bf2433.js";import{u as fe,__tla as ve}from"./useMessage-e567ad40.js";import{__tla as he}from"./TabImage-63766296.js";import{__tla as Me}from"./main-5916caaf.js";import{__tla as ge}from"./TabVoice-3f45746c.js";import{__tla as we}from"./main-59faad7f.js";import{__tla as Ie}from"./TabVideo-40fe10a5.js";import{__tla as Ue}from"./el-image-4d26fa76.js";import{__tla as be}from"./el-image-viewer-8e9e3571.js";import{__tla as xe}from"./main-8d30da97.js";import{__tla as Te}from"./main-b8f70555.js";import Ve,{__tla as Ce}from"./main-108765f1.js";import{_ as A,__tla as De}from"./ContentWrap-9da801df.js";import qe,{__tla as ke}from"./ReplyTable-ed5066e7.js";import{M as d}from"./types-5e186e8c.js";import{__tla as Ae}from"./dict-20c916e2.js";import{__tla as Re}from"./index-e6cd813f.js";import{__tla as Fe}from"./index-1c180a16.js";import{__tla as Ke}from"./index-d1cd47c8.js";import{__tla as Ne}from"./index-f6d57b08.js";import{__tla as ze}from"./formatTime-2157894c.js";import{__tla as He}from"./TabText-0e5634f6.js";import{__tla as Je}from"./TabMusic-a41dac8f.js";import{__tla as Oe}from"./index-4c417a29.js";import{__tla as Pe}from"./el-card-c64c83d1.js";import{__tla as Se}from"./DictTag-ea4c6cc2.js";import"./color-6e929987.js";import{__tla as Ee}from"./main-d8f0cf16.js";import{__tla as Le}from"./el-link-23decf79.js";let R,Ze=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 Ce}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Je}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Le}catch{}})()]).then(async()=>{R=ne($({name:"MpAutoReply",__name:"index",setup($e){const f=fe(),D=u(-1),_=u(d.Keyword),w=u(!0),F=u(0),I=u([]),U=u(null),n=j({pageNo:1,pageSize:10,accountId:D}),b=u(!1),c=u(!1),o=u({}),s=u({type:k.Text,accountId:-1}),K=e=>{D.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,F.value=a.total}finally{w.value=!1}var e},N=e=>{_.value=e,n.pageNo=1,v()},z=()=>{x(),s.value={type:k.Text,accountId:n.accountId},b.value=!0,c.value=!0},H=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},J=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 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()},P=()=>{c.value=!1,x()};return(e,a)=>{const p=ee,T=ae,h=te,V=le,S=re,M=se,C=oe,E=_e,L=ue,Z=B("hasPermi");return q(),G(Y,null,[t(l(A),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(Ve),{onChange:K})]),_:1})]),_:1},8,["model"])]),_:1}),t(l(A),null,{default:r(()=>[t(E,{modelValue:l(_),"onUpdate:modelValue":a[0]||(a[0]=i=>g(_)?_.value=i:null),onTabChange:N},{default:r(()=>[t(M,{gutter:10,class:"mb8"},{default:r(()=>[t(S,{span:1.5},{default:r(()=>[l(_)!==l(d).Follow||l(I).length<=0?Q((q(),W(V,{key:0,type:"primary",plain:"",onClick:z},{default:r(()=>[t(h,{icon:"ep:plus"}),m("\u65B0\u589E ")]),_:1})),[[Z,["mp:auto-reply:create"]]]):X("",!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(qe,{loading:l(w),list:l(I),"msg-type":l(_),onOnUpdate:H,onOnDelete:J},null,8,["loading","list","msg-type"]),t(L,{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(V,{onClick:P},{default:r(()=>[m("\u53D6 \u6D88")]),_:1}),t(V,{type:"primary",onClick:O},{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","D:/zx/mall-newfeifan-zx-business/src/views/mp/autoReply/index.vue"]])});export{Ze as __tla,R as default};