FollowDrawer-BW_hq0a1.js 3.6 KB

12
  1. import"./index-DhAFbYq5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{f as e}from"./followApi-PF_HaAUe.js";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 m,ad as _,ae as u,S as h,X as f,aw as g,Y as w,W as x,aj as y}from"./vendor-De54JrsT.js";import{_ as v}from"./_plugin-vue_export-helper-BCo6x5W8.js";const j={style:{"font-weight":"400",color:"#f59a23"}},b={style:{"background-color":"#f59a23",color:"white",padding:"2px 5px"}},k={style:{top:"13px",left:"10px",position:"relative"}},A=v(t({__name:"FollowDrawer",props:{type:{},first_id:{},second_id:{},uid:{}},setup(t){const v=t,A=a([]);return l((()=>[v.type,v.first_id,v.second_id,v.uid]),(()=>{return t=this,a=null,l=function*(){A.splice(0,A.length),(0,{school:e.schoolAll,canteen:e.canteenAll,company:e.companyAll}[v.type])(v.first_id,v.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=A.findIndex((e=>e.date===l));-1===s?A.push({date:l,color:`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`,list:[a]}):A[s].list.push(a)}})(e))).catch((e=>{}))},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,v=y,I=c,L=_;return o(A).length?(i(!0),s(n,{key:0},p(o(A),((e,o)=>(i(),r(I,{shadow:"never",key:o,style:{"margin-bottom":"10px"}},{header:d((()=>[h("span",j,w(e.date.replaceAll("-"," / ")),1)])),default:d((()=>[(i(!0),s(n,null,p(e.list,((o,c)=>(i(),r(I,{shadow:"never",key:c,style:{"margin-bottom":"5px"},class:"follow-div"},{default:d((()=>[m(L,null,{default:d((()=>[m(l,{sm:3,xs:0},{default:d((()=>[m(a,{style:{"background-color":"#f59a23",color:"white","margin-bottom":"10px"}},{default:d((()=>[f(w(parseInt(e.date.split("-")[2]))+"日 ",1)])),_:2},1024),t[0]||(t[0]=h("br",null,null,-1)),f(" "+w(o.create_date.split(" ")[1]),1)])),_:2,__:[0]},1024),m(l,{sm:21,xs:24},{default:d((()=>[m(L,null,{default:d((()=>[m(l,{sm:0,xs:24},{default:d((()=>[h("span",b,w(o.create_date.split(" ")[1]),1)])),_:2},1024),m(a,{src:o.avatar||"https://img.lewaimai.com/zqcrm/avatar/20250926/9PLsci1dwXLcb8Iw.jpg"},null,8,["src"]),t[5]||(t[5]=f()),h("span",k,w(o.user_name),1),m(l,{span:24},{default:d((()=>[t[1]||(t[1]=h("label",null,"关系人:",-1)),t[2]||(t[2]=f()),h("span",null,w(o.second_name),1)])),_:2,__:[1,2]},1024),o.chat_imgs.length?(i(),r(l,{key:0,span:24},{default:d((()=>[t[3]||(t[3]=h("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(v,{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)):x("",!0)])),_:2,__:[3]},1024)):x("",!0),m(l,{sm:2},{default:d((()=>t[4]||(t[4]=[h("label",null,"详情:",-1)]))),_:1,__:[4]}),m(l,{sm:22},{default:d((()=>[m(I,{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(I,{key:1},{header:d((()=>t[6]||(t[6]=[h("span",{style:{"font-weight":"400",color:"#f59a23"}},"暂无数据或权限",-1)]))),_:1}))}}}),[["__scopeId","data-v-27d52c8b"]]);export{A as _};