index-978b5b0e.js 5.3 KB

1
  1. import{aq as C,d as M,h as j,r as u,e as A,l as B,Q as G,o as i,c as L,f as e,w as t,a as l,R as U,n as p,x as z,v as c,e5 as Q,F as X,V as J,A as O,B as W,j as Z,C as $,D as ee,G as ae,H as te,I as le,_ as re,__tla as oe}from"./index-11e4820e.js";import{_ as ne,__tla as ie}from"./index-c8f58bd0.js";import{E as pe,__tla as se}from"./el-link-6cd4f1ac.js";import{E as _e,__tla as ue}from"./el-image-17e8bc54.js";import{__tla as ce}from"./el-image-viewer-c4f5814f.js";import{_ as me,__tla as de}from"./ContentWrap-694014d4.js";import{d as fe,__tla as ye}from"./formatTime-f6a2c881.js";import he,{__tla as we}from"./FileForm-1fb3ad6f.js";import{u as ge,__tla as ve}from"./useMessage-06ddf735.js";import{__tla as be}from"./index-dd73c59d.js";import{__tla as ke}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as xe}from"./el-card-919c14be.js";import{__tla as Ve}from"./Dialog-bbfaf85c.js";let N,De=Promise.all([(()=>{try{return oe}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Ve}catch{}})()]).then(async()=>{N=re(M({name:"InfraFile",__name:"index",setup(Ce){const w=ge(),{t:H}=j(),y=u(!0),g=u(0),v=u([]),o=A({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,C.get({url:"/infra/file/page",params:_}));v.value=r.list,g.value=r.total}finally{y.value=!1}var _},m=()=>{o.pageNo=1,s()},R=()=>{b.value.resetFields(),m()},k=u(),S=()=>{k.value.open()},T=async _=>{try{await w.delConfirm(),await(r=>C.delete({url:"/infra/file/delete?id="+r}))(_),w.success(H("common.delSuccess")),await s()}catch{}};return B(()=>{s()}),(_,r)=>{const x=J,d=O,F=W,h=Z,f=$,Y=ee,V=me,n=ae,P=_e,D=pe,q=te,E=ne,I=G("hasPermi"),K=le;return i(),L(X,null,[e(V,null,{default:t(()=>[e(Y,{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:U(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:U(m,["enter"])},null,8,["modelValue"])]),_:1}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(F,{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"}),p(" \u641C\u7D22")]),_:1}),e(f,{onClick:R},{default:t(()=>[e(h,{icon:"ep:refresh",class:"mr-5px"}),p(" \u91CD\u7F6E")]),_:1}),e(f,{type:"primary",plain:"",onClick:S},{default:t(()=>[e(h,{icon:"ep:upload",class:"mr-5px"}),p(" \u4E0A\u4F20\u6587\u4EF6 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(V,null,{default:t(()=>[z((i(),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(Q)},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")?(i(),c(P,{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")?(i(),c(D,{key:1,type:"primary",href:a.url,underline:!1,target:"_blank"},{default:t(()=>[p("\u9884\u89C8")]),_:2},1032,["href"])):(i(),c(D,{key:2,type:"primary",download:"",href:a.url,underline:!1,target:"_blank"},{default:t(()=>[p("\u4E0B\u8F7D")]),_:2},1032,["href"]))]),_:1}),e(n,{label:"\u4E0A\u4F20\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:l(fe)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:t(a=>[z((i(),c(f,{link:"",type:"danger",onClick:Ue=>T(a.row.id)},{default:t(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[I,["infra:config:delete"]]])]),_:1})]),_:1},8,["data"])),[[K,l(y)]]),e(E,{total:l(g),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(he,{ref_key:"formRef",ref:k,onSuccess:s},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/file/index.vue"]])});export{De as __tla,N as default};