PageSourceSearch

https://mhtclouding.com/tongying/assets/index-B4znc0_S.js

js mhtclouding.com collected 2026-10-02 16:02:56 UTC 3,204 bytes, 1 lines download raw bytes

1import{r as i,M as I,d as a,F as X,o as _,c as w,f as l,h as e,p as d,G as q,m as V,H as z,I as J,e as y,A as E,n as K,X as T}from"./index-uGWb9Yh4.js";const O={class:"customer-email-management"},P=y("span",null,"客户邮件管理",-1),Q=["innerHTML"],Y={__name:"index",setup(R){const p=i("customers"),D=i(!1),f=i(!1),m=i(!1),N=i([]),j=i([]),r=i(null),n=I({to:"",subject:"",content:""}),x=async()=>{f.value=!0;try{await sendEmailApi(n),T.success("发送成功"),m.value=!1,loadEmails(r.value.id)}catch(s){T.error("发送失败: "+s.message)}finally{f.value=!1}},U=s=>{r.value=s,p.value="emails",loadEmails(s.id)},B=s=>{r.value=s,n.to=s.email,n.subject="",n.content="",m.value=!0};return(s,o)=>{const c=a("el-button"),v=a("el-table-column"),M=a("el-table"),k=a("el-tab-pane"),S=a("el-tag"),C=a("el-card"),$=a("el-timeline-item"),h=a("el-timeline"),F=a("el-tabs"),b=a("el-input"),g=a("el-form-item"),H=a("el-form"),L=a("el-dialog"),A=X("loading");return _(),w("div",O,[l(C,null,{header:e(()=>[P,l(c,{type:"primary",onClick:s.showConfigDialog,style:{float:"right"}},{default:e(()=>[d(" 邮箱配置 ")]),_:1},8,["onClick"])]),default:e(()=>[l(F,{modelValue:p.value,"onUpdate:modelValue":o[0]||(o[0]=t=>p.value=t)},{default:e(()=>{var t;return[l(k,{label:"客户列表",name:"customers"},{default:e(()=>[q((_(),V(M,{data:N.value},{default:e(()=>[l(v,{prop:"name",label:"客户姓名"}),l(v,{prop:"email",label:"邮箱地址"}),l(v,{label:"操作"},{default:e(u=>[l(c,{onClick:G=>U(u.row)},{default:e(()=>[d("查看邮件")]),_:2},1032,["onClick"]),l(c,{type:"primary",onClick:G=>B(u.row)},{default:e(()=>[d("发送邮件")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[A,D.value]])]),_:1}),r.value?(_(),V(k,{key:0,label:`邮件历史 (${(t=r.value)==null?void 0:t.name})`,name:"emails"},{default:e(()=>[l(h,null,{default:e(()=>[(_(!0),w(z,null,J(j.value,u=>(_(),V($,{key:u.id,timestamp:s.formatTime(u.sendTime)},{default:e(()=>[l(C,null,{header:e(()=>[y("span",null,E(u.subject),1),l(S,{type:u.direction==="SENT"?"success":"info"},{default:e(()=>[d(E(u.direction==="SENT"?"已发送":"已接收"),1)]),_:2},1032,["type"])]),default:e(()=>[y("div",{innerHTML:u.content},null,8,Q)]),_:2},1024)]),_:2},1032,["timestamp"]))),128))]),_:1})]),_:1},8,["label"])):K("",!0)]}),_:1},8,["modelValue"])]),_:1}),l(L,{modelValue:m.value,"onUpdate:modelValue":o[5]||(o[5]=t=>m.value=t),title:"发送邮件",width:"60%"},{footer:e(()=>[l(c,{onClick:o[4]||(o[4]=t=>m.value=!1)},{default:e(()=>[d("取消")]),_:1}),l(c,{type:"primary",onClick:x,loading:f.value},{default:e(()=>[d("发送")]),_:1},8,["loading"])]),default:e(()=>[l(H,{model:n,"label-width":"80px"},{default:e(()=>[l(g,{label:"收件人"},{default:e(()=>[l(b,{modelValue:n.to,"onUpdate:modelValue":o[1]||(o[1]=t=>n.to=t),disabled:""},null,8,["modelValue"])]),_:1}),l(g,{label:"主题"},{default:e(()=>[l(b,{modelValue:n.subject,"onUpdate:modelValue":o[2]||(o[2]=t=>n.subject=t)},null,8,["modelValue"])]),_:1}),l(g,{label:"内容"},{default:e(()=>[l(b,{type:"textarea",modelValue:n.content,"onUpdate:modelValue":o[3]||(o[3]=t=>n.content=t),rows:10},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])}}};export{Y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.