import{d as defineComponent,O as useRoute,r as ref,n as reactive,h as openBlock,c as createElementBlock,e as createVNode,w as withCtx,a as createBaseVNode,t as toDisplayString,u as unref,y as withDirectives,I as createBlock,N as t,i as createTextVNode,B as createCommentVNode,ah as ElTableColumn,aw as ElTag,E as ElButton,aj as ElTable,$ as ElCard,a0 as vLoading}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{Z as getStorageList}from"./sys-8ead7f22.js";import{_ as _sfc_main$1}from"./storage-local.vue_vue_type_script_setup_true_lang-9e242d40.js";import{_ as _sfc_main$2}from"./storage-qiniu.vue_vue_type_script_setup_true_lang-da13085e.js";import{_ as _sfc_main$3}from"./storage-ali.vue_vue_type_script_setup_true_lang-508a8aba.js";import{_ as _sfc_main$4}from"./storage-tencent.vue_vue_type_script_setup_true_lang-4f64eb8d.js";/* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css */const _hoisted_1={class:"main-container"},_hoisted_2={class:"flex justify-between items-center"},_hoisted_3={class:"text-[20px]"},_hoisted_4={class:"mt-[16px]"},_sfc_main=defineComponent({__name:"storage",setup(__props){const route=useRoute(),pageName=route.meta.title,localDialog=ref(null),qiniuDialog=ref(null),aliyunDialog=ref(null),tencentDialog=ref(null),storageTableData=reactive({data:[]}),loading=ref(!0),loadStorageList=()=>{loading.value=!0,getStorageList().then(l=>{storageTableData.data=l.data,loading.value=!1}).catch(()=>{loading.value=!1})};loadStorageList();const editEvent=data=>{eval(data.storage_type+"Dialog.value.setFormData(data)"),eval(data.storage_type+"Dialog.value.showDialog = true;")};return(l,e)=>{const o=ElTableColumn,n=ElTag,i=ElButton,r=ElTable,s=ElCard,c=vLoading;return openBlock(),createElementBlock("div",_hoisted_1,[createVNode(s,{class:"box-card !border-none",shadow:"never"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_2,[createBaseVNode("span",_hoisted_3,toDisplayString(unref(pageName)),1)]),createBaseVNode("div",_hoisted_4,[withDirectives((openBlock(),createBlock(r,{data:storageTableData.data,size:"large"},{empty:withCtx(()=>[createBaseVNode("span",null,toDisplayString(loading.value?"":unref(t)("emptyData")),1)]),default:withCtx(()=>[createVNode(o,{prop:"name",label:unref(t)("name"),"min-width":"100","show-overflow-tooltip":!0},null,8,["label"]),createVNode(o,{label:unref(t)("isUse"),"min-width":"180",align:"center"},{default:withCtx(({row:a})=>[a.is_use==1?(openBlock(),createBlock(n,{key:0,class:"ml-2",type:"success"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("statusNormal")),1)]),_:1})):createCommentVNode("",!0),a.is_use==0?(openBlock(),createBlock(n,{key:1,class:"ml-2",type:"error"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("statusDeactivate")),1)]),_:1})):createCommentVNode("",!0)]),_:1},8,["label"]),createVNode(o,{label:unref(t)("operation"),align:"right",fixed:"right",width:"100"},{default:withCtx(({row:a})=>[createVNode(i,{type:"primary",link:"",onClick:d=>editEvent(a)},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("config")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[c,loading.value]])]),createVNode(_sfc_main$1,{ref_key:"localDialog",ref:localDialog,onComplete:e[0]||(e[0]=a=>loadStorageList())},null,512),createVNode(_sfc_main$2,{ref_key:"qiniuDialog",ref:qiniuDialog,onComplete:e[1]||(e[1]=a=>loadStorageList())},null,512),createVNode(_sfc_main$3,{ref_key:"aliyunDialog",ref:aliyunDialog,onComplete:e[2]||(e[2]=a=>loadStorageList())},null,512),createVNode(_sfc_main$4,{ref_key:"tencentDialog",ref:tencentDialog,onComplete:e[3]||(e[3]=a=>loadStorageList())},null,512)]),_:1})])}}});export{_sfc_main as default};