var I=Object.defineProperty,K=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var M=(e,s,t)=>s in e?I(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,b=(e,s)=>{for(var t in s||(s={}))z.call(s,t)&&M(e,t,s[t]);if(h)for(var t of h(s))F.call(s,t)&&M(e,t,s[t]);return e},B=(e,s)=>K(e,O(s));var _=(e,s,t)=>new Promise((c,n)=>{var f=r=>{try{i(t.next(r))}catch(u){n(u)}},y=r=>{try{i(t.throw(r))}catch(u){n(u)}},i=r=>r.done?c(r.value):Promise.resolve(r.value).then(f,y);i((t=t.apply(e,s)).next())});import{u as m,d as k,e as H,U as g,a2 as v,a3 as Q,k as a,af as l,ad as $,a4 as x,V as q,a6 as G}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import{a as J}from"./index-qSr7C5NQ.js";import{useListPage as W}from"./useListPage-i3Wl0_Fg.js";import{s as Y,c as Z,_ as A}from"./ManageDrawer-ZwYeuAso.js";import{h as R,u as ee}from"./index-CYriLmQo.js";import{Q as te}from"./componentMap-7D1QIeNI.js";import se from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-CxQILSKV.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./index-CF_FJn6P.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./JAreaLinkage-DFTeDmm8.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JSelectDept-DorRVguN.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./JCodeEditor-_KZ8XnNK.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-CXT54-j9.js";import"./index-BTSd5ebC.js";import"./depart.api-C9T5xfw6.js";import"./JPopup-KP1kIsae.js";import"./EasyCronInput-XK54XB3r.js";import"./JEllipsis-287cEHxd.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./injectionKey-DPVn4AgL.js";const{createConfirm:oe}=ee();var w=(e=>(e.list="/sys/message/sysMessage/list",e.delete="/sys/message/sysMessage/delete",e.deleteBatch="/sys/message/sysMessage/deleteBatch",e.exportXls="sys/message/sysMessage/exportXls",e.importXls="sys/message/sysMessage/importExcel",e.save="/sys/message/sysMessage/add",e.edit="/sys/message/sysMessage/edit",e))(w||{});const re=e=>R.get({url:"/sys/message/sysMessage/list",params:e}),ne=(e,s=!1)=>new Promise((t,c)=>{const n=()=>{t(R.delete({url:"/sys/message/sysMessage/deleteBatch",params:e},{joinParamsToUrl:!0}))};s?oe({iconType:"warning",title:"删除",content:"确定要删除吗？",onOk:()=>n(),onCancel:()=>c()}):n()});const ae=k({name:"message-manage"}),pt=k(B(b({},ae),{setup(e){const{prefixCls:s,tableContext:t}=W({designScope:"message-manage",tableProps:{title:"消息中心模板列表数据",api:re,columns:Z,formConfig:{schemas:Y}},exportConfig:{url:w.exportXls,name:"消息中心模板列表"},importConfig:{url:w.importXls,success:()=>n()}}),[c,{reload:n,setLoading:f},{rowSelection:y,selectedRowKeys:i}]=t,r=H(()=>i.value.length>0),[u,{openDrawer:S}]=J();function T(o){S(!0,{record:o})}function X(o){o&&C([o.id],!1)}function P(){return _(this,null,function*(){try{yield C(i),i.value=[]}finally{}})}function C(o,p=!0){return _(this,null,function*(){const d=m(o);if(d.length>0)try{f(!0),yield ne({ids:d.join(",")},p),yield n()}finally{f(!1)}})}function V(o){return[{label:"详情",onClick:T.bind(null,o)}]}function L(o){return[{label:"删除",color:"error",popConfirm:{title:"确认要删除吗？",confirm:X.bind(null,o)}}]}return(o,p)=>{const d=g("Icon"),N=g("a-menu-item"),U=g("a-menu"),j=g("a-button"),E=g("a-dropdown");return v(),Q("div",{class:G(m(s))},[a(m(se),{onRegister:m(c),rowSelection:m(y)},{tableTitle:l(()=>[r.value?(v(),$(E,{key:0},{overlay:l(()=>[a(U,null,{default:l(()=>[a(N,{key:"1",onClick:P},{default:l(()=>[a(d,{icon:"ant-design:delete-outlined"}),p[0]||(p[0]=x("span",null,"删除",-1))]),_:1})]),_:1})]),default:l(()=>[a(j,null,{default:l(()=>[p[1]||(p[1]=x("span",null,"批量操作",-1)),a(d,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):q("",!0)]),action:l(({record:D})=>[a(m(te),{actions:V(D),dropDownActions:L(D)},null,8,["actions","dropDownActions"])]),_:1},8,["onRegister","rowSelection"]),a(A,{onRegister:m(u)},null,8,["onRegister"])],2)}}}));export{pt as default};
