FollowDrawer-BmdHiFV6.js 3.6 KB

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