2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
|
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{d as getSmsList}from"./notice-b720dec8.js";import{_ as _sfc_main$1}from"./sms-ali.vue_vue_type_script_setup_true_lang-0193c6d4.js";import{_ as _sfc_main$2}from"./sms-tencent.vue_vue_type_script_setup_true_lang-534e5f5d.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* 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-[20px]"},_sfc_main=defineComponent({__name:"sms",setup(__props){const route=useRoute(),pageName=route.meta.title,aliyunDialog=ref(null),tencentDialog=ref(null),smsTableData=reactive({loading:!0,data:[]}),loadSmsList=()=>{smsTableData.loading=!0,getSmsList().then(s=>{smsTableData.data=s.data,smsTableData.loading=!1}).catch(()=>{smsTableData.loading=!1})};loadSmsList();const editEvent=data=>{eval(data.sms_type+"Dialog.value.setFormData(data)"),eval(data.sms_type+"Dialog.value.showDialog = true;")};return(s,a)=>{const o=ElTableColumn,l=ElTag,n=ElButton,i=ElTable,r=ElCard,c=vLoading;return openBlock(),createElementBlock("div",_hoisted_1,[createVNode(r,{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(i,{data:smsTableData.data,size:"large"},{empty:withCtx(()=>[createBaseVNode("span",null,toDisplayString(smsTableData.loading?"":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:e})=>[e.is_use==1?(openBlock(),createBlock(l,{key:0,class:"ml-2",type:"success"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("statusNormal")),1)]),_:1})):createCommentVNode("",!0),e.is_use==0?(openBlock(),createBlock(l,{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:e})=>[createVNode(n,{type:"primary",link:"",onClick:m=>editEvent(e)},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(t)("config")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[c,smsTableData.loading]])]),createVNode(_sfc_main$1,{ref_key:"aliyunDialog",ref:aliyunDialog,onComplete:a[0]||(a[0]=e=>loadSmsList())},null,512),createVNode(_sfc_main$2,{ref_key:"tencentDialog",ref:tencentDialog,onComplete:a[1]||(a[1]=e=>loadSmsList())},null,512)]),_:1})])}}});export{_sfc_main as default};
|