1 |
- var d=(e,o,n)=>new Promise((c,r)=>{var m=a=>{try{l(n.next(a))}catch(s){r(s)}},i=a=>{try{l(n.throw(a))}catch(s){r(s)}},l=a=>a.done?c(a.value):Promise.resolve(a.value).then(m,i);l((n=n.apply(e,o)).next())});import{a as B,b as T}from"./ExclamationCircleOutlined-BaVgfZo1.js";import{b as L,aq as M,a as w,ao as _,v,ap as k,_ as S}from"./entry/index-BOVpYCVt-1731915664217.js";import{c as C}from"./components-D8HR1MvH.js";import{l as y,d as x,f as h,r as D,k as g,a9 as p,_ as b,a6 as I,a7 as u,G as O,a2 as R,a0 as P,aa as j}from"./vue-B5pbXMv7.js";import{B as $,a as V}from"./index-DaqRmjER.js";import{B as E,u as F}from"./useTable-Ol_P-TxG.js";import"./index-BEZBHtc2.js";import{M as N}from"./antd-DXvsKA0x.js";import"./index-B8miXP3d.js";import"./index-EdNvCi60.js";import"./useWindowSizeFn-CzjmevD7.js";import"./useForm-B-PbqzOc.js";import"./index-x2bUusKH.js";import"./tree-Nv0Zt4Ov.js";import"./copyTextToClipboard-7uPthhEV.js";import"./index-DKfaJplO.js";import"./index-DTfAZuwl.js";import"./index-BcSUkfeU.js";import"./plugin-CRRssOeV.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C3HH8-CK.js";import"./sortable.esm-BEDva30o.js";import"./useSortable-CRwDSVfI.js";const{t}=L(),A=[{title:t("mcms.emailLog.target"),dataIndex:"target",width:50},{title:t("mcms.emailLog.subject"),dataIndex:"subject",width:30},{title:t("mcms.emailLog.content"),dataIndex:"content",width:100},{title:t("mcms.emailLog.sendStatus"),dataIndex:"sendStatus",width:30,customRender:({record:e})=>{let o="";return e.sendStatus===1?o=t("common.successful"):o=t("common.failed"),y(C.Tag,{color:e.sendStatus===1?"green":"red"},o)}},{title:t("mcms.emailLog.provider"),dataIndex:"provider",width:30},{title:t("common.createTime"),dataIndex:"createdAt",width:40,customRender:({record:e})=>M(e.createdAt)}],H=[{field:"target",label:t("mcms.emailLog.target"),component:"Input",colProps:{span:8}},{field:"subject",label:t("mcms.emailLog.subject"),component:"Input",colProps:{span:8}},{field:"provider",label:t("mcms.emailLog.provider"),component:"Input",colProps:{span:8}},{field:"sendStatus",label:t("mcms.emailLog.sendStatus"),component:"Select",colProps:{span:8},defaultValue:0,componentProps:{options:[{label:t("common.all"),value:0},{label:t("common.successful"),value:1},{label:t("common.failed"),value:2}]}}],q=(e,o="notice")=>w.post({url:"/sys-api/email_log/list",params:e},{errorMessageMode:o}),G=(e,o="notice")=>w.post({url:"/sys-api/email_log/delete",params:e},{errorMessageMode:o,successMessageMode:o}),W=x({components:{BasicModal:$,BasicTable:E,DeleteOutlined:B,Button:_},setup(){const{t:e}=v.useI18n(),o=h(),n=h(!1),{notification:c}=k(),r=D({}),[m,{reload:i}]=F({title:e("sys.task.taskList"),api:q,columns:A,formConfig:{labelWidth:120,schemas:H},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!1,clickToRowSelect:!1,rowKey:"id",rowSelection:{type:"checkbox",onChange:(s,f)=>{o.value=s,n.value=s.length>0}}}),[l]=V(s=>d(this,null,function*(){r.taskId=s.record.id}));function a(){return d(this,null,function*(){N.confirm({title:e("common.deleteConfirm"),icon:g(T),onOk(){return d(this,null,function*(){const f=yield G({ids:o.value});f.code===0&&(n.value=!1,c.success({message:e("common.successful"),description:e(f.msg),duration:3}),yield i())})},onCancel(){}})})}return{t:e,registerTable:m,showDeleteButton:n,handleBatchDelete:a,registerModal:l,searchInfo:r}}});function z(e,o,n,c,r,m){const i=p("DeleteOutlined"),l=p("Button"),a=p("BasicTable"),s=p("BasicModal");return b(),I(s,j(e.$attrs,{title:e.t("mcms.emailLog.emailLogList"),onRegister:e.registerModal,wrapperFooterOffset:50,cancelText:e.t("common.closeText"),showOkBtn:!1}),{default:u(()=>[g(a,{onRegister:e.registerTable,searchInfo:e.searchInfo,class:"tableHeight"},{tableTitle:u(()=>[e.showDeleteButton?(b(),I(l,{key:0,type:"primary",danger:"",onClick:e.handleBatchDelete},{icon:u(()=>[g(i)]),default:u(()=>[O(" "+R(e.t("common.delete")),1)]),_:1},8,["onClick"])):P("",!0)]),_:1},8,["onRegister","searchInfo"])]),_:1},16,["title","onRegister","cancelText"])}const be=S(W,[["render",z]]);export{be as default};
|