index-922b7fb2.js 7.9 KB

1
  1. import{d as Q,B as W,r as u,f as Z,z as ee,S as ae,o as s,c as S,i as a,w as t,a as l,F as T,C as P,j as p,T as z,m as _,D as f,k as le,t as te,G as re,H as oe,I as se,X as ne,p as pe,_ as ue,q as de,J as ie,K as ce,L as _e,M as me,__tla as fe}from"./index-1e808f2e.js";import{_ as ye,__tla as he}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{_ as we,__tla as ve}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import{_ as be,__tla as ge}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{a as F,D as y,e as Se,__tla as Te}from"./dict-a31cb4ba.js";import{d as ke,__tla as xe}from"./formatTime-a348c3be.js";import{a as Ce,d as Ve,e as Me,__tla as Ee}from"./index-de600cc0.js";import{b as Ie,__tla as Pe}from"./index-a194b225.js";import{d as Ne}from"./download-20922b56.js";import{_ as Ue,__tla as Ye}from"./SmsTemplateForm.vue_vue_type_script_setup_true_lang-d96ff905.js";import{_ as Ae,__tla as Oe}from"./SmsTemplateSendForm.vue_vue_type_script_setup_true_lang-274ee84f.js";import{u as De,__tla as He}from"./useMessage-5f9e8917.js";import{__tla as Le}from"./index-73afebcf.js";import"./color-6e929987.js";import{__tla as ze}from"./el-card-03b3588b.js";import{__tla as Fe}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./constants-e43f22dd.js";let K,Ke=Promise.all([(()=>{try{return fe}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Fe}catch{}})()]).then(async()=>{K=Q({name:"SystemSmsTemplate",__name:"index",setup(qe){const k=De(),{t:q}=W(),x=u(!1),N=u(0),U=u([]),Y=u(),r=Z({pageNo:1,pageSize:10,type:void 0,status:void 0,code:"",content:"",apiTemplateId:"",channelId:void 0,createTime:[]}),C=u(!1),V=u([]),h=async()=>{x.value=!0;try{const d=await Ce(r);U.value=d.list,N.value=d.total}finally{x.value=!1}},b=()=>{r.pageNo=1,h()},R=()=>{Y.value.resetFields(),b()},A=u(),O=(d,o)=>{A.value.open(d,o)},D=u(),j=async()=>{try{await k.exportConfirm(),C.value=!0;const d=await Me(r);Ne.excel(d,"\u77ED\u4FE1\u6A21\u677F.xls")}catch{}finally{C.value=!1}};return ee(async()=>{await h(),V.value=await Ie()}),(d,o)=>{const M=re,E=oe,i=se,H=ne,B=pe,g=ue,c=de,G=ie,L=be,n=ce,I=we,J=_e,X=ye,w=ae("hasPermi"),$=me;return s(),S(T,null,[a(L,null,{default:t(()=>[a(G,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:Y,inline:!0,"label-width":"150px"},{default:t(()=>[a(i,{label:"\u77ED\u4FE1\u7C7B\u578B",prop:"type"},{default:t(()=>[a(E,{modelValue:l(r).type,"onUpdate:modelValue":o[0]||(o[0]=e=>l(r).type=e),placeholder:"\u8BF7\u9009\u62E9\u77ED\u4FE1\u7C7B\u578B",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),S(T,null,P(l(F)(l(y).SYSTEM_SMS_TEMPLATE_TYPE),e=>(s(),p(M,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(i,{label:"\u5F00\u542F\u72B6\u6001",prop:"status"},{default:t(()=>[a(E,{modelValue:l(r).status,"onUpdate:modelValue":o[1]||(o[1]=e=>l(r).status=e),placeholder:"\u8BF7\u9009\u62E9\u5F00\u542F\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),S(T,null,P(l(F)(l(y).COMMON_STATUS),e=>(s(),p(M,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(i,{label:"\u6A21\u677F\u7F16\u7801",prop:"code"},{default:t(()=>[a(H,{modelValue:l(r).code,"onUpdate:modelValue":o[2]||(o[2]=e=>l(r).code=e),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u7F16\u7801",clearable:"",onKeyup:z(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(i,{label:"\u77ED\u4FE1 API \u7684\u6A21\u677F\u7F16\u53F7",prop:"apiTemplateId"},{default:t(()=>[a(H,{modelValue:l(r).apiTemplateId,"onUpdate:modelValue":o[3]||(o[3]=e=>l(r).apiTemplateId=e),placeholder:"\u8BF7\u8F93\u5165\u77ED\u4FE1 API \u7684\u6A21\u677F\u7F16\u53F7",clearable:"",onKeyup:z(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(i,{label:"\u77ED\u4FE1\u6E20\u9053",prop:"channelId"},{default:t(()=>[a(E,{modelValue:l(r).channelId,"onUpdate:modelValue":o[4]||(o[4]=e=>l(r).channelId=e),placeholder:"\u8BF7\u9009\u62E9\u77ED\u4FE1\u6E20\u9053",clearable:"",class:"!w-240px"},{default:t(()=>[(s(!0),S(T,null,P(l(V),e=>(s(),p(M,{key:e.id,value:e.id,label:e.signature+`\u3010 ${l(Se)(l(y).SYSTEM_SMS_CHANNEL_CODE,e.code)}\u3011`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(i,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(B,{modelValue:l(r).createTime,"onUpdate:modelValue":o[5]||(o[5]=e=>l(r).createTime=e),style:{width:"240px"},type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F",class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(i,null,{default:t(()=>[a(c,{onClick:b},{default:t(()=>[a(g,{icon:"ep:search",class:"mr-5px"}),_(" \u641C\u7D22")]),_:1}),a(c,{onClick:R},{default:t(()=>[a(g,{icon:"ep:refresh",class:"mr-5px"}),_(" \u91CD\u7F6E")]),_:1}),f((s(),p(c,{type:"primary",plain:"",onClick:o[6]||(o[6]=e=>O("create"))},{default:t(()=>[a(g,{icon:"ep:plus",class:"mr-5px"}),_("\u65B0\u589E ")]),_:1})),[[w,["system:sms-template:create"]]]),f((s(),p(c,{type:"success",plain:"",onClick:j,loading:l(C)},{default:t(()=>[a(g,{icon:"ep:download",class:"mr-5px"}),_(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[w,["system:sms-template:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(L,null,{default:t(()=>[f((s(),p(J,{data:l(U)},{default:t(()=>[a(n,{label:"\u6A21\u677F\u7F16\u7801",align:"center",prop:"code",width:"120","show-overflow-tooltip":!0}),a(n,{label:"\u6A21\u677F\u540D\u79F0",align:"center",prop:"name",width:"120","show-overflow-tooltip":!0}),a(n,{label:"\u6A21\u677F\u5185\u5BB9",align:"center",prop:"content",width:"200","show-overflow-tooltip":!0}),a(n,{label:"\u77ED\u4FE1\u7C7B\u578B",align:"center",prop:"type"},{default:t(e=>[a(I,{type:l(y).SYSTEM_SMS_TEMPLATE_TYPE,value:e.row.type},null,8,["type","value"])]),_:1}),a(n,{label:"\u72B6\u6001",align:"center",prop:"status",width:"80"},{default:t(e=>[a(I,{type:l(y).COMMON_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(n,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),a(n,{label:"\u77ED\u4FE1 API \u7684\u6A21\u677F\u7F16\u53F7",align:"center",prop:"apiTemplateId",width:"200","show-overflow-tooltip":!0}),a(n,{label:"\u77ED\u4FE1\u6E20\u9053",align:"center",width:"120"},{default:t(e=>{var v;return[le("div",null,te((v=l(V).find(m=>m.id===e.row.channelId))==null?void 0:v.signature),1),a(I,{type:l(y).SYSTEM_SMS_CHANNEL_CODE,value:e.row.channelCode},null,8,["type","value"])]}),_:1}),a(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:l(ke)},null,8,["formatter"]),a(n,{label:"\u64CD\u4F5C",align:"center",width:"210",fixed:"right"},{default:t(e=>[f((s(),p(c,{link:"",type:"primary",onClick:v=>O("update",e.row.id)},{default:t(()=>[_(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[w,["system:sms-template:update"]]]),f((s(),p(c,{link:"",type:"primary",onClick:v=>{return m=e.row.id,void D.value.open(m);var m}},{default:t(()=>[_(" \u6D4B\u8BD5 ")]),_:2},1032,["onClick"])),[[w,["system:sms-template:send-sms"]]]),f((s(),p(c,{link:"",type:"danger",onClick:v=>(async m=>{try{await k.delConfirm(),await Ve(m),k.success(q("common.delSuccess")),await h()}catch{}})(e.row.id)},{default:t(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:sms-template:delete"]]])]),_:1})]),_:1},8,["data"])),[[$,l(x)]]),a(X,{total:l(N),page:l(r).pageNo,"onUpdate:page":o[7]||(o[7]=e=>l(r).pageNo=e),limit:l(r).pageSize,"onUpdate:limit":o[8]||(o[8]=e=>l(r).pageSize=e),onPagination:h},null,8,["total","page","limit"])]),_:1}),a(Ue,{ref_key:"formRef",ref:A,onSuccess:h},null,512),a(Ae,{ref_key:"sendFormRef",ref:D},null,512)],64)}}})});export{Ke as __tla,K as default};