FollowDrawer-CwtcdPnN.js 3.0 KB

12
  1. import"./index-CT1qRCFx.js";/* empty css *//* empty css *//* empty css */import{f as e}from"./followApi-PERq4OFE.js";/* empty css *//* empty css */import{j as t,N as a,w as l,Q as s,G as r,F as o,a0 as n,D as i,H as p,aR as d,v as _,ad as c,ac as u,S as f,X as m,ap as h,Y as v,W as g,aS as w,u as y,E as x}from"./vendor-D0p0RnNT.js";import{_ as j}from"./_plugin-vue_export-helper-BCo6x5W8.js";const b={style:{"font-weight":"400",color:"#f59a23"}},k={style:{top:"13px",left:"10px",position:"relative"}},H=j(t({__name:"FollowDrawer",props:{type:{},first_id:{},second_id:{}},setup(t){const j=t,H=a([]);return l((()=>[j.type,j.first_id,j.second_id]),(()=>{return t=this,a=null,l=function*(){H.splice(0,H.length),e.schoolAll(j.first_id,j.second_id).then((e=>(e=>{if(0!=e.length)for(let t=0;t<e.length;t++){const a=e[t],l=a.create_date.split(" ")[0],s=H.findIndex((e=>e.date===l));-1===s?H.push({date:l,color:`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`,list:[a]}):H[s].list.push(a)}})(e))).catch((e=>{x.error("获取数据失败")}))},new Promise(((e,s)=>{var r=e=>{try{n(l.next(e))}catch(t){s(t)}},o=e=>{try{n(l.throw(e))}catch(t){s(t)}},n=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,o);n((l=l.apply(t,a)).next())}));var t,a,l}),{immediate:!0}),(e,t)=>{const a=h,l=u,x=w,j=d,M=c;return r(!0),s(o,null,n(y(H),((e,d)=>(r(),i(j,{shadow:"never",key:d,style:{"margin-bottom":"10px"}},{header:p((()=>[f("span",b,v(e.date.replaceAll("-"," / ")),1)])),default:p((()=>[(r(!0),s(o,null,n(e.list,((s,o)=>(r(),i(j,{shadow:"never",key:o,style:{"margin-bottom":"5px"},class:"follow-div"},{default:p((()=>[_(M,null,{default:p((()=>[_(l,{span:3},{default:p((()=>[_(a,{style:{"background-color":"#f59a23",color:"white","margin-bottom":"10px"}},{default:p((()=>[m(v(parseInt(e.date.split("-")[2]))+"日 ",1)])),_:2},1024),t[0]||(t[0]=f("br",null,null,-1)),m(" "+v(s.create_date.split(" ")[1]),1)])),_:2,__:[0]},1024),_(l,{span:21},{default:p((()=>[_(M,null,{default:p((()=>[_(a,{src:s.avatar},null,8,["src"]),t[5]||(t[5]=m()),f("span",k,v(s.user_name),1),_(l,{span:24},{default:p((()=>[t[1]||(t[1]=f("label",null,"关系人:",-1)),t[2]||(t[2]=m()),f("span",null,v(s.second_name),1)])),_:2,__:[1,2]},1024),_(l,{span:24},{default:p((()=>[t[3]||(t[3]=f("label",{style:{position:"relative",top:"-10px"}},"聊天记录:",-1)),s.chat_imgs.length?(r(),i(x,{key:0,ref_for:!0,ref:"imageRef",style:{width:"30px",height:"30px"},src:s.chat_imgs[0],"show-progress":"","preview-src-list":s.chat_imgs,fit:"cover"},null,8,["src","preview-src-list"])):g("",!0)])),_:2,__:[3]},1024),_(l,{sm:2},{default:p((()=>t[4]||(t[4]=[f("label",null,"详情:",-1)]))),_:1,__:[4]}),_(l,{sm:22},{default:p((()=>[_(j,{shadow:"never",innerHTML:s.detail,style:{padding:"10px","max-height":"200px","overflow-y":"scroll"}},null,8,["innerHTML"])])),_:2},1024)])),_:2,__:[5]},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024)))),128)}}}),[["__scopeId","data-v-f1c75f4c"]]);export{H as _};