import{av as b,aw as I,ax as B}from"./index.17037962789732.js";import"./index.1703796278973300.js";import"./index.170379627897315.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{_ as D}from"./index.170379627897313.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import{n as J}from"./config.17037962789732.js";import{M,N as R}from"./const.1703796278973.js";import{d as j,k as f,m as q,r as y,o as z,x as A,b as a,z as i,a as n,y as F,u as d,j as K,A as m,t as O,F as V}from"./vue.1703796278973.js";const G={style:{height:"400px","overflow-y":"auto"}},H=["src"],L={style:{"font-size":"16px","font-weight":"600"}},Y=i("div",{class:"card-item-content-text"}," 通知方式 ",-1),$=i("div",{class:"card-item-content-text"},"说明",-1),_e=j({__name:"NotifyConfig",props:{notifyType:{type:String,default:""},value:{type:String,default:""}},emits:["update:value","change"],setup(g,{emit:c}){const p=g,h=(e,r)=>{var s;return(s=M[e].find(l=>l.value===r))==null?void 0:s.logo},x=e=>{var r;return(r=R.find(s=>s.value===e))==null?void 0:r.label},u=f({}),t=f([]),_=[{title:"名称",dataIndex:"name",key:"name",search:{type:"string"}},{title:"ID",dataIndex:"id",key:"id",search:{type:"string"}},{title:"说明",dataIndex:"description",key:"description",search:{type:"string"}}],C=e=>J.list({...e,terms:[...e==null?void 0:e.terms,{terms:[{termType:"eq",column:"type",value:p.notifyType}]}],sorts:[{name:"id",value:p.value},{name:"createTime",order:"desc"}]}),w=e=>{u.value=e},S=e=>{t.value=[...e]},T=e=>{t.value.includes(e.id)?(t.value=[],c("update:value",void 0),c("change",{provider:void 0})):(t.value=[e.id],c("update:value",e.id),c("change",{provider:e==null?void 0:e.provider}))};return q(()=>p.value,e=>{e?t.value=[e]:t.value=[]},{deep:!0,immediate:!0}),(e,r)=>{const s=y("pro-search"),l=y("Ellipsis"),v=b,k=I,N=D,E=B;return z(),A(V,null,[a(s,{columns:_,type:"simple",target:"action-notice-config",onSearch:w,class:"action-search"}),i("div",G,[a(E,{columns:_,request:C,model:"CARD",bodyStyle:{padding:0},params:d(u),gridColumn:2,rowSelection:{selectedRowKeys:d(t),onChange:S}},{card:n(o=>[a(N,F({showStatus:!1,value:o,showTool:!1,actions:[]},o,{onClick:T,active:d(t).includes(o.id)}),{img:n(()=>[K(e.$slots,"img",{},()=>[i("img",{src:h(o.type,o.provider),class:"notify-logo"},null,8,H)])]),content:n(()=>[a(l,{style:{width:"calc(100% - 100px)"}},{default:n(()=>[i("span",L,m(o.name),1)]),_:2},1024),a(k,null,{default:n(()=>[a(v,{span:12},{default:n(()=>[Y,i("div",null,m(x(o.type)),1)]),_:2},1024),a(v,{span:12},{default:n(()=>[$,a(l,null,{default:n(()=>[O(m(o.description),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1040,["value","active"])]),_:3},8,["params","rowSelection"])])],64)}}});export{_e as _};
