1 |
- var H=Object.defineProperty,V=Object.defineProperties;var X=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var z=(l,a,n)=>a in l?H(l,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[a]=n,c=(l,a)=>{for(var n in a||(a={}))$.call(a,n)&&z(l,n,a[n]);if(E)for(var n of E(a))G.call(a,n)&&z(l,n,a[n]);return l},w=(l,a)=>V(l,X(a));var d=(l,a,n)=>new Promise((p,i)=>{var o=e=>{try{u(n.next(e))}catch(v){i(v)}},r=e=>{try{u(n.throw(e))}catch(v){i(v)}},u=e=>e.done?p(e.value):Promise.resolve(e.value).then(o,r);u((n=n.apply(l,a)).next())});import{d as M,ai as L,u as C,a as U,B as I,r as y,i as t,l as s,_ as S,ce as m,cf as W,a9 as _,p as f,k as b,cg as j,da as J,d9 as N,aj as Q,bn as A,e as Y,U as R,d7 as B,d8 as K}from"./index.7b408720.js";import{g as Z,s as ee}from"./use-async.a6f6fc5b.js";import{s as ae}from"./api.3fcc5ec6.js";import{S as P}from"./index.e32c260f.js";import{P as D}from"./index.23c4bbdc.js";import{g,a as h}from"./objectUtil.ec24ceed.js";import{c as F,K as x,I as T,D as te}from"./constant.d4a76877.js";import{g as q}from"./dateUtil.a54b190f.js";import{d as O}from"./api.23702bd7.js";import{T as k}from"./index.fa357223.js";import{g as le}from"./musicUtil.3b4f332b.js";import"./searchs.b637f0d6.js";import"./dayjs.min.dc536324.js";const ne=M({name:"sms-record",props:{appKey:{type:String,required:!0}},setup(l){L(),C();const a=U({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:[]});I(()=>d(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=()=>d(this,null,function*(){try{a.loading=!0;const{data:e}=yield O(c(w(c(c({},a.pagination),a.searchForm),{appKey:l.appKey,sendMode:"SMS"}),q(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(k,{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,[h(e.clientId,new Map(Object.entries(F)))])},{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,[h(e.status,new Map(Object.entries(x)))])},{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,[h(e.group,new Map(Object.entries(T)))])},{title:"\u89E6\u53D1\u6761\u4EF6",key:"triggerCondition"},{title:"\u9519\u8BEF\u4FE1\u606F",key:"errorMsg",render:e=>t(k,{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(S,{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(S,{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(F),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(x),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(T),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(_,null,{default:()=>[t(f,{type:"primary",onClick:p},{default:()=>[b("\u641C\u7D22")]}),t(f,{type:"default",onClick:i},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(j,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(D,{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)])])}}),re=M({name:"push-record",props:{appKey:{type:String,required:!0}},setup(l){L(),C();const a=U({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,receiver:null,clientId:null,group:null,sendTime:null},dataList:[]});I(()=>d(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=()=>d(this,null,function*(){try{a.loading=!0;const{data:e}=yield O(c(w(c(c({},a.pagination),a.searchForm),{appKey:l.appKey,sendMode:"PUSH"}),q(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(k,{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,[h(e.clientId,new Map(Object.entries(F)))])},{title:"\u529F\u80FD\u6A21\u5757",key:"group",render:e=>t("div",null,[h(e.group,new Map(Object.entries(T)))])},{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(S,{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(S,{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(F),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(T),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(_,null,{default:()=>[t(f,{type:"primary",onClick:p},{default:()=>[b("\u641C\u7D22")]}),t(f,{type:"default",onClick:i},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(j,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(D,{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)])])}});function oe(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!A(l)}const se=M({name:"wechat-record",props:{appKey:{type:String,required:!0}},setup(l){L(),C();const a=U({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,clientId:null,model:null,status:null},dataList:[]});I(()=>d(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=()=>d(this,null,function*(){try{a.loading=!0;const{data:e}=yield O(w(c(c({},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",render:e=>{let v;return t(Q,null,[t(J,{labelPlacement:"left",column:1},{default:()=>[t(N,{label:"\u6D41\u7A0B\u540D\u79F0"},oe(v=h(e.sourceType,new Map(Object.entries(te))))?v:{default:()=>[v]}),t(N,{label:"\u6D41\u7A0B\u7F16\u53F7"},{default:()=>[e.wxTemplateId]}),t(N,{label:"\u7533\u8BF7\u4EBA"},{default:()=>[t(k,{content:le(e.musicSheetExtend,e.sourceType)},null)]}),t(N,{label:"\u7533\u8BF7\u65F6\u95F4"},{default:()=>[t(k,{content:e.createTime},null)]})]})])}},{title:"\u53D1\u9001\u5BF9\u8C61",key:"clientId",render:e=>t("div",null,[h(e.clientId,new Map(Object.entries(F)))])},{title:"\u529F\u80FD\u6A21\u5757",key:"group",render:e=>t("div",null,[h(e.group,new Map(Object.entries(T)))])},{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(S,{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(F),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(T),clearable:!0},null)]}),t(s,null,{default:()=>[t(_,null,{default:()=>[t(f,{type:"primary",onClick:p},{default:()=>[b("\u641C\u7D22")]}),t(f,{type:"default",onClick:i},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(j,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(D,{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)])])}}),ie=M({name:"email-record",props:{appKey:{type:String,required:!0}},setup(l){L(),C();const a=U({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{title:null,clientId:null,model:null,status:null},dataList:[]});I(()=>d(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=()=>d(this,null,function*(){try{a.loading=!0;const{data:e}=yield O(w(c(c({},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(k,{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(S,{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(F),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(T),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(_,null,{default:()=>[t(f,{type:"primary",onClick:p},{default:()=>[b("\u641C\u7D22")]}),t(f,{type:"default",onClick:i},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(j,{loading:a.loading,columns:u(),data:a.dataList,rowKey:e=>e.id,scrollX:"1400"},null),t(D,{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 ue(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!A(l)}const we=M({name:"message-template-index",setup(){const l=U({tabName:"KT",appKeyList:[],appNameList:[],messageSendMode:"SMS"}),a=y();Z(i=>{i.form.tabName&&(l.tabName=i.form.tabName,R(()=>{var o;return(o=a.value)==null?void 0:o.syncBarPosition()}))});const n=Y(),p=i=>{ee(i,"tabName",n)};return I(()=>d(this,null,function*(){const{data:i}=yield ae({page:1,rows:99,parentId:0});(i.rows||[]).forEach(r=>{l.appKeyList.push(r.appKey),l.appNameList.push(r.appName)}),R(()=>{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(B,{ref:a,type:"line",size:"large",value:l.tabName,"onUpdate:value":[o=>l.tabName=o,o=>p(o)]},ue(i=l.appKeyList.map((o,r)=>t(K,{name:o,tab:l.appNameList[r]},{default:()=>[t(B,{type:"card",size:"small",value:l.messageSendMode,"onUpdate:value":u=>l.messageSendMode=u},{default:()=>[t(K,{name:"SMS",tab:"\u77ED\u4FE1"},{default:()=>[t(ne,{appKey:o},null)]}),t(K,{name:"PUSH",tab:"\u63A8\u9001"},{default:()=>[t(re,{appKey:o},null)]}),t(K,{name:"WECHAT",tab:"\u516C\u4F17\u53F7"},{default:()=>[t(se,{appKey:o},null)]}),t(K,{name:"EMAIL",tab:"\u90AE\u4EF6"},{default:()=>[t(ie,{appKey:o},null)]})]})]})))?i:{default:()=>[i]})])])}}});export{we as default};
|