No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1
  1. import{N as H}from"./index.0c2b3f6e.js";import{s as V,_ as M,d as J,b as O,r as g,o as K,c as n,e as s,f as r,h as a,i as l,g as i,j as k,G as N,F as j,H as Q,t as z,q as W}from"./index.88314652.js";const X=p=>V.get("/api/v1/file-manage/project-file/list",{params:p}),Y=p=>V.post(`/api/v1/file-manage/project-file/want-read/${p}`),Z=p=>V.post(`/api/v1/file-manage/project-file/download/${p}`,void 0,{responseType:"blob"});const ee={class:"flex"},te={class:"card-list-item"},ae=["onClick"],le={key:1,class:"mb-8"},oe={class:"info"},se={class:"value"},ne={class:"flex justify-between"},re={key:1},ie={class:"text-center"},de={key:0,class:"text-success"},ue={key:1,class:"text-danger"},ce={key:2},pe=J({name:"projectArchives"}),me=Object.assign(pe,{setup(p){const{proxy:S}=W(),c=O({projectName:"",buildOrgName:""}),x=g([]),d=O({pageNumber:1,pageSize:10}),m=async()=>{const o=await X({...d,...c});x.value=o.data.records,$.value=o.data.total},$=g(0),B=()=>{m()},D=()=>{c.projectName=void 0,c.buildOrgName=void 0,m()},T=o=>{d.pageSize=o,d.pageNumber=1,m()},I=o=>{d.pageNumber=o,m()},L=o=>{S.$messageBox.confirm(`\u7533\u8BF7\u501F\u9605\u300A${o.projectName}\u300B\u9879\u76EE\u6863\u6848`,"\u786E\u5B9A\u501F\u9605\u5417?",{type:"warning"}).then(async()=>{await Y(o.id),S.$message.success("\u7533\u8BF7\u6210\u529F\uFF01"),await m()})},A=async o=>{v.value=!0,_.value="",f.value=0,C.value=setInterval(()=>{f.value<99?f.value++:clearInterval(C.value)},30);try{const e=await Z(o);f.value=100,_.value="success",clearInterval(C.value);const y=URL.createObjectURL(e),u=document.createElement("a");u.style.display="none",u.href=y,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(y),setTimeout(()=>{v.value=!1},500)}catch{clearTimeout(C.value),_.value="exception",setTimeout(()=>{v.value=!1},500)}},C=g(null),v=g(!1),f=g(0),_=g();return K(()=>{m()}),(o,e)=>{const y=n("el-input"),u=n("el-form-item"),w=n("el-col"),b=n("el-button"),R=n("el-row"),P=n("el-form"),U=n("el-card"),q=n("el-divider"),F=n("el-pagination"),E=n("el-progress"),G=n("el-dialog");return s(),r(j,null,[a(U,{class:"w-full search"},{default:l(()=>[a(P,{model:c,size:"small","label-suffix":":"},{default:l(()=>[a(R,{gutter:16},{default:l(()=>[a(w,{span:8},{default:l(()=>[a(u,{label:"\u9879\u76EE\u540D\u79F0"},{default:l(()=>[a(y,{modelValue:c.projectName,"onUpdate:modelValue":e[0]||(e[0]=t=>c.projectName=t),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:8},{default:l(()=>[a(u,{label:"\u9879\u76EE\u5355\u4F4D"},{default:l(()=>[a(y,{modelValue:c.buildOrgName,"onUpdate:modelValue":e[1]||(e[1]=t=>c.buildOrgName=t),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:8},{default:l(()=>[a(u,{class:"btn"},{default:l(()=>[i("div",ee,[a(b,{type:"primary",onClick:B},{default:l(()=>e[5]||(e[5]=[k("\u67E5\u8BE2")])),_:1}),a(b,{onClick:D},{default:l(()=>e[6]||(e[6]=[k("\u91CD\u7F6E")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(U,{class:"w-full mt-8"},{header:l(()=>e[7]||(e[7]=[i("div",{class:"flex justify-between"},[i("span",null,"\u5217\u8868")],-1)])),default:l(()=>[x.value.length?(s(),N(R,{key:0,gutter:24,class:"card-list"},{default:l(()=>[(s(!0),r(j,null,Q(x.value,t=>(s(),N(w,{key:t.id,sm:12,lg:8,xl:6,class:"mb-24"},{default:l(()=>[i("div",te,[t.canRead?(s(),r("a",{key:0,class:"title",onClick:h=>o.$router.push({name:"projectArchiveDetail",query:{id:t.id}})},z(t.projectName),9,ae)):(s(),r("div",le,z(t.projectName),1)),i("div",oe,[i("div",null,[e[8]||(e[8]=i("span",{class:"label"},"\u9879\u76EE\u7F16\u53F7\uFF1A",-1)),i("span",se,z(t.pojectCode),1)])]),a(q),i("div",ne,[t.canRead?(s(),r(j,{key:1},[a(b,{icon:"view",type:"primary",onClick:h=>o.$router.push({name:"projectArchiveDetail",query:{id:t.id}})},{default:l(()=>e[10]||(e[10]=[k("\u67E5\u770B")])),_:2},1032,["onClick"]),a(b,{icon:"download",onClick:h=>A(t.id)},{default:l(()=>e[11]||(e[11]=[k("\u4E0B\u8F7D")])),_:2},1032,["onClick"])],64)):(s(),r(j,{key:0},[t.canApplyBorrow?(s(),N(b,{key:0,icon:"reading",plain:"",type:"primary",onClick:h=>L(t)},{default:l(()=>e[9]||(e[9]=[k("\u7533\u8BF7\u501F\u9605")])),_:2},1032,["onClick"])):(s(),r("span",re,"\u7533\u8BF7\u501F\u9605\u5BA1\u6279\u4E2D"))],64))])])]),_:2},1024))),128))]),_:1})):(s(),N(H,{key:1})),a(F,{currentPage:d.pageNumber,"onUpdate:currentPage":e[2]||(e[2]=t=>d.pageNumber=t),"page-size":d.pageSize,"onUpdate:pageSize":e[3]||(e[3]=t=>d.pageSize=t),background:"","page-sizes":d.pageSizes,layout:"total, sizes, prev, pager, next",total:$.value,onSizeChange:T,onCurrentChange:I},null,8,["currentPage","page-size","page-sizes","total"])]),_:1}),a(G,{modelValue:v.value,"onUpdate:modelValue":e[4]||(e[4]=t=>v.value=t),"show-close":!1},{default:l(()=>[i("div",ie,[_.value==="success"?(s(),r("p",de,"\u4E0B\u8F7D\u6210\u529F\uFF01")):_.value==="exception"?(s(),r("p",ue,"\u4E0B\u8F7D\u5931\u8D25\uFF01")):(s(),r("p",ce,"\u8D44\u6E90\u5904\u7406\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...")),a(E,{type:"circle",percentage:f.value,status:_.value,class:"mt-8"},null,8,["percentage","status"])])]),_:1},8,["modelValue"])],64)}}}),ve=M(me,[["__scopeId","data-v-9682319c"]]);export{ve as default};