index.ce778d23.js 15 KB

1
  1. var q=Object.defineProperty,x=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var z=(l,a,n)=>a in l?q(l,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[a]=n,d=(l,a)=>{for(var n in a||(a={}))V.call(a,n)&&z(l,n,a[n]);if(j)for(var n of j(a))X.call(a,n)&&z(l,n,a[n]);return l},S=(l,a)=>x(l,H(a));var c=(l,a,n)=>new Promise((p,i)=>{var o=e=>{try{u(n.next(e))}catch(E){i(E)}},r=e=>{try{u(n.throw(e))}catch(E){i(E)}},u=e=>e.done?p(e.value):Promise.resolve(e.value).then(o,r);u((n=n.apply(l,a)).next())});import{d as w,ai as I,u as L,a as K,B as U,r as y,i as t,l as s,_ as T,ce as m,cf as W,a9 as C,p as h,k as v,cg as N,e as G,U as O,d7 as R,d8 as k,bn as J}from"./index.1121c4e8.js";import{g as Q,s as Y}from"./use-async.d0b957f3.js";import{s as Z}from"./api.66c2b040.js";import{S as P}from"./index.1ac4415f.js";import{P as _}from"./index.aea83c68.js";import{g,a as f}from"./objectUtil.ec24ceed.js";import{c as b,K as B,I as F}from"./constant.b4bfe346.js";import{g as A}from"./dateUtil.0b94c0b3.js";import{d as D}from"./api.e06af54b.js";import{T as M}from"./index.ac33b3ef.js";import"./searchs.b637f0d6.js";import"./dayjs.min.cd8da7a1.js";const $=w({name:"sms-record",props:{appKey:{type:String,required:!0}},setup(l){I(),L();const a=K({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,clientId:null,group:null,sendTime:null,status:null,receiver:null},dataList:[]});U(()=>c(this,null,function*(){r()}));const n=y(),p=()=>{var e;(e=n.value)==null||e.submit()},i=()=>{var e;(e=n.value)==null||e.reset()},o=()=>{a.pagination.page=1,r()};y([]);const r=()=>c(this,null,function*(){try{a.loading=!0;const{data:e}=yield D(d(S(d(d({},a.pagination),a.searchForm),{appKey:l.appKey,sendMode:"SMS"}),A(a.searchForm.sendTime,["sendTimeStart","sendTimeEnd"])));a.pagination.pageTotal=Number(e.total),a.dataList=e.rows||[]}catch(e){}a.loading=!1}),u=()=>[{title:"\u6807\u9898",key:"title"},{title:"\u6D88\u606F\u5185\u5BB9",key:"content",render:e=>t(M,{showContentWidth:400,content:e.content},null)},{title:"\u53D1\u9001\u65F6\u95F4",key:"sendTime"},{title:"\u53D1\u9001\u5BF9\u8C61",key:"clientId",render:e=>t("div",null,[f(e.clientId,new Map(Object.entries(b)))])},{title:"\u63A5\u6536\u4EBA\u59D3\u540D",key:"username"},{title:"\u63A5\u6536\u4EBA\u624B\u673A\u53F7",key:"receiver"},{title:"\u53D1\u9001\u5E73\u53F0",key:"senderName"},{title:"\u53D1\u9001\u72B6\u6001",key:"status",render:e=>t("div",null,[f(e.status,new Map(Object.entries(B)))])},{title:"\u8BFB\u53D6\u72B6\u6001",key:"readStatus",render:e=>t("div",null,[e.readStatus?"\u5DF2\u8BFB":"\u672A\u8BFB"])},{title:"\u529F\u80FD\u6A21\u5757",key:"group",render:e=>t("div",null,[f(e.group,new Map(Object.entries(F)))])},{title:"\u89E6\u53D1\u6761\u4EF6",key:"triggerCondition"},{title:"\u9519\u8BEF\u4FE1\u606F",key:"errorMsg",render:e=>t(M,{content:e.errorMsg},null)}];return()=>t("div",{class:"system-menu-container"},[t(P,{ref:n,model:a.searchForm,onSubmit:o,saveKey:"sms-record",onSetModel:e=>a.searchForm=e},{default:()=>[t(s,{label:"\u6807\u9898",path:"title"},{default:()=>[t(T,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:a.searchForm.title,"onUpdate:value":e=>a.searchForm.title=e,clearable:!0},null)]}),t(s,{label:"\u63A5\u6536\u4EBA\u624B\u673A\u53F7",path:"receiver"},{default:()=>[t(T,{placeholder:"\u8BF7\u8F93\u5165\u63A5\u6536\u4EBA\u624B\u673A\u53F7",value:a.searchForm.receiver,"onUpdate:value":e=>a.searchForm.receiver=e,clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u5BF9\u8C61",path:"clientId"},{default:()=>[t(m,{placeholder:"\u5168\u90E8\u53D1\u9001\u5BF9\u8C61",value:a.searchForm.clientId,"onUpdate:value":e=>a.searchForm.clientId=e,options:g(b),clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u72B6\u6001",path:"status"},{default:()=>[t(m,{placeholder:"\u5168\u90E8\u53D1\u9001\u5BF9\u8C61",value:a.searchForm.status,"onUpdate:value":e=>a.searchForm.status=e,options:g(B),clearable:!0},null)]}),t(s,{label:"\u529F\u80FD\u6A21\u5757",path:"group"},{default:()=>[t(m,{filterable:!0,placeholder:"\u5168\u90E8\u529F\u80FD\u6A21\u5757",value:a.searchForm.group,"onUpdate:value":e=>a.searchForm.group=e,options:g(F),clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u65F6\u95F4",path:"sendTime"},{default:()=>[t(W,{value:a.searchForm.sendTime,"onUpdate:value":e=>a.searchForm.sendTime=e,type:"daterange",clearable:!0,"value-format":"yyyy.MM.dd",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"},null)]}),t(s,null,{default:()=>[t(C,null,{default:()=>[t(h,{type:"primary",onClick:p},{default:()=>[v("\u641C\u7D22")]}),t(h,{type:"default",onClick:i},{default:()=>[v("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(N,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(_,{page:a.pagination.page,"onUpdate:page":e=>a.pagination.page=e,pageSize:a.pagination.rows,"onUpdate:pageSize":e=>a.pagination.rows=e,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":e=>a.pagination.pageTotal=e,onList:r,sync:!0,saveKey:"sms-record"},null)])])}}),ee=w({name:"push-record",props:{appKey:{type:String,required:!0}},setup(l){I(),L();const a=K({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,receiver:null,clientId:null,group:null,sendTime:null},dataList:[]});U(()=>c(this,null,function*(){r()}));const n=y(),p=()=>{var e;(e=n.value)==null||e.submit()},i=()=>{var e;(e=n.value)==null||e.reset()},o=()=>{a.pagination.page=1,r()};y([]);const r=()=>c(this,null,function*(){try{a.loading=!0;const{data:e}=yield D(d(S(d(d({},a.pagination),a.searchForm),{appKey:l.appKey,sendMode:"PUSH"}),A(a.searchForm.sendTime,["sendTimeStart","sendTimeEnd"])));a.pagination.pageTotal=Number(e.total),a.dataList=e.rows||[]}catch(e){}a.loading=!1}),u=()=>[{title:"\u6807\u9898",key:"title"},{title:"\u63A8\u9001\u5185\u5BB9",key:"content",render:e=>t(M,{showContentWidth:400,content:e.content},null)},{title:"\u53D1\u9001\u65F6\u95F4",key:"sendTime"},{title:"\u63A5\u6536\u4EBA\u59D3\u540D",key:"username"},{title:"\u63A5\u6536\u4EBA\u624B\u673A\u53F7",key:"receiver"},{title:"\u53D1\u9001\u5E73\u53F0",key:"senderName"},{title:"\u53D1\u9001\u5BF9\u8C61",key:"clientId",render:e=>t("div",null,[f(e.clientId,new Map(Object.entries(b)))])},{title:"\u529F\u80FD\u6A21\u5757",key:"group",render:e=>t("div",null,[f(e.group,new Map(Object.entries(F)))])},{title:"\u89E6\u53D1\u6761\u4EF6",key:"triggerCondition"}];return()=>t("div",{class:"system-menu-container"},[t(P,{ref:n,model:a.searchForm,onSubmit:o,saveKey:"push-record",onSetModel:e=>a.searchForm=e},{default:()=>[t(s,{label:"\u6807\u9898",path:"title"},{default:()=>[t(T,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:a.searchForm.title,"onUpdate:value":e=>a.searchForm.title=e,clearable:!0},null)]}),t(s,{label:"\u63A5\u6536\u4EBA\u624B\u673A\u53F7",path:"receiver"},{default:()=>[t(T,{placeholder:"\u8BF7\u8F93\u5165\u63A5\u6536\u4EBA\u624B\u673A\u53F7",value:a.searchForm.receiver,"onUpdate:value":e=>a.searchForm.receiver=e,clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u5BF9\u8C61",path:"clientId"},{default:()=>[t(m,{placeholder:"\u5168\u90E8\u53D1\u9001\u5BF9\u8C61",value:a.searchForm.clientId,"onUpdate:value":e=>a.searchForm.clientId=e,options:g(b),clearable:!0},null)]}),t(s,{label:"\u529F\u80FD\u6A21\u5757",path:"group"},{default:()=>[t(m,{filterable:!0,placeholder:"\u5168\u90E8\u529F\u80FD\u6A21\u5757",value:a.searchForm.group,"onUpdate:value":e=>a.searchForm.group=e,options:g(F),clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u65F6\u95F4",path:"sendTime"},{default:()=>[t(W,{value:a.searchForm.sendTime,"onUpdate:value":e=>a.searchForm.sendTime=e,type:"daterange",clearable:!0,"value-format":"yyyy.MM.dd",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"},null)]}),t(s,null,{default:()=>[t(C,null,{default:()=>[t(h,{type:"primary",onClick:p},{default:()=>[v("\u641C\u7D22")]}),t(h,{type:"default",onClick:i},{default:()=>[v("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(N,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(_,{page:a.pagination.page,"onUpdate:page":e=>a.pagination.page=e,pageSize:a.pagination.rows,"onUpdate:pageSize":e=>a.pagination.rows=e,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":e=>a.pagination.pageTotal=e,onList:r,sync:!0,saveKey:"push-record"},null)])])}}),ae=w({name:"wechat-record",props:{appKey:{type:String,required:!0}},setup(l){I(),L();const a=K({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,clientId:null,model:null,status:null},dataList:[]});U(()=>c(this,null,function*(){r()}));const n=y(),p=()=>{var e;(e=n.value)==null||e.submit()},i=()=>{var e;(e=n.value)==null||e.reset()},o=()=>{a.pagination.page=1,r()};y([]);const r=()=>c(this,null,function*(){try{a.loading=!0;const{data:e}=yield D(S(d(d({},a.pagination),a.searchForm),{appKey:l.appKey,sendMode:"WECHAT"}));a.pagination.pageTotal=Number(e.total),a.dataList=e.rows||[]}catch(e){}a.loading=!1}),u=()=>[{title:"\u6807\u9898",key:"title"},{title:"\u53D1\u9001\u65F6\u95F4",key:"sendTime"},{title:"\u53D1\u9001\u5E73\u53F0",key:"senderName"},{title:"\u63A5\u6536\u4EBA\u59D3\u540D",key:"username"},{title:"\u63A5\u6536\u4EBA\u624B\u673A\u53F7",key:"receiver"},{title:"\u6D88\u606F\u5185\u5BB9",key:"content",width:"600"},{title:"\u53D1\u9001\u5BF9\u8C61",key:"clientId",render:e=>t("div",null,[f(e.clientId,new Map(Object.entries(b)))])},{title:"\u529F\u80FD\u6A21\u5757",key:"group",render:e=>t("div",null,[f(e.group,new Map(Object.entries(F)))])},{title:"\u89E6\u53D1\u6761\u4EF6",key:"triggerCondition"}];return()=>t("div",{class:"system-menu-container"},[t(P,{ref:n,model:a.searchForm,onSubmit:o,saveKey:"wechat-record",onSetModel:e=>a.searchForm=e},{default:()=>[t(s,{label:"\u6807\u9898",path:"title"},{default:()=>[t(T,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:a.searchForm.title,"onUpdate:value":e=>a.searchForm.title=e,clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u5BF9\u8C61",path:"clientId"},{default:()=>[t(m,{placeholder:"\u5168\u90E8\u53D1\u9001\u5BF9\u8C61",value:a.searchForm.clientId,"onUpdate:value":e=>a.searchForm.clientId=e,options:g(b),clearable:!0},null)]}),t(s,{label:"\u529F\u80FD\u6A21\u5757",path:"model"},{default:()=>[t(m,{filterable:!0,placeholder:"\u5168\u90E8\u529F\u80FD\u6A21\u5757",value:a.searchForm.model,"onUpdate:value":e=>a.searchForm.model=e,options:g(F),clearable:!0},null)]}),t(s,null,{default:()=>[t(C,null,{default:()=>[t(h,{type:"primary",onClick:p},{default:()=>[v("\u641C\u7D22")]}),t(h,{type:"default",onClick:i},{default:()=>[v("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(N,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(_,{page:a.pagination.page,"onUpdate:page":e=>a.pagination.page=e,pageSize:a.pagination.rows,"onUpdate:pageSize":e=>a.pagination.rows=e,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":e=>a.pagination.pageTotal=e,onList:r,sync:!0,saveKey:"wechat-record"},null)])])}}),te=w({name:"email-record",props:{appKey:{type:String,required:!0}},setup(l){I(),L();const a=K({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,clientId:null,model:null,status:null},dataList:[]});U(()=>c(this,null,function*(){r()}));const n=y(),p=()=>{var e;(e=n.value)==null||e.submit()},i=()=>{var e;(e=n.value)==null||e.reset()},o=()=>{a.pagination.page=1,r()};y([]);const r=()=>c(this,null,function*(){try{a.loading=!0;const{data:e}=yield D(S(d(d({},a.pagination),a.searchForm),{appKey:l.appKey,sendMode:"EMAIL"}));a.pagination.pageTotal=Number(e.total),a.dataList=e.rows||[]}catch(e){}a.loading=!1}),u=()=>[{title:"\u6807\u9898",key:"title"},{title:"\u53D1\u9001\u65F6\u95F4",key:"sendTime"},{title:"\u53D1\u9001\u5E73\u53F0",key:"senderName"},{title:"\u6536\u4EF6\u4EBA\u5730\u5740",key:"receiver"},{title:"\u6B63\u6587",key:"content",render:e=>t(M,{showContentWidth:300,content:e.content},null)},{title:"\u89E6\u53D1\u6761\u4EF6",key:"triggerCondition"}];return()=>t("div",{class:"system-menu-container"},[t(P,{ref:n,model:a.searchForm,onSubmit:o,saveKey:"email-record",onSetModel:e=>a.searchForm=e},{default:()=>[t(s,{label:"\u6807\u9898",path:"title"},{default:()=>[t(T,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:a.searchForm.title,"onUpdate:value":e=>a.searchForm.title=e,clearable:!0},null)]}),t(s,{label:"\u53D1\u9001\u5BF9\u8C61",path:"clientId"},{default:()=>[t(m,{placeholder:"\u5168\u90E8\u53D1\u9001\u5BF9\u8C61",value:a.searchForm.clientId,"onUpdate:value":e=>a.searchForm.clientId=e,options:g(b),clearable:!0},null)]}),t(s,{label:"\u529F\u80FD\u6A21\u5757",path:"model"},{default:()=>[t(m,{filterable:!0,placeholder:"\u5168\u90E8\u529F\u80FD\u6A21\u5757",value:a.searchForm.model,"onUpdate:value":e=>a.searchForm.model=e,options:g(F),clearable:!0},null)]}),t(s,{label:"\u72B6\u6001",path:"status"},{default:()=>[t(m,{value:a.searchForm.status,"onUpdate:value":e=>a.searchForm.status=e,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}],clearable:!0},null)]}),t(s,null,{default:()=>[t(C,null,{default:()=>[t(h,{type:"primary",onClick:p},{default:()=>[v("\u641C\u7D22")]}),t(h,{type:"default",onClick:i},{default:()=>[v("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(N,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(_,{page:a.pagination.page,"onUpdate:page":e=>a.pagination.page=e,pageSize:a.pagination.rows,"onUpdate:pageSize":e=>a.pagination.rows=e,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":e=>a.pagination.pageTotal=e,onList:r,sync:!0,saveKey:"email-record"},null)])])}});function le(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!J(l)}const ve=w({name:"message-template-index",setup(){const l=K({tabName:"KT",appKeyList:[],appNameList:[],messageSendMode:"SMS"}),a=y();Q(i=>{i.form.tabName&&(l.tabName=i.form.tabName,O(()=>{var o;return(o=a.value)==null?void 0:o.syncBarPosition()}))});const n=G(),p=i=>{Y(i,"tabName",n)};return U(()=>c(this,null,function*(){const{data:i}=yield Z({page:1,rows:99,parentId:0});(i.rows||[]).forEach(r=>{l.appKeyList.push(r.appKey),l.appNameList.push(r.appName)}),O(()=>{var r;return(r=a.value)==null?void 0:r.syncBarPosition()})})),()=>{let i;return t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(R,{ref:a,type:"line",size:"large",value:l.tabName,"onUpdate:value":[o=>l.tabName=o,o=>p(o)]},le(i=l.appKeyList.map((o,r)=>t(k,{name:o,tab:l.appNameList[r]},{default:()=>[t(R,{type:"card",size:"small",value:l.messageSendMode,"onUpdate:value":u=>l.messageSendMode=u},{default:()=>[t(k,{name:"SMS",tab:"\u77ED\u4FE1"},{default:()=>[t($,{appKey:o},null)]}),t(k,{name:"PUSH",tab:"\u63A8\u9001"},{default:()=>[t(ee,{appKey:o},null)]}),t(k,{name:"WECHAT",tab:"\u516C\u4F17\u53F7"},{default:()=>[t(ae,{appKey:o},null)]}),t(k,{name:"EMAIL",tab:"\u90AE\u4EF6"},{default:()=>[t(te,{appKey:o},null)]})]})]})))?i:{default:()=>[i]})])])}}});export{ve as default};