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.

2 líneas
5.8KB

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