You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.8KB

  1. import{c as w}from"./projectStore-30136ff6.js";import{N as g}from"./index-be0b3801.js";import{r as D,o as E,b as d,c as a,L as f,h as _,d as p,F as k,H as N,f as m,i as A,t as R,e as u,k as U}from"./index-dd5fae99.js";const j={key:0,class:"accessory text-primary flex items-center"},B=["onClick"],L=["onClick"],F={key:1},O=U({name:"trialRunInfo"}),H=Object.assign(O,{props:{detailData:Object},setup(y){const n=y,l=D([]),v=()=>{var o,e,s,i;l.value=[],(e=(o=n==null?void 0:n.detailData)==null?void 0:o.projectApplications)!=null&&e.filter(t=>t.relatedExistsApplicationCode||t.appCode).length&&((i=(s=n==null?void 0:n.detailData)==null?void 0:s.projectApplications)==null||i.filter(t=>t.relatedExistsApplicationCode||t.appCode).forEach(async t=>{const c=await w(t.relatedExistsApplicationCode||t.appCode);l.value.push({name:t.relatedExistsApplication||t.applicationName,ossUrl:c.data})}))},C=o=>{window.open(o,"_blank")},x=o=>{const e=document.createElement("a");e.style.display="none",e.href=o,e.download=n.fileName,document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(o)};return E(()=>{v()}),(o,e)=>{var c;const s=d("el-descriptions-item"),i=d("svg-icon"),t=d("el-descriptions");return(c=l.value)!=null&&c.length?(a(),f(t,{key:0,column:2,border:""},{default:_(()=>[(a(!0),p(k,null,N(l.value,(r,h)=>(a(),p(k,{key:h},[m(s,{label:"应用名称"},{default:_(()=>[A(R(r.name||"-"),1)]),_:2},1024),m(s,{label:"试运行报告"},{default:_(()=>[r.ossUrl?(a(),p("div",j,[u("span",{class:"cursor-pointer",onClick:b=>C(r.ossUrl)},"试运行报告.pdf",8,B),u("p",{class:"ml-24 flex items-center text-primary btn cursor-pointer",onClick:b=>x(r.ossUrl)},[m(i,{name:"down-icon",class:"mr-4 text-14"}),e[0]||(e[0]=u("span",null,"下载",-1))],8,L)])):(a(),p("span",F,"-"))]),_:2},1024)],64))),128))]),_:1})):(a(),f(g,{key:1}))}}});export{H as default};