mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-03 11:48:14 +00:00
2 lines
4.8 KiB
JavaScript
2 lines
4.8 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-2de02574.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{ag as getStorageList}from"./index-4ca69875.js";/* empty css */import{t}from"./index-a7cd5616.js";import{_ as _sfc_main$1}from"./storage-local.vue_vue_type_script_setup_true_lang-2532ffcb.js";import{_ as _sfc_main$2}from"./storage-qiniu.vue_vue_type_script_setup_true_lang-1f7bceac.js";import{_ as _sfc_main$3}from"./storage-ali.vue_vue_type_script_setup_true_lang-755e519a.js";import{_ as _sfc_main$4}from"./storage-tencent.vue_vue_type_script_setup_true_lang-fb8a684b.js";import{u as useRoute}from"./vue-router-834a68c8.js";import{a as ElTableColumn,E as ElTable}from"./index-2ad1d1e2.js";import{E as ElTag}from"./index-e3e3f033.js";import{E as ElButton}from"./index-84eb3c18.js";import{E as ElCard}from"./index-409cdc90.js";import{v as vLoading}from"./directive-ce271fd4.js";import"./common-655c495e.js";import"./index-53431221.js";import"./index-29aaa146.js";import"./index-e049ae93.js";import"./el-main-e7ca7755.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-907c8fa3.js";import"./el-overlay-c29a408e.js";import"./event-30fa88cc.js";import"./index-fa3f6669.js";import"./focus-trap-852901de.js";import"./index-a556d0d2.js";import"./index-53f4bde2.js";import"./el-form-item-aacba116.js";/* empty css */import"./index-99061637.js";import"./index-f34dc67c.js";import"./index-389593d1.js";import"./index-9c3282b5.js";/* empty css */import"./index-8a191767.js";import"./index-7e51d50f.js";import"./isEqual-aeead489.js";import"./_isIterateeCall-87e77157.js";import"./debounce-b627eb85.js";import"./index-dfcf0976.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",align:"right",width:"100"},{default:withCtx(({row:o})=>[createVNode(l,{type:"primary",link:"",onClick:c=>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};
|