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.