import{cO as d,L as N,a0 as O,ax as J,W as Y}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.1703796278973300.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import"./index.170379627897336.js";import"./index.170379627897333.js";import{n as w}from"./config.17037962789732.js";import{h as B}from"./moment.1703796278973.js";import"./default.1703796278973.js";import"./index.17037962789735.js";import{d as D,l as H,m as M,k as V,r as u,o as f,c as y,a as o,b as a,u as n,t as j,A,B as E,M as $,N as v}from"./vue.1703796278973.js";const ce=D({__name:"index",props:{visible:{type:Boolean,default:!1},data:{type:Object,default:()=>({})}},emits:["update:visible"],setup(s,{emit:_}){const x=s,i=H({get:()=>x.visible,set:e=>_("update:visible",e)});M(()=>i.value,e=>{e&&c({terms:[]})});const r=[{title:"ID",dataIndex:"id",key:"id",search:{type:"string"}},{title:"发送时间",dataIndex:"notifyTime",key:"notifyTime",scopedSlots:!0,search:{type:"date",handleValue:e=>e}},{title:"状态",dataIndex:"state",key:"state",scopedSlots:!0,search:{type:"select",options:[{label:"成功",value:"success"},{label:"失败",value:"error"}],handleValue:e=>e}},{title:"操作",key:"action",scopedSlots:!0}],l=V({}),c=e=>{l.value=e},h=e=>{d.info({title:"错误信息",content:v("p",{style:{maxHeight:"300px",overflowY:"auto"}},JSON.stringify(e))})},b=e=>{d.info({title:"详情信息",content:v("p",{style:{maxHeight:"300px",overflowY:"auto"}},JSON.stringify(e))})};return(e,p)=>{const g=u("pro-search"),k=N,m=u("AIcon"),S=O,C=J,T=Y;return f(),y(T,{visible:n(i),"onUpdate:visible":p[0]||(p[0]=t=>$(i)?i.value=t:null),title:"通知记录",footer:null,width:"70%"},{default:o(()=>[a(g,{type:"simple",columns:r,onSearch:c}),a(C,{ref:"logRef",model:"table",columns:r,request:t=>n(w).getHistory(t,s.data.id),defaultParams:{pageSize:5,sorts:[{name:"notifyTime",order:"desc"}],terms:[{column:"notifyType$IN",value:s.data.type}]},params:n(l),pagination:{pageSizeOptions:["5","10","20","50","100"]}},{notifyTime:o(t=>[j(A(n(B)(t.notifyTime).format("YYYY-MM-DD HH:mm:ss")),1)]),state:o(t=>[a(S,null,{default:o(()=>[a(k,{status:t.state.value,text:t.state.text},null,8,["status","text"]),t.state.value==="error"?(f(),y(m,{key:0,type:"ExclamationCircleOutlined",style:{color:"#1d39c4",cursor:"pointer"},onClick:I=>h(t.errorStack)},null,8,["onClick"])):E("",!0)]),_:2},1024)]),action:o(t=>[a(m,{type:"ExclamationCircleOutlined",style:{color:"#1d39c4",cursor:"pointer"},onClick:I=>b(t.context)},null,8,["onClick"])]),_:1},8,["request","defaultParams","params"])]),_:1},8,["visible"])}}});export{ce as _};
