mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-02-03 16:38:10 +00:00
2 lines
5.2 KiB
JavaScript
2 lines
5.2 KiB
JavaScript
import{d as defineComponent,r as ref,R as reactive,e as openBlock,f as createElementBlock,y as createVNode,x as withCtx,g as createBaseVNode,B as toDisplayString,u as unref,Q as withDirectives,v as createBlock,A as createTextVNode,H as createCommentVNode}from"./base-04829be5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{t}from"./index-043d021e.js";import{U as getStorageList}from"./sys-f9859bed.js";import{_ as _sfc_main$1}from"./storage-local.vue_vue_type_script_setup_true_lang-47a4d44c.js";import{_ as _sfc_main$2}from"./storage-qiniu.vue_vue_type_script_setup_true_lang-97453db4.js";import{_ as _sfc_main$3}from"./storage-ali.vue_vue_type_script_setup_true_lang-af973738.js";import{_ as _sfc_main$4}from"./storage-tencent.vue_vue_type_script_setup_true_lang-8841ca29.js";import{u as useRoute}from"./vue-router-fee568b2.js";import{a as ElTableColumn,E as ElTable}from"./index-ed9a1afd.js";import{E as ElTag}from"./index-bf9de702.js";import{E as ElButton}from"./index-eb678249.js";import{E as ElCard}from"./index-88566e4e.js";import{v as vLoading}from"./directive-013f0a4e.js";import"./common-111e3797.js";import"./common-2cf17469.js";import"./index-faea7bd5.js";import"./storage-1a3ddb14.js";import"./index-7e933ae4.js";import"./index-30df2c14.js";import"./index-236cb599.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-92283b18.js";import"./typescript-defaf979.js";import"./index-a2524300.js";/* empty css *//* empty css *//* empty css */import"./index-1cbf3455.js";import"./event-9519ab40.js";import"./index-de053f2e.js";import"./index-d7f4b4bb.js";import"./error-78e43d3e.js";import"./index-6bd50bb5.js";import"./castArray-11aea762.js";import"./_Uint8Array-99b916e9.js";import"./_initCloneObject-e5a1aa13.js";import"./index-b1557f8a.js";import"./index-9a9de0a3.js";import"./scroll-e5463626.js";import"./vnode-85ccdc7f.js";import"./index-1d455165.js";import"./focus-trap-be36cfe9.js";import"./index-4edf2cad.js";/* empty css */import"./index-db9b8d96.js";import"./index-e9e16697.js";import"./index-94a82d50.js";import"./index-c3b3b83a.js";import"./isEqual-ba353d68.js";import"./flatten-94587e2b.js";import"./_isIterateeCall-f0970b1f.js";import"./debounce-f064e94e.js";import"./index-b519934c.js";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);let storageTableData=reactive({data:[]});const loading=ref(!0),loadStorageList=()=>{loading.value=!0,getStorageList().then(r=>{storageTableData.data=r.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(r,e)=>{const a=ElTableColumn,i=ElTag,l=ElButton,n=ElTable,s=ElCard,m=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(n,{data:unref(storageTableData).data,size:"large"},{empty:withCtx(()=>[createBaseVNode("span",null,toDisplayString(loading.value?"":unref(t)("emptyData")),1)]),default:withCtx(()=>[createVNode(a,{prop:"name",label:unref(t)("name"),"min-width":"100","show-overflow-tooltip":!0},null,8,["label"]),createVNode(a,{label:unref(t)("isUse"),"min-width":"180",align:"center"},{default:withCtx(({row:o})=>[o.is_use==1?(openBlock(),createBlock(i,{key:0,class:"ml-2",type:"success"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("statusNormal")),1)]),_:1})):createCommentVNode("",!0),o.is_use==0?(openBlock(),createBlock(i,{key:1,class:"ml-2",type:"error"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("statusDeactivate")),1)]),_:1})):createCommentVNode("",!0)]),_:1},8,["label"]),createVNode(a,{label:unref(t)("operation"),fixed:"right",width:"100"},{default:withCtx(({row:o})=>[createVNode(l,{type:"primary",link:"",onClick:p=>editEvent(o)},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("config")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[m,loading.value]])]),createVNode(_sfc_main$1,{ref_key:"localDialog",ref:localDialog,onComplete:e[0]||(e[0]=o=>loadStorageList())},null,512),createVNode(_sfc_main$2,{ref_key:"qiniuDialog",ref:qiniuDialog,onComplete:e[1]||(e[1]=o=>loadStorageList())},null,512),createVNode(_sfc_main$3,{ref_key:"aliyunDialog",ref:aliyunDialog,onComplete:e[2]||(e[2]=o=>loadStorageList())},null,512),createVNode(_sfc_main$4,{ref_key:"tencentDialog",ref:tencentDialog,onComplete:e[3]||(e[3]=o=>loadStorageList())},null,512)]),_:1})])}}});export{_sfc_main as default};
|