index-Cjyob1TC.js 3.6 KB

1
  1. var u=(e,o,a)=>new Promise((l,s)=>{var d=t=>{try{r(a.next(t))}catch(n){s(n)}},i=t=>{try{r(a.throw(t))}catch(n){s(n)}},r=t=>t.done?l(t.value):Promise.resolve(t.value).then(d,i);r((a=a.apply(e,o)).next())});import{i as D}from"./index-B8miXP3d.js";import{B as A,u as T}from"./useTable-Ol_P-TxG.js";import{T as y}from"./index-BEZBHtc2.js";import{a as _,ao as k,v as S,_ as v}from"./entry/index-BOVpYCVt-1731915664217.js";import{u as I}from"./index-CwBw3p8r.js";import{C as E,c as R,s as N}from"./ChatroomMemberDrawer-BVWihcS3.js";import{P}from"./index-VCsIDtFK.js";import{M as V}from"./antd-DXvsKA0x.js";import{d as W,f as F,k as b,a9 as m,_ as C,a6 as B,a7 as p,a1 as $,G as x,a2 as L,a0 as g}from"./vue-B5pbXMv7.js";import"./ExclamationCircleOutlined-BaVgfZo1.js";import"./useForm-B-PbqzOc.js";import"./index-x2bUusKH.js";import"./tree-Nv0Zt4Ov.js";import"./copyTextToClipboard-7uPthhEV.js";import"./index-DKfaJplO.js";import"./index-EdNvCi60.js";import"./index-DTfAZuwl.js";import"./index-BcSUkfeU.js";import"./index-DaqRmjER.js";import"./useWindowSizeFn-CzjmevD7.js";import"./plugin-CRRssOeV.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C3HH8-CK.js";import"./sortable.esm-BEDva30o.js";import"./useSortable-CRwDSVfI.js";import"./contact-CQyzUgtC.js";import"./useContentViewHeight-0Tf8Jxwa.js";const O=(e,o="notice")=>_.post({url:"/wechat-api/chatroom_member/list",params:e},{errorMessageMode:o}),w=(e,o="notice")=>_.post({url:"/wechat-api/chatroom_member/delete",params:e},{errorMessageMode:o,successMessageMode:o}),U=W({name:"ChatroomMemberManagement",components:{PageWrapper:P,BasicTable:A,ChatroomMemberDrawer:E,TableAction:y,Button:k},setup(){const{t:e}=S.useI18n(),o=F(),a=F(!1),[l,{openDrawer:s}]=I(),[d,{reload:i}]=T({title:e("wechat.chatroomMember.chatroomMemberList"),api:O,immediate:!1,columns:R,formConfig:{labelWidth:120,schemas:N},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!1,clickToRowSelect:!1,actionColumn:{width:30,title:e("common.action"),dataIndex:"action",fixed:void 0},rowKey:"id"});function r(){s(!0,{isUpdate:!1})}function t(c){s(!0,{record:c,isUpdate:!0})}function n(c){return u(this,null,function*(){(yield w({ids:[c.id]})).code===0&&(yield i())})}function f(){return u(this,null,function*(){V.confirm({title:e("common.deleteConfirm"),icon:b(D.ExclamationCircleOutlined),onOk(){return u(this,null,function*(){(yield w({ids:o.value})).code===0&&(a.value=!1,yield i())})},onCancel(){}})})}function h(){return u(this,null,function*(){})}return{t:e,registerTable:d,registerDrawer:l,handleCreate:r,handleEdit:t,handleDelete:n,handleSuccess:h,handleBatchDelete:f,showDeleteButton:a}}});function j(e,o,a,l,s,d){const i=m("Button"),r=m("TableAction"),t=m("BasicTable"),n=m("ChatroomMemberDrawer"),f=m("PageWrapper");return C(),B(f,{title:"群管理(添加好友)",contentBackground:"",content:"微信群内加好友:每天最多加3次,每次最多加10人,每次间隔时间最少2小时。",contentClass:"p-4"},{default:p(()=>[$("div",null,[b(t,{onRegister:e.registerTable},{tableTitle:p(()=>[e.showDeleteButton?(C(),B(i,{key:0,type:"primary",danger:"",preIcon:"ant-design:delete-outlined",onClick:e.handleBatchDelete},{default:p(()=>[x(L(e.t("common.delete")),1)]),_:1},8,["onClick"])):g("",!0)]),bodyCell:p(({column:h,record:c})=>[h.key==="action"?(C(),B(r,{key:0,actions:[{icon:"clarity:plus-circle-solid",onClick:e.handleEdit.bind(null,c)}]},null,8,["actions"])):g("",!0)]),_:1},8,["onRegister"]),b(n,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])])]),_:1})}const be=v(U,[["render",j],["__scopeId","data-v-99dd0583"]]);export{be as default};