import{d as b,r as w,a as _,b as y,e as l,i as e,w as r,u as t,z as v,G as x,h as g,o as k,f as p,H as n,I as C}from"./index-Ua38_nuB.js";const j={style:{"background-color":"#d2d2fa",height:"100vh",display:"grid","place-items":"center"}},V={style:{"background-color":"#fff",width:"90%",height:"80%","border-radius":"10px",padding:"20px",overflow:"auto"}},B={style:{display:"flex","justify-content":"space-between","align-items":"center"}},E=l("div",{style:{"font-size":"20px","font-weight":"bold"}},"微信信息（已经登录）",-1),S={style:{display:"flex","justify-content":"space-between","align-items":"center"}},T={style:{"margin-top":"20px"}},O=b({__name:"WxinfoView",setup(D){const c=w([]),d=async()=>{try{c.value=await v.post("/api/ls/wxinfo")}catch(o){return console.error("Error fetching data:",o),[]}};_(d);const h=async()=>{await d()},u=()=>{const o=f(c.value);m(o,"wxinfo_data.csv")},f=o=>{const i=Object.keys(o[0]).join(","),a=o.map(s=>Object.values(s).join(","));return`${i}
${a.join(`
`)}`},m=(o,i)=>{const a=new Blob([new Uint8Array([239,187,191]),o],{type:"text/csv;charset=utf-8;"}),s=document.createElement("a");navigator.msSaveBlob?navigator.msSaveBlob(a,i):(s.href=URL.createObjectURL(a),s.setAttribute("download",i),document.body.appendChild(s),s.click(),document.body.removeChild(s)),x.success({title:"Success",message:"CSV file exported successfully!"})};return(o,i)=>{const a=g("el-button");return k(),y("div",j,[l("div",V,[l("div",B,[E,l("div",S,[e(a,{style:{"margin-right":"10px"},onClick:h},{default:r(()=>[p("刷新")]),_:1}),e(a,{style:{"margin-right":"10px"},onClick:u},{default:r(()=>[p("导出")]),_:1})])]),l("div",T,[e(t(C),{data:c.value,style:{width:"100%"}},{default:r(()=>[e(t(n),{"min-width":30,prop:"pid",label:"进程id"}),e(t(n),{"min-width":40,prop:"version",label:"微信版本"}),e(t(n),{"min-width":40,prop:"account",label:"账号"}),e(t(n),{"min-width":45,prop:"mobile",label:"手机号"}),e(t(n),{"min-width":40,prop:"nickname",label:"昵称"}),e(t(n),{"min-width":30,prop:"mail",label:"邮箱"}),e(t(n),{"min-width":50,prop:"wxid",label:"微信原始id"}),e(t(n),{prop:"wx_dir",label:"微信文件夹路径"}),e(t(n),{prop:"key",label:"密钥(key)"})]),_:1},8,["data"])])])])}}});export{O as default};
