選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

2 行
5.1KB

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