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-gyz1IdHU.js";import{a as J}from"./index-CJ4Xt1FM.js";import{useListPage as W}from"./useListPage-TMORxSEa.js";import{s as Y,c as Z,_ as A}from"./ManageDrawer-DNl34vnT.js";import{h as R,u as ee}from"./index-Cy4uayzW.js";import{Q as te}from"./componentMap-0iK4HQBq.js";import oe from"./BasicTable-CgafrQwz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-Bdn0r8CG.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-BN26Feep.js";import"./useForm-DfoT2G6J.js";import"./index-zKZnG1QC.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./JAreaLinkage-CTMEfTuh.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JSelectDept-D-TUaHvK.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./JCodeEditor-U9QIstNN.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-DP4caUmw.js";import"./index-tDBMxW9-.js";import"./depart.api-B8q8MC-j.js";import"./JPopup-CVHkQZFq.js";import"./EasyCronInput-CZdChTcP.js";import"./JEllipsis-TuDc52fh.js";import"./JDictSelectTag-CalJXNVe.js";import"./JImageUpload-C5OCTlCG.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.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};
