"use strict";(self["webpackChunkbyte_sailing_mobile"]=self["webpackChunkbyte_sailing_mobile"]||[]).push([[7023],{14071:function(e,l,t){t.d(l,{Z:function(){return m}});var o=t(13649),n=(t(64165),t(13813)),a=(t(55449),t(57658),t(73396)),i=t(44870),s=t(87139);const c={class:"common-list"},u={key:0,class:"left-box",style:{"margin-right":"20px"}},r=["onClick"],d=["onClick"];var p={__name:"common-list",props:{data:{type:Array,default:[]},config:{type:Object,default:[]},showMore:{type:Boolean,default:!0},isCheckbox:{type:Boolean,default:!1},optionalKey:{type:String,default:null}},setup(e){const l=(0,a.FN)().proxy;let t=(0,i.iH)([]),p=[];(0,a.YP)((()=>l.data),(e=>{t.value=e.map((e=>(p.length>0&&p.map((l=>{e.id==l.id&&(e.checked=!0)})),e)))}));const v=(0,i.iH)(null),m=()=>{p=[],t.value.map((e=>{e.checked&&(p.push(e),v.value||(v.value=e[l.optionalKey]))})),0==p.length&&(v.value=null),l.$emit("onCheck",p)},g=e=>{l.$emit("onClick",e)};return(l,p)=>{const h=n.XZ,f=o.JO;return(0,a.wg)(),(0,a.iD)("div",c,[(0,a._)("ul",null,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)((0,i.SU)(t),(l=>((0,a.wg)(),(0,a.iD)("li",{key:l.id},[e.isCheckbox?((0,a.wg)(),(0,a.iD)("div",u,[(0,a.Wm)(h,{modelValue:l.checked,"onUpdate:modelValue":e=>l.checked=e,"icon-size":"15px",shape:"square",onChange:m,disabled:!!v.value&&v.value!=l[e.optionalKey]},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(0,a.kq)("",!0),(0,a._)("div",{class:"center-content",style:{"line-height":"24px"},onClick:e=>g(l)},[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.config,(e=>((0,a.wg)(),(0,a.iD)("div",{key:e.prop},[(0,a._)("span",null,(0,s.zw)(e.label)+":",1),(0,a.Uk)((0,s.zw)(l[e.prop]),1)])))),128))],8,r),e.showMore?((0,a.wg)(),(0,a.iD)("div",{key:1,class:"more-box",onClick:e=>g(l)},[(0,a.Wm)(f,{name:"arrow"})],8,d)):(0,a.kq)("",!0)])))),128))])])}}};const v=p;var m=v},60296:function(e,l,t){t.r(l),t.d(l,{default:function(){return V}});var o=t(63005),n=(t(35708),t(79264)),a=(t(52196),t(13649)),i=(t(64165),t(39420)),s=(t(12097),t(57658),t(73396)),c=t(44870),u=t(87139),r=t(49242),d=(t(14071),t(22483)),p=t(51836);const v={class:"write"},m={class:"write-letters"},g={class:"chaosong-box"},h={class:"chaosong"},f=(0,s._)("div",{class:"label"},"收件人:",-1),k={style:{"border-bottom":"none"}},b={key:0,class:"chaosong-box"},w={class:"chaosong"},y=(0,s._)("div",{class:"label"},"抄送",-1),x={style:{"border-bottom":"none"}},_={key:1,class:"chaosong-box"},U={class:"chaosong"},C=(0,s._)("div",{class:"label"},"密送",-1),S={style:{"border-bottom":"none"}},I=(0,s._)("div",{class:"label"}," 发件人 ",-1),D={class:"center-text"},H=(0,s._)("div",{class:"right-box right-text more"},[(0,s._)("i",{class:"iconfont icon-iconm_xialan1"})],-1),W={class:"subject"},z=(0,s._)("div",{class:"label"},"主题",-1),K={class:"content"};var T={__name:"write",setup(e){(0,c.iH)(!1);const l=(0,d.yj)(),t=(0,s.FN)().proxy,T=((0,c.iH)(!1),(0,c.iH)([]),(0,c.iH)(!1)),A=()=>{t.$router.go(-1)};let V=(0,c.iH)({to:[],mailboxId:"",type:1,cc:[],bcc:[],replyTo:[],subject:null,content:"",fileList:[],toInput:null,ccInput:null,bccInput:null});const Y=(0,c.iH)(!1);let $=(0,c.iH)([]),B=(0,c.iH)({});const J=({selectedOptions:e})=>{Y.value=!1,B.value=e[0],V.value.mailboxId=e[0].id,V.value.type=e[0].type},j=()=>{t.post("/mailInfo/getUserEmailList",{id:(0,p.bG)().userId}).then((e=>{$.value=e.data.map((e=>({...e,text:e.receiveHost,value:e.id}))),e.data.length>0&&(B.value=e.data[0],V.value.mailboxId=e.data[0].id,V.value.type=e.data[0].type),console.log($)}))};j();const q=e=>{var l=/^([a-zA-Z\d])(\w|\-)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/;V.value[e+"Input"].search(l),0==V.value[e+"Input"].search(l)?(V.value[e].push({address:V.value[e+"Input"],personal:null}),V.value[e+"Input"]=null):V.value[e+"Input"]=null,console.log(V.value)};(0,c.iH)({});const L=()=>{console.log(V.value),t.post("/mailService/sendMail",{...V.value}).then((e=>{console.log(e),200==e.code?(t.$toast.success("发送成功"),t.$router.go(-1)):t.$toast.fail(e.msg)}))};return t.uploadDdRightBtn(L,"发送"),(0,s.bv)((()=>{console.log(l)})),(e,l)=>{const t=i.l2,d=a.JO,p=n.cW,j=o.GI;return(0,s.wg)(),(0,s.iD)("div",v,[(0,s.Wm)(t,{title:"写邮件","left-text":"","left-arrow":"",onClickLeft:A,"right-text":"发送",onClickRight:L}),(0,s._)("div",m,[(0,s._)("div",g,[(0,s._)("div",h,[f,(0,s._)("ul",k,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)((0,c.SU)(V).to,((e,l)=>((0,s.wg)(),(0,s.iD)("li",{key:e.address},[(0,s.Uk)((0,u.zw)(e.address)+" ",1),(0,s.Wm)(d,{onClick:e=>(0,c.SU)(V).to.splice(l,1),name:"cross"},null,8,["onClick"])])))),128)),(0,s.wy)((0,s._)("input",{placeholder:"请输入邮箱",onKeydown:l[0]||(l[0]=(0,r.D2)((e=>q("to")),["enter"])),type:"text","onUpdate:modelValue":l[1]||(l[1]=e=>(0,c.SU)(V).toInput=e)},null,544),[[r.nr,(0,c.SU)(V).toInput]])]),T.value?(0,s.kq)("",!0):((0,s.wg)(),(0,s.iD)("div",{key:0,class:"more",onClick:l[2]||(l[2]=e=>T.value=!0)}," 抄送/密送 "))])]),T.value?((0,s.wg)(),(0,s.iD)("div",b,[(0,s._)("div",w,[y,(0,s._)("ul",x,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)((0,c.SU)(V).cc,((e,l)=>((0,s.wg)(),(0,s.iD)("li",{key:e.address},[(0,s.Uk)((0,u.zw)(e.address)+" ",1),(0,s.Wm)(d,{onClick:e=>(0,c.SU)(V).to.splice(l,1),name:"cross"},null,8,["onClick"])])))),128)),(0,s.wy)((0,s._)("input",{placeholder:"请输入邮箱",onKeydown:l[3]||(l[3]=(0,r.D2)((e=>q("cc")),["enter"])),type:"text","onUpdate:modelValue":l[4]||(l[4]=e=>(0,c.SU)(V).ccInput=e)},null,544),[[r.nr,(0,c.SU)(V).ccInput]])])])])):(0,s.kq)("",!0),T.value?((0,s.wg)(),(0,s.iD)("div",_,[(0,s._)("div",U,[C,(0,s._)("ul",S,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)((0,c.SU)(V).bcc,((e,l)=>((0,s.wg)(),(0,s.iD)("li",{key:e.address},[(0,s.Uk)((0,u.zw)(e.address)+" ",1),(0,s.Wm)(d,{onClick:e=>(0,c.SU)(V).to.splice(l,1),name:"cross"},null,8,["onClick"])])))),128)),(0,s.wy)((0,s._)("input",{placeholder:"请输入邮箱",onKeydown:l[5]||(l[5]=(0,r.D2)((e=>q("bcc")),["enter"])),type:"text","onUpdate:modelValue":l[6]||(l[6]=e=>(0,c.SU)(V).bccInput=e)},null,544),[[r.nr,(0,c.SU)(V).bccInput]])])])])):(0,s.kq)("",!0)]),(0,s._)("div",{class:"sender",onClick:l[7]||(l[7]=e=>Y.value=!0)},[I,(0,s._)("div",D,(0,u.zw)((0,c.SU)(B).text||(0,c.SU)(B).receiveHost||"请选择邮箱"),1),H]),(0,s.Wm)(j,{show:Y.value,"onUpdate:show":l[9]||(l[9]=e=>Y.value=e),round:"",position:"bottom"},{default:(0,s.w5)((()=>[(0,s.Wm)(p,{columns:(0,c.SU)($),onCancel:l[8]||(l[8]=e=>Y.value=!1),onConfirm:J},null,8,["columns"])])),_:1},8,["show"]),(0,s._)("div",W,[z,(0,s.wy)((0,s._)("input",{placeholder:"请输入主题",type:"text","onUpdate:modelValue":l[10]||(l[10]=e=>(0,c.SU)(V).subject=e)},null,512),[[r.nr,(0,c.SU)(V).subject]])]),(0,s._)("div",K,[(0,s.wy)((0,s._)("textarea",{placeholder:"请输入正文",type:"text",rows:"4","onUpdate:modelValue":l[11]||(l[11]=e=>(0,c.SU)(V).content=e)},null,512),[[r.nr,(0,c.SU)(V).content]])])])}}};const A=T;var V=A},34373:function(e,l,t){t.d(l,{J:function(){return u}});var o=t(73396),n=t(253),a=t(44870),i=t(47936),s=t(10648);const c=(e,l)=>{const t=(0,a.iH)(),c=()=>{t.value=(0,n.EL)(e).height};return(0,o.bv)((()=>{if((0,o.Y3)(c),l)for(let e=1;e<=3;e++)setTimeout(c,100*e)})),(0,s.h)((()=>(0,o.Y3)(c))),(0,o.YP)([i.bn,i.uK],c),t};function u(e,l){const t=c(e,!0);return e=>(0,o.Wm)("div",{class:l("placeholder"),style:{height:t.value?`${t.value}px`:void 0}},[e()])}},64165:function(e,l,t){t(31958),t(20368),t(56742)},39420:function(e,l,t){t.d(l,{l2:function(){return h}});var o=t(11404),n=t(73396),a=t(44870),i=t(610),s=t(5323),c=t(96048),u=t(25322),r=t(34373),d=t(13649);const[p,v]=(0,i["do"])("nav-bar"),m={title:String,fixed:Boolean,zIndex:s.Or,border:s.J5,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:s.J5};var g=(0,n.aZ)({name:p,props:m,emits:["clickLeft","clickRight"],setup(e,{emit:l,slots:t}){const o=(0,a.iH)(),i=(0,r.J)(o,v),s=e=>l("clickLeft",e),p=e=>l("clickRight",e),m=()=>t.left?t.left():[e.leftArrow&&(0,n.Wm)(d.JO,{class:v("arrow"),name:"arrow-left"},null),e.leftText&&(0,n.Wm)("span",{class:v("text")},[e.leftText])],g=()=>t.right?t.right():(0,n.Wm)("span",{class:v("text")},[e.rightText]),h=()=>{const{title:l,fixed:a,border:i,zIndex:r}=e,d=(0,c.As)(r),h=e.leftArrow||e.leftText||t.left,f=e.rightText||t.right;return(0,n.Wm)("div",{ref:o,style:d,class:[v({fixed:a}),{[u.xe]:i,"van-safe-area-top":e.safeAreaInsetTop}]},[(0,n.Wm)("div",{class:v("content")},[h&&(0,n.Wm)("div",{class:[v("left"),e.clickable?u.e9:""],onClick:s},[m()]),(0,n.Wm)("div",{class:[v("title"),"van-ellipsis"]},[t.title?t.title():l]),f&&(0,n.Wm)("div",{class:[v("right"),e.clickable?u.e9:""],onClick:p},[g()])])])};return()=>e.fixed&&e.placeholder?i(h):h()}});const h=(0,o.n)(g)},12097:function(e,l,t){t(31958),t(20368),t(56742)}}]); //# sourceMappingURL=7023.b8b23bd4.js.map