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-LwlFn7Y4.js";import{a as J}from"./index-CC3OF1BO.js";import{useListPage as W}from"./useListPage-BEtybUiF.js";import{s as Y,c as Z,_ as A}from"./ManageDrawer-BtwN9-L8.js";import{h as R,u as ee}from"./index-B_2CoVdl.js";import{Q as te}from"./componentMap-CzCGDP7x.js";import se from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-DAURrYyA.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./index-D2AmS0aU.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useWindowSizeFn-C3WExEpc.js";import"./JAreaLinkage-CSgDAlrn.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JSelectDept-wKz_Qtmc.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./JCodeEditor-esTLnfS3.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-YFlAniYT.js";import"./index-CkL00Q0a.js";import"./depart.api-0qTriT9h.js";import"./JPopup-BJBYqoWe.js";import"./EasyCronInput-DclSHT47.js";import"./JEllipsis-Cn7GCKHR.js";import"./JDictSelectTag-CxpDdimB.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.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};
