PageSourceSearch

https://www.medalo.ai/js/PopNotice.cR4jWwmB.js

js medalo.ai collected 2026-10-05 12:16:19 UTC 6,860 bytes, 1 lines download raw bytes

1import{p as b,_ as y}from"./postImageFit.JOhy3yhf.js";import w from"./Paging.Codo259r.js";import{i as x}from"./personaWorkflow.NMqIlIKg.js";import{_ as S}from"./index.VRUltArI.js";import{e as C}from"./vendor-vuetify.Dvtop9lb.js";import{c as r,D as I,z as i,B as f,g as F,j as v,s as g,F as k,l as N,W as L,Q as P,b as l}from"./vendor-vue.DQyCMu5a.js";import{b3 as p}from"./vendor-misc.DlM92jT6.js";const z="/images/notice.png",D={name:"NoticePopup",components:{Paging:w,NoticeContent:y},directives:{postImageFit:b},props:{initialIdx:{type:Number,default:null}},emits:["closePopup"],data(){return{list:[],selectedNotice:null,totalCnt:0,pageNo:1,pageSize:5}},mounted(){this.getNoticeList(),this.initialIdx&&this.viewDetail(this.initialIdx)},methods:{closePopup(){this.$emit("closePopup","notice")},stripHtml(e){if(!e)return"";const t=document.createElement("div");t.innerHTML=e;const n=(t.textContent||t.innerText||"").trim();return n.length>100?n.substring(0,100)+"...":n},getNoticeList(){const e=this.$__GET_USER_INFO,t=e?e.groupIdx:null,n={page:this.pageNo,blockPage:this.pageSize,groupIdx:t},a={success:o=>{o.code==="S"&&(this.list=o.list||[],this.totalCnt=o.totalCnt||0)},error:o=>{console.log("notice-list-error:",o),x(o)&&this.closePopup()}};this.$api.chat.getNoticeList(n,a)},formatDateTime(e){if(!e)return"";try{const t=new Date(e);if(isNaN(t.getTime())){if(e.includes("T")){const u=e.split("T")[1].split(".")[0];return`${e.split("T")[0]} ${u}`}const d=e.split(" ");if(d.length>=2){const c=d[1].split(".")[0];return`${d[0]} ${c}`}return e.split(" ")[0]}const n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),m=String(t.getMinutes()).padStart(2,"0"),_=String(t.getSeconds()).padStart(2,"0");return`${n}-${a}-${o} ${s}:${m}:${_}`}catch(t){if(console.error("날짜 포맷팅 오류:",t),e.includes("T")){const a=e.split("T")[1].split(".")[0];return`${e.split("T")[0]} ${a}`}return e}},onActivePage(e){this.pageNo=e,this.getNoticeList()},viewDetail(e){const t=this.$__GET_USER_INFO,n=t?t.groupIdx:null,a={noticeIdx:e,groupIdx:n},o={success:s=>{s.code==="S"&&s.notice?this.selectedNotice=s.notice:alert(s.message||"공지사항을 불러올 수 없습니다.")},error:s=>{console.log("notice-detail-error:",s),alert("공지사항을 불러올 수 없습니다.")}};this.$api.chat.getNoticeDetail(a,o)},backToList(){this.selectedNotice=null},onContentLinkClick(e){const t=e.target&&e.target.closest?e.target.closest("a"):null;if(!t||!t.getAttribute("href"))return;let n;try{n=new URL(t.href,window.location.origin)}catch{return}n.origin===window.location.origin?(e.preventDefault(),window.location.href=n.href):(t.setAttribute("target","_blank"),t.setAttribute("rel","noopener noreferrer"))},formatFileSize(e){if(!e||e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+n[a]},getFileIcon(e){if(!e)return"📄";const t=e.split(".").pop().toLowerCase();return{pdf:"📕",doc:"📘",docx:"📘",xls:"📗",xlsx:"📗",ppt:"📙",pptx:"📙",zip:"🗜️",rar:"🗜️","7z":"🗜️",jpg:"🖼️",jpeg:"🖼️",png:"🖼️",gif:"🖼️",webp:"🖼️",mp3:"🎵",wav:"🎵",mp4:"🎬",avi:"🎬",mov:"🎬",txt:"📝",hwp:"📄"}[t]||"📄"},downloadFile(e){if(!e||!e.fileIdx){alert("파일 정보를 찾을 수 없습니다.");return}const t={success:n=>{const a=new Blob([n],{type:"application/octet-stream"}),o=window.URL.createObjectURL(a),s=document.createElement("a");s.href=o,s.download=e.originalFileName||"download",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(o)},error:n=>{console.error("파일 다운로드 오류:",n),alert("파일 다운로드에 실패했습니다.")}};this.$api.chat.downloadNoticeFile(e.fileIdx,t)}}},O={class:"popup-wrap"},T={class:"popup video",role:"dialog","aria-modal":"true"},B={class:"pop-head"},M={class:"pop-body"},A={key:0,class:"popup-list"},E={key:0},j={class:"item-header"},R={class:"item-title"},U={class:"item-times"},H={key:0,class:"item-summary"},V={class:"item-actions"},G=["onClick"],K={key:1,class:"popup-item"}
1,Q={key:1,class:"detail-view","data-post-image-scroll":""},W={class:"detail-header"},Y={class:"detail-title"},$={class:"item-times"},q={key:1,class:"file-attach-section"},J={class:"file-attach-title"},X={class:"file-attach-list"},Z=["onClick"],tt={class:"file-type-icon"},et={class:"file-name"},ot={class:"file-size"},st={class:"item-actions"};function it(e,t,n,a,o,s){const m=L("paging"),_=y,d=P("post-image-fit");return l(),r("div",O,[I((l(),r("div",T,[i("div",B,[t[2]||(t[2]=i("span",{class:"title"},[i("img",{src:z,alt:"titleIcon"}),f("공지사항")],-1)),i("button",{type:"button",class:"popup-close",onClick:t[0]||(t[0]=c=>s.closePopup())},[F(C,{icon:"mdi:mdi-close"})])]),i("div",M,[o.selectedNotice?(l(),r("div",Q,[i("div",W,[i("h4",Y,p(o.selectedNotice.title),1),i("span",$,p(s.formatDateTime(o.selectedNotice.createdAt)),1)]),o.selectedNotice.content?(l(),v(_,{key:0,class:"detail-summary","data-post-image-content":"",html:o.selectedNotice.content,onLinkClick:s.onContentLinkClick},null,8,["html","onLinkClick"])):g("",!0),o.selectedNotice.files&&o.selectedNotice.files.length>0?(l(),r("div",q,[i("div",J,[t[4]||(t[4]=i("span",{class:"file-icon"},"📎",-1)),f(" 첨부파일 ("+p(o.selectedNotice.files.length)+") ",1)]),i("div",X,[(l(!0),r(k,null,N(o.selectedNotice.files,(c,u)=>(l(),r("div",{key:u,class:"file-item",onClick:h=>s.downloadFile(c)},[i("span",tt,p(s.getFileIcon(c.originalFileName)),1),i("span",et,p(c.originalFileName),1),i("span",ot,"("+p(s.formatFileSize(c.fileSize))+")",1),t[5]||(t[5]=i("span",{class:"download-icon"},"⬇️",-1))],8,Z))),128))])])):g("",!0),i("div",st,[i("button",{type:"button",class:"btn-back",onClick:t[1]||(t[1]=c=>s.backToList())},"목록으로")])])):(l(),r("div",A,[o.list.length>0?(l(),r("div",E,[(l(!0),r(k,null,N(o.list,(c,u)=>(l(),r("div",{key:u,class:"popup-item",translate:"yes"},[i("div",j,[i("h4",R,p(c.title),1),i("span",U,p(s.formatDateTime(c.createdAt)),1)]),s.stripHtml(c.content)?(l(),r("p",H,p(s.stripHtml(c.content)),1)):g("",!0),i("div",V,[i("button",{type:"button",class:"btn-link",onClick:h=>s.viewDetail(c.noticeIdx)},"상세보기",8,G)])]))),128))])):(l(),r("div",K,t[3]||(t[3]=[i("p",{class:"item-summary"},"공지사항이 없습니다.",-1)]))),o.totalCnt>0?(l(),v(m,{key:2,"cur-page-no":o.pageNo,"total-cnt":o.totalCnt,"page-size":o.pageSize,onActivePage:s.onActivePage,class:"mt-4"},null,8,["cur-page-no","total-cnt","page-size","onActivePage"])):g("",!0)]))])])),[[d]])])}const nt=S(D,[["render",it],["__scopeId","data-v-b35da561"]]),gt=Object.freeze(Object.defineProperty({__proto__:null,default:nt},Symbol.toStringTag,{value:"Module"}));export{nt as P,z as _,gt as a};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.