FollowDrawer-DOAAdzus.js 3.2 KB

12
  1. import"./index-CMRBJjvD.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{f as e}from"./followApi-BGlfMBwY.js";import{j as a,N as t,w as l,Q as s,D as r,u as o,G as n,F as i,a0 as p,H as d,ai as c,v as _,ad as u,ae as m,S as f,X as h,aw as g,Y as y,W as v,aj as w,E as x}from"./vendor-C0fQtjEp.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"}},A=j(a({__name:"FollowDrawer",props:{type:{},first_id:{},second_id:{},uid:{}},setup(a){const j=a,A=t([]);return l((()=>[j.type,j.first_id,j.second_id,j.uid]),(()=>{return a=this,t=null,l=function*(){A.splice(0,A.length),(0,{school:e.schoolAll,canteen:e.canteenAll,company:e.companyAll}[j.type])(j.first_id,j.second_id).then((e=>(e=>{if(0!=e.length)for(let a=0;a<e.length;a++){const t=e[a],l=t.create_date.split(" ")[0],s=A.findIndex((e=>e.date===l));-1===s?A.push({date:l,color:`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`,list:[t]}):A[s].list.push(t)}})(e))).catch((e=>{x.error("获取数据失败")}))},new Promise(((e,s)=>{var r=e=>{try{n(l.next(e))}catch(a){s(a)}},o=e=>{try{n(l.throw(e))}catch(a){s(a)}},n=a=>a.done?e(a.value):Promise.resolve(a.value).then(r,o);n((l=l.apply(a,t)).next())}));var a,t,l}),{immediate:!0}),(e,a)=>{const t=g,l=m,x=w,j=c,I=u;return o(A).length?(n(!0),s(i,{key:0},p(o(A),((e,o)=>(n(),r(j,{shadow:"never",key:o,style:{"margin-bottom":"10px"}},{header:d((()=>[f("span",b,y(e.date.replaceAll("-"," / ")),1)])),default:d((()=>[(n(!0),s(i,null,p(e.list,((s,o)=>(n(),r(j,{shadow:"never",key:o,style:{"margin-bottom":"5px"},class:"follow-div"},{default:d((()=>[_(I,null,{default:d((()=>[_(l,{span:3},{default:d((()=>[_(t,{style:{"background-color":"#f59a23",color:"white","margin-bottom":"10px"}},{default:d((()=>[h(y(parseInt(e.date.split("-")[2]))+"日 ",1)])),_:2},1024),a[0]||(a[0]=f("br",null,null,-1)),h(" "+y(s.create_date.split(" ")[1]),1)])),_:2,__:[0]},1024),_(l,{span:21},{default:d((()=>[_(I,null,{default:d((()=>[_(t,{src:s.avatar},null,8,["src"]),a[5]||(a[5]=h()),f("span",k,y(s.user_name),1),_(l,{span:24},{default:d((()=>[a[1]||(a[1]=f("label",null,"关系人:",-1)),a[2]||(a[2]=h()),f("span",null,y(s.second_name),1)])),_:2,__:[1,2]},1024),_(l,{span:24},{default:d((()=>[a[3]||(a[3]=f("label",{style:{position:"relative",top:"-10px"}},"聊天记录:",-1)),s.chat_imgs.length?(n(),r(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"])):v("",!0)])),_:2,__:[3]},1024),_(l,{sm:2},{default:d((()=>a[4]||(a[4]=[f("label",null,"详情:",-1)]))),_:1,__:[4]}),_(l,{sm:22},{default:d((()=>[_(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)):(n(),r(j,{key:1},{header:d((()=>a[6]||(a[6]=[f("span",{style:{"font-weight":"400",color:"#f59a23"}},"暂无数据",-1)]))),_:1}))}}}),[["__scopeId","data-v-e431da2d"]]);export{A as _};