import{W as r,L as N,a0 as J,ax as O}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 Y}from"./template.1703796278973.js";import{h as w}from"./moment.1703796278973.js";import{d as B,l as D,m as H,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 as M,B as A,M as E,N as v}from"./vue.1703796278973.js";const ie=B({__name:"index",props:{visible:{type:Boolean,default:!1},data:{type:Object,default:()=>({})}},emits:["update:visible"],setup(i,{emit:_}){const h=i,s=D({get:()=>h.visible,set:e=>_("update:visible",e)});H(()=>s.value,e=>{e&&p({terms:[]})});const l=[{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}],c=V({}),p=e=>{c.value=e},x=e=>{r.info({title:"错误信息",content:v("p",{style:{maxHeight:"300px",overflowY:"auto"}},JSON.stringify(e))})},b=e=>{r.info({title:"详情信息",content:v("p",{style:{maxHeight:"300px",overflowY:"auto"}},JSON.stringify(e))})};return(e,m)=>{const g=u("pro-search"),k=N,d=u("AIcon"),S=J,C=O,T=r;return f(),y(T,{visible:n(s),"onUpdate:visible":m[0]||(m[0]=t=>E(s)?s.value=t:null),title:"通知记录",footer:null,width:"70%"},{default:o(()=>[a(g,{type:"simple",columns:l,onSearch:p}),a(C,{ref:"logRef",model:"table",columns:l,request:t=>n(Y).getHistory(t,i.data.id),defaultParams:{pageSize:5,sorts:[{name:"notifyTime",order:"desc"}],terms:[{column:"notifyType$IN",value:i.data.type}]},params:n(c),pagination:{pageSizeOptions:["5","10","20","50","100"]}},{notifyTime:o(t=>[j(M(n(w)(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(d,{key:0,type:"ExclamationCircleOutlined",style:{color:"#1d39c4",cursor:"pointer"},onClick:I=>x(t.errorStack)},null,8,["onClick"])):A("",!0)]),_:2},1024)]),action:o(t=>[a(d,{type:"ExclamationCircleOutlined",style:{color:"#1d39c4",cursor:"pointer"},onClick:I=>b(t.context)},null,8,["onClick"])]),_:1},8,["request","defaultParams","params"])]),_:1},8,["visible"])}}});export{ie as _};
