import{d as t,B as e,e as r,l as o,f as s,g as i,i as n,n as a,o as c}from"./index-d9fc8538.js";import l,{useState as m}from"react";import"react-dom";import"stream";import"string_decoder";import"events";import"timers";import"util";import"url";import"http";import"https";import"buffer";import"path";import"querystring";import"assert";import"os";import"fs";import"child_process";import"antd";import"crypto";export default function(p){var u=p.selectDialogTitle,d=void 0===u?"批量调整班级":u,f=p.request,h=p.loadingText,g=p.onSuccess,v=p.onError;p.selectUserProps;var E=t(p,["selectDialogTitle","request","loadingText","onSuccess","onError","selectUserProps"]),T=m(!1),b=T[0],y=T[1];return l.createElement(l.Fragment,null,l.createElement(e,r({},E,{onClick:function(){y(!0)}})),l.createElement(o,{onOk:function(t){return s(void 0,void 0,void 0,(function(){var e,o,s,l,m;return i(this,(function(i){switch(i.label){case 0:if(y(!1),o=(e=t||{}).baseSchoolDepts,s=e.customSchoolDepts,l=r(r({},f.params||{}),{selectUser:{deptInfoList:c(o||[],s||[])}}),!f.formatter)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,f.formatter(l)];case 2:return l=i.sent(),[3,4];case 3:return m=i.sent(),console.warn("请求中断："+m.message),[2];case 4:return n.loading({content:h||"请求中",duration:0,hasMask:!0}),[2,a.request(f.url,{method:f.method||"POST",data:l,showError:!0}).then((function(t){n.destroy(),g&&g(t)})).catch((function(t){n.destroy(),v&&v(t)}))]}}))}))},onCancel:function(){y(!1)},visible:b,selectDialogTitle:d}))}
