var h=(_,s,a)=>new Promise((m,r)=>{var u=t=>{try{e(a.next(t))}catch(c){r(c)}},n=t=>{try{e(a.throw(t))}catch(c){r(c)}},e=t=>t.done?m(t.value):Promise.resolve(t.value).then(u,n);e((a=a.apply(_,s)).next())});import{_ as b,d as j,r as D,o as N,f,g as l,K as x,m as k,h as d,G as C,L as R,l as v,p as E,t as U,i as y}from"./index.9fabe127.js";import{c as A}from"./projectStore.83309806.js";import{N as B}from"./index.18a3894b.js";const I={key:0,class:"accessory text-primary flex items-center"},L=["onClick"],M=["onClick"],O=y("span",null,"\u4E0B\u8F7D",-1),S={key:1},V=j({name:"trialRunInfo"}),F=Object.assign(V,{props:{detailData:Object},setup(_){const s=_,a=D([]),m=()=>{var n,e,t,c;a.value=[],(e=(n=s==null?void 0:s.detailData)==null?void 0:n.projectApplications)!=null&&e.filter(o=>o.relatedExistsApplicationCode||o.appCode).length&&((c=(t=s==null?void 0:s.detailData)==null?void 0:t.projectApplications)==null||c.filter(o=>o.relatedExistsApplicationCode||o.appCode).forEach(o=>h(this,null,function*(){const i=yield A(o.relatedExistsApplicationCode||o.appCode);a.value.push({name:o.relatedExistsApplication||o.applicationName,ossUrl:i.data})})))},r=n=>{window.open(n,"_blank")},u=n=>{const e=document.createElement("a");e.style.display="none",e.href=n,e.download=s.fileName,document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(n)};return N(()=>{m()}),(n,e)=>{var i;const t=f("el-descriptions-item"),c=f("svg-icon"),o=f("el-descriptions");return(i=a.value)!=null&&i.length?(l(),x(o,{key:0,column:2,border:""},{default:k(()=>[(l(!0),d(C,null,R(a.value,(p,g)=>(l(),d(C,{key:g},[v(t,{label:"\u5E94\u7528\u540D\u79F0"},{default:k(()=>[E(U(p.name||"-"),1)]),_:2},1024),v(t,{label:"\u8BD5\u8FD0\u884C\u62A5\u544A"},{default:k(()=>[p.ossUrl?(l(),d("div",I,[y("span",{class:"cursor-pointer",onClick:w=>r(p.ossUrl)},"\u8BD5\u8FD0\u884C\u62A5\u544A.pdf",8,L),y("p",{class:"ml-24 flex items-center text-primary btn cursor-pointer",onClick:w=>u(p.ossUrl)},[v(c,{name:"down-icon",class:"mr-4 text-14"}),O],8,M)])):(l(),d("span",S,"-"))]),_:2},1024)],64))),128))]),_:1})):(l(),x(B,{key:1}))}}}),J=b(F,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/projectStoreManage/projectStore/projectDetail/components/trialRunInfo.vue"]]);export{J as default};
