var g=(w,b,e)=>new Promise((p,_)=>{var k=t=>{try{f(e.next(t))}catch(d){_(d)}},m=t=>{try{f(e.throw(t))}catch(d){_(d)}},f=t=>t.done?p(t.value):Promise.resolve(t.value).then(k,m);f((e=e.apply(w,b)).next())});import{_ as V}from"./project-info.vue_vue_type_script_setup_true_name_projectInfo_lang-930f13b6.js";import{d as I,p as A}from"./index-1ef73356.js";import{d as F,r as N,j as v,l as H,o as a,c as y,g as L,F as j,b as c,t as s,e as n,w as l,k as i,i as o,h as u,v as O,N as $}from"./index-90c78f99.js";import{h as z}from"./htmlToPdf-c96e92b6.js";import S from"./export-html-fb5d0e5a.js";const q={class:"relative"},G={class:"detail orange"},J={class:"app-info mb-16"},K={class:"flex justify-between items-center mb-16"},M={class:"tit"},Q={key:0,class:"mb-16",style:{"line-height":"2"}},R={class:"descriptions"},U=c("div",{class:"card-tit mb-16"},"项目状态",-1),W={class:"px-80"},X={id:"my-export",style:{"z-index":"-1",display:"none"},class:"opacity-0 absolute left-[0] top-[0px]"},se=F({__name:"detail",setup(w,{expose:b}){const e=N(),p=N(!1),_=N(),k=t=>g(this,null,function*(){if(t){p.value=!0;const d=yield I(t);e.value=d.data,p.value=!1;const x=yield A(t);_.value=x.data}else e.value=void 0}),m=[{name:"评审中",value:"评审中"},{name:"待立项",value:"待立项"},{name:"已立项",value:"已立项"},{name:"已采购",value:"已采购"},{name:"已初验",value:"已初验"},{name:"已终验",value:"已终验"}],f=()=>g(this,null,function*(){const t=document.getElementById("my-export");t.style.display="block",setTimeout(()=>{z(".exportHtml",`${e.value&&e.value.projectName}-项目及应用报告`,"p"),setTimeout(()=>{t.style.display="none"})})});return b({getDetail:k}),(t,d)=>{const x=v("el-button"),r=v("el-descriptions-item"),D=v("el-descriptions"),C=v("el-step"),T=v("el-steps"),B=v("el-card"),E=H("loading");return a(),y("div",q,[L((a(),y("div",G,[e.value?(a(),y(j,{key:0},[c("div",J,[c("div",K,[c("p",M,s(e.value&&e.value.projectName),1),n(x,{type:"primary",onClick:f},{default:l(()=>[i("导出")]),_:1})]),e.value&&e.value.description?(a(),y("div",Q,s(e.value&&e.value.description),1)):o("",!0),c("div",R,[n(D,{column:2},{default:l(()=>[e.value&&e.value.projectCode?(a(),u(r,{key:0,label:"项目ID："},{default:l(()=>[i(s(e.value&&e.value.projectCode||"-"),1)]),_:1})):o("",!0),e.value&&e.value.approvedAmount?(a(),u(r,{key:1,label:"项目金额："},{default:l(()=>[i(s(e.value&&e.value.approvedAmount||"-")+"万元",1)]),_:1})):o("",!0),e.value&&e.value.projectType?(a(),u(r,{key:2,label:"项目类型："},{default:l(()=>[i(s(e.value&&e.value.projectType===1?"新建":"运维"),1)]),_:1})):o("",!0),e.value&&e.value.buildOrgName?(a(),u(r,{key:3,label:"建设部门："},{default:l(()=>[i(s(e.value&&e.value.buildOrgName||"-"),1)]),_:1})):o("",!0),e.value&&e.value.contactName?(a(),u(r,{key:4,label:"项目联系人："},{default:l(()=>[i(s(e.value&&e.value.contactName||"-"),1)]),_:1})):o("",!0),e.value&&e.value.contactPhone?(a(),u(r,{key:5,label:"项目联系人联系方式："},{default:l(()=>[i(s(e.value&&e.value.contactPhone||"-"),1)]),_:1})):o("",!0)]),_:1})])]),n(B,{class:"my-card mb-16 min-y-padding",shadow:"never"},{default:l(()=>[U,c("div",W,[n(T,{class:"w-full custom-steps",active:e.value.status==="3"?"1":m&&m.findIndex(h=>h.value===e.value.status),"finish-status":"success"},{default:l(()=>[(a(),y(j,null,O(m,(h,P)=>n(C,{key:P,title:h.name,status:e.value.status==="3"&&h.name==="待立项"?"error":""},null,8,["title","status"])),64))]),_:1},8,["active"])])]),_:1}),n(V,{"detail-data":e.value},null,8,["detail-data"])],64)):(a(),u($,{key:1}))])),[[E,p.value]]),o("",!0),c("div",X,[n(S,{"detail-data":_.value},null,8,["detail-data"])])])}}});export{se as _};
