index-4d135422.js 5.2 KB

1
  1. import{as as z,d as I,B as L,r as u,g as B,z as J,T as $,o as i,c as j,i as e,w as l,a as t,U as C,l as s,D,k as c,d$ as A,F as G,Y as O,I as Q,q as W,n as X,s as Z,J as ee,K as ae,L as le,M as te,_ as re,__tla as oe}from"./index-2f799233.js";import{_ as ne,__tla as ie}from"./index-e6cd813f.js";import{E as se,__tla as pe}from"./el-link-23decf79.js";import{E as _e,__tla as ue}from"./el-image-4d26fa76.js";import{__tla as ce}from"./el-image-viewer-8e9e3571.js";import{_ as de,__tla as me}from"./ContentWrap-9da801df.js";import{d as fe,__tla as ye}from"./formatTime-2157894c.js";import he,{__tla as ge}from"./FileForm-5c92da60.js";import{u as we,__tla as ve}from"./useMessage-e567ad40.js";import{__tla as be}from"./index-1c180a16.js";import{__tla as ke}from"./el-card-c64c83d1.js";import{__tla as xe}from"./Dialog-6fd39e06.js";let T,Ue=Promise.all([(()=>{try{return oe}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return xe}catch{}})()]).then(async()=>{T=re(I({name:"InfraFile",__name:"index",setup(Ve){const g=we(),{t:Y}=L(),y=u(!0),w=u(0),v=u([]),o=B({pageNo:1,pageSize:10,name:void 0,type:void 0,path:void 0,createTime:[]}),b=u(),p=async()=>{y.value=!0;try{const r=await(_=o,z.get({url:"/infra/file/page",params:_}));v.value=r.list,w.value=r.total}finally{y.value=!1}var _},d=()=>{o.pageNo=1,p()},M=()=>{b.value.resetFields(),d()},k=u(),S=()=>{k.value.open()},F=async _=>{try{await g.delConfirm(),await(r=>z.delete({url:"/infra/file/delete?id="+r}))(_),g.success(Y("common.delSuccess")),await p()}catch{}};return J(()=>{p()}),(_,r)=>{const x=O,m=Q,N=W,h=X,f=Z,K=ee,U=de,n=ae,P=_e,V=se,R=le,q=ne,E=$("hasPermi"),H=te;return i(),j(G,null,[e(U,null,{default:l(()=>[e(K,{class:"-mb-15px",model:t(o),ref_key:"queryFormRef",ref:b,inline:!0,"label-width":"68px"},{default:l(()=>[e(m,{label:"\u6587\u4EF6\u8DEF\u5F84",prop:"path"},{default:l(()=>[e(x,{modelValue:t(o).path,"onUpdate:modelValue":r[0]||(r[0]=a=>t(o).path=a),placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u8DEF\u5F84",clearable:"",onKeyup:C(d,["enter"])},null,8,["modelValue"])]),_:1}),e(m,{label:"\u6587\u4EF6\u7C7B\u578B",prop:"type",width:"80"},{default:l(()=>[e(x,{modelValue:t(o).type,"onUpdate:modelValue":r[1]||(r[1]=a=>t(o).type=a),placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u7C7B\u578B",clearable:"",onKeyup:C(d,["enter"])},null,8,["modelValue"])]),_:1}),e(m,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[e(N,{modelValue:t(o).createTime,"onUpdate:modelValue":r[2]||(r[2]=a=>t(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(m,null,{default:l(()=>[e(f,{onClick:d},{default:l(()=>[e(h,{icon:"ep:search",class:"mr-5px"}),s(" \u641C\u7D22")]),_:1}),e(f,{onClick:M},{default:l(()=>[e(h,{icon:"ep:refresh",class:"mr-5px"}),s(" \u91CD\u7F6E")]),_:1}),e(f,{type:"primary",plain:"",onClick:S},{default:l(()=>[e(h,{icon:"ep:upload",class:"mr-5px"}),s(" \u4E0A\u4F20\u6587\u4EF6 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(U,null,{default:l(()=>[D((i(),c(R,{data:t(v)},{default:l(()=>[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:t(A)},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:l(({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(V,{key:1,type:"primary",href:a.url,underline:!1,target:"_blank"},{default:l(()=>[s("\u9884\u89C8")]),_:2},1032,["href"])):(i(),c(V,{key:2,type:"primary",download:"",href:a.url,underline:!1,target:"_blank"},{default:l(()=>[s("\u4E0B\u8F7D")]),_:2},1032,["href"]))]),_:1}),e(n,{label:"\u4E0A\u4F20\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(fe)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:l(a=>[D((i(),c(f,{link:"",type:"danger",onClick:ze=>F(a.row.id)},{default:l(()=>[s(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[E,["infra:config:delete"]]])]),_:1})]),_:1},8,["data"])),[[H,t(y)]]),e(q,{total:t(w),page:t(o).pageNo,"onUpdate:page":r[3]||(r[3]=a=>t(o).pageNo=a),limit:t(o).pageSize,"onUpdate:limit":r[4]||(r[4]=a=>t(o).pageSize=a),onPagination:p},null,8,["total","page","limit"])]),_:1}),e(he,{ref_key:"formRef",ref:k,onSuccess:p},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/infra/file/index.vue"]])});export{Ue as __tla,T as default};