var x=(_,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 w,d as b,r as D,o as N,c as f,e as l,I as h,j as k,f as d,F as C,J as R,i as v,k as E,t as U,g as y}from"./index.2939355b.js";import{c as A}from"./projectStore.3fb3992c.js";import{N as I}from"./index.ead19467.js";const B={key:0,class:"accessory text-primary flex items-center"},F=["onClick"],L=["onClick"],M=y("span",null,"\u4E0B\u8F7D",-1),O={key:1},S=b({name:"trialRunInfo"}),V=Object.assign(S,{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=>x(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(),h(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",B,[y("span",{class:"cursor-pointer",onClick:j=>r(p.ossUrl)},"\u8BD5\u8FD0\u884C\u62A5\u544A.pdf",8,F),y("p",{class:"ml-24 flex items-center text-primary btn cursor-pointer",onClick:j=>u(p.ossUrl)},[v(c,{name:"down-icon",class:"mr-4 text-14"}),M],8,L)])):(l(),d("span",O,"-"))]),_:2},1024)],64))),128))]),_:1})):(l(),h(I,{key:1}))}}}),P=w(V,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/projectStoreManage/projectStore/projectDetail/components/trialRunInfo.vue"]]);export{P as default};
