index-af4874c1.js 5.2 KB

1
  1. import{d as K,H as M,r as _,x as q,b as Q,a1 as W,o as i,c as I,f as a,B as t,a as r,a2 as X,F as U,P as j,A as m,G as p,l as g,a6 as J,S as Z,Q as $,R as ee,K as ae,_ as le,L as te,U as re,V as oe,W as ie,X as ne}from"./index-b9299550.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang-ba921998.js";import{_ as pe}from"./DictTag.vue_vue_type_script_lang-128aab57.js";import{_ as ue}from"./ContentWrap.vue_vue_type_script_setup_true_lang-dd7e3058.js";import{F as ce,g as me,d as de,u as fe,t as _e}from"./FileConfigForm-1850d753.js";import{a as ge,D as C}from"./dict-fc5218c3.js";import{d as ye}from"./formatTime-988372b6.js";import{u as we}from"./useMessage-903d430d.js";import"./index-1bc6dd97.js";import"./color-6e929987.js";import"./el-card-0ae6fb5f.js";import"./Dialog-f2c6d513.js";import"./_plugin-vue_export-helper-1b428a4d.js";const be=K({name:"InfraFileConfig",__name:"index",setup(ke){const d=we(),{t:x}=M(),b=_(!0),F=_(0),S=_([]),o=q({pageNo:1,pageSize:10,name:void 0,storage:void 0,createTime:[]}),V=_(),u=async()=>{b.value=!0;try{const f=await me(o);S.value=f.list,F.value=f.total}finally{b.value=!1}},k=()=>{o.pageNo=1,u()},D=()=>{V.value.resetFields(),k()},N=_(),R=(f,e)=>{N.value.open(f,e)};return Q(()=>{u()}),(f,e)=>{const E=J,y=Z,L=$,G=ee,O=ae,v=le,n=te,P=re,A=ue,s=oe,T=pe,Y=ie,z=se,w=W("hasPermi"),H=ne;return i(),I(U,null,[a(A,null,{default:t(()=>[a(P,{class:"-mb-15px",model:r(o),ref_key:"queryFormRef",ref:V,inline:!0,"label-width":"68px"},{default:t(()=>[a(y,{label:"\u914D\u7F6E\u540D",prop:"name"},{default:t(()=>[a(E,{modelValue:r(o).name,"onUpdate:modelValue":e[0]||(e[0]=l=>r(o).name=l),placeholder:"\u8BF7\u8F93\u5165\u914D\u7F6E\u540D",clearable:"",onKeyup:X(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(y,{label:"\u5B58\u50A8\u5668",prop:"storage"},{default:t(()=>[a(G,{modelValue:r(o).storage,"onUpdate:modelValue":e[1]||(e[1]=l=>r(o).storage=l),placeholder:"\u8BF7\u9009\u62E9\u5B58\u50A8\u5668",clearable:"",class:"!w-240px"},{default:t(()=>[(i(!0),I(U,null,j(r(ge)(r(C).INFRA_FILE_STORAGE),l=>(i(),m(L,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(y,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(O,{modelValue:r(o).createTime,"onUpdate:modelValue":e[2]||(e[2]=l=>r(o).createTime=l),"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")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),a(y,null,{default:t(()=>[a(n,{onClick:k},{default:t(()=>[a(v,{icon:"ep:search",class:"mr-5px"}),e[6]||(e[6]=p(" \u641C\u7D22"))]),_:1}),a(n,{onClick:D},{default:t(()=>[a(v,{icon:"ep:refresh",class:"mr-5px"}),e[7]||(e[7]=p(" \u91CD\u7F6E"))]),_:1}),g((i(),m(n,{type:"primary",plain:"",onClick:e[3]||(e[3]=l=>R("create"))},{default:t(()=>[a(v,{icon:"ep:plus",class:"mr-5px"}),e[8]||(e[8]=p(" \u65B0\u589E "))]),_:1})),[[w,["infra:file-config:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(A,null,{default:t(()=>[g((i(),m(Y,{data:r(S)},{default:t(()=>[a(s,{label:"\u7F16\u53F7",align:"center",prop:"id"}),a(s,{label:"\u914D\u7F6E\u540D",align:"center",prop:"name"}),a(s,{label:"\u5B58\u50A8\u5668",align:"center",prop:"storage"},{default:t(l=>[a(T,{type:r(C).INFRA_FILE_STORAGE,value:l.row.storage},null,8,["type","value"])]),_:1}),a(s,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),a(s,{label:"\u4E3B\u914D\u7F6E",align:"center",prop:"primary"},{default:t(l=>[a(T,{type:r(C).INFRA_BOOLEAN_STRING,value:l.row.master},null,8,["type","value"])]),_:1}),a(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:r(ye)},null,8,["formatter"]),a(s,{label:"\u64CD\u4F5C",align:"center",width:"240px"},{default:t(l=>[g((i(),m(n,{link:"",type:"primary",onClick:h=>R("update",l.row.id)},{default:t(()=>e[9]||(e[9]=[p(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[w,["infra:file-config:update"]]]),g((i(),m(n,{link:"",type:"primary",disabled:l.row.master,onClick:h=>(async c=>{try{await d.confirm('\u662F\u5426\u786E\u8BA4\u4FEE\u6539\u914D\u7F6E\u7F16\u53F7\u4E3A"'+c+'"\u7684\u6570\u636E\u9879\u4E3A\u4E3B\u914D\u7F6E?'),await fe(c),d.success(x("common.updateSuccess")),await u()}catch{}})(l.row.id)},{default:t(()=>e[10]||(e[10]=[p(" \u4E3B\u914D\u7F6E ")])),_:2},1032,["disabled","onClick"])),[[w,["infra:file-config:update"]]]),a(n,{link:"",type:"primary",onClick:h=>(async c=>{try{const B=await _e(c);d.alert("\u6D4B\u8BD5\u901A\u8FC7\uFF0C\u4E0A\u4F20\u6587\u4EF6\u6210\u529F\uFF01\u8BBF\u95EE\u5730\u5740\uFF1A"+B)}catch{}})(l.row.id)},{default:t(()=>e[11]||(e[11]=[p(" \u6D4B\u8BD5 ")])),_:2},1032,["onClick"]),g((i(),m(n,{link:"",type:"danger",onClick:h=>(async c=>{try{await d.delConfirm(),await de(c),d.success(x("common.delSuccess")),await u()}catch{}})(l.row.id)},{default:t(()=>e[12]||(e[12]=[p(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[w,["infra:config:delete"]]])]),_:1})]),_:1},8,["data"])),[[H,r(b)]]),a(z,{total:r(F),page:r(o).pageNo,"onUpdate:page":e[4]||(e[4]=l=>r(o).pageNo=l),limit:r(o).pageSize,"onUpdate:limit":e[5]||(e[5]=l=>r(o).pageSize=l),onPagination:u},null,8,["total","page","limit"])]),_:1}),a(ce,{ref_key:"formRef",ref:N,onSuccess:u},null,512)],64)}}});export{be as default};