import{aS as e,$ as s,aU as a,e as t,aV as l,aW as i,aX as n,q as o,c as r,w as u,i as f,o as c,t as m,v as d,x as p,A as h,C as _,D as b,F as x,H as g}from"./index-DL8B2Mxu.js";import{_ as U}from"./mp-html.BLGMDPJW.js";import{r as L}from"./uni-app.es.BSVEa1f2.js";import{_ as v}from"./u-icon.CLOPtL2B.js";import{_ as j}from"./_plugin-vue_export-helper.BCo6x5W8.js";const w=["png","jpg","jpeg","bmp","gif"];const y=j({data:()=>({info:{},fileList:[]}),computed:{baseURL(){return this.define.baseURL}},onLoad(e){this.initDetail(e.id)},methods:{initDetail(a){e(a).then((e=>{this.info=e.data,this.fileList=JSON.parse(this.info.files),s("initUnReadMsgNum")}))},previewImage(e){if(!e.url)return;const s=this.baseURL+e.url;a({urls:[s],current:s,success:()=>{},fail:()=>{t({title:"预览图片失败",icon:"none"})}})},openFile(e){if(e.fileExtension&&w.includes(e.fileExtension))return this.previewImage(e);l("annex",e.fileId).then((s=>{window.location.href=this.baseURL+s.data.url+"&name="+e.name}))},previewFile(e){let s=e.url;i({url:this.baseURL+s,success:e=>{var s=e.tempFilePath;n({filePath:encodeURI(s),success:e=>{console.log("打开文档成功")}})}})}}},[["render",function(e,s,a,t,l,i){const n=g,j=f,w=L(o("mp-html"),U),y=L(o("u-icon"),v);return c(),r(j,{class:"messageDetail-v u-p-l-20 u-p-r-20"},{default:u((()=>[m(j,{class:"u-flex-col u-border-bottom u-p-b-40 u-m-b-40"},{default:u((()=>[m(n,{class:"u-m-b-16 u-font-32 txt"},{default:u((()=>[d(p(l.info.title),1)])),_:1}),m(j,null,{default:u((()=>[m(n,{class:"releaseUser u-font-24"},{default:u((()=>[d(p(l.info.releaseUser),1)])),_:1}),m(n,{class:"releaseUser u-font-24 u-m-l-16"},{default:u((()=>[d(p(l.info.releaseTime?e.$u.timeFormat(l.info.releaseTime,"yyyy-mm-dd hh:MM:ss"):""),1)])),_:1})])),_:1})])),_:1}),l.info.excerpt?(c(),r(j,{key:0,class:"u-p-b-16 excerpt"},{default:u((()=>[d(p(l.info.excerpt),1)])),_:1})):h("",!0),m(j,{class:"messageDetail-content u-p-b-20"},{default:u((()=>[m(w,{content:l.info.bodyText},null,8,["content"])])),_:1}),m(j,{class:"file-box"},{default:u((()=>[(c(!0),_(x,null,b(l.fileList,((e,s)=>(c(),r(j,{class:"file-list u-flex",key:s},{default:u((()=>[m(j,{class:"file-list-l"},{default:u((()=>[m(y,{name:"attach",color:"#969799"}),m(n,{class:"fileName"},{default:u((()=>[d(p(e.name),1)])),_:2},1024)])),_:2},1024),m(y,{name:"download",color:"#969799",onClick:s=>i.openFile(e)},null,8,["onClick"])])),_:2},1024)))),128))])),_:1})])),_:1})}],["__scopeId","data-v-83f5805e"]]);export{y as default};
