1 |
- import{ap as U,d as A,h as B,r as u,e as G,k as I,P as L,o as p,c as Q,f as e,w as t,a as l,Q as z,m as i,v as Y,q as c,e0 as j,F as J,U as O,z as W,A as X,_ as Z,B as $,C as ee,D as ae,G as te,H as le,__tla as re}from"./index-2eab2d23.js";import{_ as oe,__tla as ne}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{E as pe,__tla as ie}from"./el-link-f0d278a2.js";import{E as se,__tla as _e}from"./el-image-2171f3ff.js";import{__tla as ue}from"./el-image-viewer-5d14bc77.js";import{_ as ce,__tla as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{d as de,__tla as fe}from"./formatTime-41155543.js";import{_ as ye,__tla as he}from"./FileForm.vue_vue_type_script_setup_true_lang-c324a20d.js";import{u as ge,__tla as we}from"./useMessage-171aa63e.js";import{__tla as ve}from"./index-cc63c3c4.js";import{__tla as be}from"./el-card-c558f0ec.js";import{__tla as ke}from"./Dialog-c2716df6.js";import"./_plugin-vue_export-helper-1b428a4d.js";let D,xe=Promise.all([(()=>{try{return re}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return ke}catch{}})()]).then(async()=>{D=A({name:"InfraFile",__name:"index",setup(Ve){const g=ge(),{t:N}=B(),y=u(!0),w=u(0),v=u([]),o=G({pageNo:1,pageSize:10,name:void 0,type:void 0,path:void 0,createTime:[]}),b=u(),s=async()=>{y.value=!0;try{const r=await(_=o,U.get({url:"/infra/file/page",params:_}));v.value=r.list,w.value=r.total}finally{y.value=!1}var _},m=()=>{o.pageNo=1,s()},S=()=>{b.value.resetFields(),m()},k=u(),T=()=>{k.value.open()},F=async _=>{try{await g.delConfirm(),await(r=>U.delete({url:"/infra/file/delete?id="+r}))(_),g.success(N("common.delSuccess")),await s()}catch{}};return I(()=>{s()}),(_,r)=>{const x=O,d=W,H=X,h=Z,f=$,P=ee,V=ce,n=ae,R=se,C=pe,q=te,E=oe,K=L("hasPermi"),M=le;return p(),Q(J,null,[e(V,null,{default:t(()=>[e(P,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:b,inline:!0,"label-width":"68px"},{default:t(()=>[e(d,{label:"\u6587\u4EF6\u8DEF\u5F84",prop:"path"},{default:t(()=>[e(x,{modelValue:l(o).path,"onUpdate:modelValue":r[0]||(r[0]=a=>l(o).path=a),placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u8DEF\u5F84",clearable:"",onKeyup:z(m,["enter"])},null,8,["modelValue"])]),_:1}),e(d,{label:"\u6587\u4EF6\u7C7B\u578B",prop:"type",width:"80"},{default:t(()=>[e(x,{modelValue:l(o).type,"onUpdate:modelValue":r[1]||(r[1]=a=>l(o).type=a),placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u7C7B\u578B",clearable:"",onKeyup:z(m,["enter"])},null,8,["modelValue"])]),_:1}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(H,{modelValue:l(o).createTime,"onUpdate:modelValue":r[2]||(r[2]=a=>l(o).createTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")]},null,8,["modelValue","default-time"])]),_:1}),e(d,null,{default:t(()=>[e(f,{onClick:m},{default:t(()=>[e(h,{icon:"ep:search",class:"mr-5px"}),i(" \u641C\u7D22")]),_:1}),e(f,{onClick:S},{default:t(()=>[e(h,{icon:"ep:refresh",class:"mr-5px"}),i(" \u91CD\u7F6E")]),_:1}),e(f,{type:"primary",plain:"",onClick:T},{default:t(()=>[e(h,{icon:"ep:upload",class:"mr-5px"}),i(" \u4E0A\u4F20\u6587\u4EF6 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(V,null,{default:t(()=>[Y((p(),c(q,{data:l(v)},{default:t(()=>[e(n,{label:"\u6587\u4EF6\u540D",align:"center",prop:"name","show-overflow-tooltip":!0}),e(n,{label:"\u6587\u4EF6\u8DEF\u5F84",align:"center",prop:"path","show-overflow-tooltip":!0}),e(n,{label:"URL",align:"center",prop:"url","show-overflow-tooltip":!0}),e(n,{label:"\u6587\u4EF6\u5927\u5C0F",align:"center",prop:"size",width:"120",formatter:l(j)},null,8,["formatter"]),e(n,{label:"\u6587\u4EF6\u7C7B\u578B",align:"center",prop:"type",width:"180px"}),e(n,{label:"\u6587\u4EF6\u5185\u5BB9",align:"center",prop:"url",width:"110px"},{default:t(({row:a})=>[a.type.includes("image")?(p(),c(R,{key:0,class:"h-80px w-80px",lazy:"",src:a.url,"preview-src-list":[a.url],"preview-teleported":"",fit:"cover"},null,8,["src","preview-src-list"])):a.type.includes("pdf")?(p(),c(C,{key:1,type:"primary",href:a.url,underline:!1,target:"_blank"},{default:t(()=>[i("\u9884\u89C8")]),_:2},1032,["href"])):(p(),c(C,{key:2,type:"primary",download:"",href:a.url,underline:!1,target:"_blank"},{default:t(()=>[i("\u4E0B\u8F7D")]),_:2},1032,["href"]))]),_:1}),e(n,{label:"\u4E0A\u4F20\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:l(de)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:t(a=>[Y((p(),c(f,{link:"",type:"danger",onClick:Ce=>F(a.row.id)},{default:t(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[K,["infra:config:delete"]]])]),_:1})]),_:1},8,["data"])),[[M,l(y)]]),e(E,{total:l(w),page:l(o).pageNo,"onUpdate:page":r[3]||(r[3]=a=>l(o).pageNo=a),limit:l(o).pageSize,"onUpdate:limit":r[4]||(r[4]=a=>l(o).pageSize=a),onPagination:s},null,8,["total","page","limit"])]),_:1}),e(ye,{ref_key:"formRef",ref:k,onSuccess:s},null,512)],64)}}})});export{xe as __tla,D as default};
|