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,o,t)=>o in e?I(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,b=(e,o)=>{for(var t in o||(o={}))z.call(o,t)&&M(e,t,o[t]);if(h)for(var t of h(o))F.call(o,t)&&M(e,t,o[t]);return e},B=(e,o)=>K(e,O(o));var _=(e,o,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,o)).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-KOQNKxnC.js";import{a as J}from"./index-BjHivc1K.js";import{useListPage as W}from"./useListPage-CevWQ3ci.js";import{s as Y,c as Z,_ as A}from"./ManageDrawer-BkzECokk.js";import{h as R,u as ee}from"./index-CLZzJyTP.js";import{Q as te}from"./componentMap-DpsJvoqz.js";import oe from"./BasicTable-DUJWN3yz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-DvqyyN77.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-ByX9XNkE.js";import"./useForm-Dx3lJ3DG.js";import"./index-XZKTTfG1.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useWindowSizeFn-D9PllI8g.js";import"./JAreaLinkage-M9TGy8nY.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JSelectDept-CaEHrQp6.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./JCodeEditor-CR57XeIe.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-B36c3B5x.js";import"./index-C7yPiS0L.js";import"./depart.api-DHG2p2Yd.js";import"./JPopup-BvqhHpPl.js";import"./EasyCronInput-CWOTSpxK.js";import"./JEllipsis-C_gT_vEQ.js";import"./JDictSelectTag-CfF54ALX.js";import"./JImageUpload-BFwNYdm5.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./injectionKey-DPVn4AgL.js";const{createConfirm:se}=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,o=!1)=>new Promise((t,c)=>{const n=()=>{t(R.delete({url:"/sys/message/sysMessage/deleteBatch",params:e},{joinParamsToUrl:!0}))};o?se({iconType:"warning",title:"删除",content:"确定要删除吗？",onOk:()=>n(),onCancel:()=>c()}):n()});const ae=k({name:"message-manage"}),ct=k(B(b({},ae),{setup(e){const{prefixCls:o,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(s){S(!0,{record:s})}function X(s){s&&C([s.id],!1)}function P(){return _(this,null,function*(){try{yield C(i),i.value=[]}finally{}})}function C(s,p=!0){return _(this,null,function*(){const d=m(s);if(d.length>0)try{f(!0),yield ne({ids:d.join(",")},p),yield n()}finally{f(!1)}})}function V(s){return[{label:"详情",onClick:T.bind(null,s)}]}function L(s){return[{label:"删除",color:"error",popConfirm:{title:"确认要删除吗？",confirm:X.bind(null,s)}}]}return(s,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(o))},[a(m(oe),{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{ct as default};
