1 |
- import{d as $,P as j,r as u,x as G,b as ee,a4 as ae,o as s,c as S,f as a,A as t,a as l,F as T,R as P,C as p,a5 as H,D as _,k as f,B as le,E as te,S as re,U as oe,V as se,a9 as ne,I as pe,Q as ue,J as de,W as ie,X as ce,Y as _e,Z as me,_ as fe,__tla as ye}from"./index-286756b9.js";import{_ as he,__tla as we}from"./index-ed6c67a8.js";import{_ as ve,__tla as be}from"./DictTag-f72b04ca.js";import{_ as ge,__tla as Se}from"./ContentWrap-83998678.js";import{a as L,D as y,d as Te,__tla as xe}from"./dict-82dca549.js";import{d as ke,__tla as Ce}from"./formatTime-83e416ef.js";import{a as Ve,d as Ee,e as Me,__tla as Ie}from"./index-c4bb80da.js";import{b as Pe,__tla as Ue}from"./index-10e3842c.js";import{d as Ye}from"./download-20922b56.js";import Ae,{__tla as Ne}from"./SmsTemplateForm-e017b52a.js";import De,{__tla as ze}from"./SmsTemplateSendForm-c60ba456.js";import{u as Oe,__tla as Fe}from"./useMessage-084b1e70.js";import{__tla as He}from"./index-fb47c94c.js";import"./color-6e929987.js";import{__tla as Le}from"./el-card-d3d5a654.js";import{__tla as Re}from"./Dialog-4c2de357.js";import"./constants-637baed6.js";let R,Be=Promise.all([(()=>{try{return ye}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Re}catch{}})()]).then(async()=>{R=fe($({name:"SystemSmsTemplate",__name:"index",setup(Ke){const x=Oe(),{t:B}=j(),k=u(!1),U=u(0),Y=u([]),A=u(),r=G({pageNo:1,pageSize:10,type:void 0,status:void 0,code:"",content:"",apiTemplateId:"",channelId:void 0,createTime:[]}),C=u(!1),V=u([]),h=async()=>{k.value=!0;try{const d=await Ve(r);Y.value=d.list,U.value=d.total}finally{k.value=!1}},b=()=>{r.pageNo=1,h()},K=()=>{A.value.resetFields(),b()},N=u(),D=(d,o)=>{N.value.open(d,o)},z=u(),W=async()=>{try{await x.exportConfirm(),C.value=!0;const d=await Me(r);Ye.excel(d,"\u77ED\u4FE1\u6A21\u677F.xls")}catch{}finally{C.value=!1}};return ee(async()=>{await h(),V.value=await Pe()}),(d,o)=>{const E=re,M=oe,i=se,O=ne,q=pe,g=ue,c=de,J=ie,F=ge,n=ce,I=ve,Q=_e,X=he,w=ae("hasPermi"),Z=me;return s(),S(T,null,[a(F,null,{default:t(()=>[a(J,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:A,inline:!0,"label-width":"150px"},{default:t(()=>[a(i,{label:"\u77ED\u4FE1\u7C7B\u578B",prop:"type"},{default:t(()=>[a(M,{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(L)(l(y).SYSTEM_SMS_TEMPLATE_TYPE),e=>(s(),p(E,{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(M,{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(L)(l(y).COMMON_STATUS),e=>(s(),p(E,{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(O,{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:H(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(O,{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:H(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(i,{label:"\u77ED\u4FE1\u6E20\u9053",prop:"channelId"},{default:t(()=>[a(M,{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(E,{key:e.id,value:e.id,label:e.signature+`\u3010 ${l(Te)(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(q,{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:K},{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=>D("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:W,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(F,null,{default:t(()=>[f((s(),p(Q,{data:l(Y)},{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=>D("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 z.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 x.delConfirm(),await Ee(m),x.success(B("common.delSuccess")),await h()}catch{}})(e.row.id)},{default:t(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:sms-template:delete"]]])]),_:1})]),_:1},8,["data"])),[[Z,l(k)]]),a(X,{total:l(U),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(Ae,{ref_key:"formRef",ref:N,onSuccess:h},null,512),a(De,{ref_key:"sendFormRef",ref:z},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sms/template/index.vue"]])});export{Be as __tla,R as default};
|