(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[61193],{16821:function(P){P.exports={root:"root___1jk39",colorWeak:"colorWeak___1GXBB","ant-layout":"ant-layout___19Kze",globalSpin:"globalSpin___yEvTB","ant-table":"ant-table___1uqGL","ant-table-thead":"ant-table-thead___IBBb5","ant-table-tbody":"ant-table-tbody___2Rk2u",formBox:"formBox___3BeS8",menu:"menu___277jZ"}},61193:function(P,D,s){"use strict";s.r(D),s.d(D,{default:function(){return R}});var N=s(71194),f=s(50146),k=s(57663),O=s(71577),x=s(11849),Z=s(14781),b=s(23492),z=s(34792),C=s(48086),$=s(43358),j=s(34041),T=s(67294),y=s(28216),A=s(16821),W=s.n(A),G=s(41273),K=s(79508),r=s(85893),B,I,F=j.Z.Option,R=(B=(0,y.$j)(m=>{var t=m.globaldesign,e=m.commondesign,l=m.page;return{globaldesign:t,commondesign:e,page:l}}),B(I=class extends T.PureComponent{constructor(){super(...arguments);this.state={visible:!1,width:880,teacherList:[],total:0,selectList:[],selectItemList:[]},this.show=t=>{this.getTeacherList();var e=t.attr("data-useridarr")||"";e&&(this.getListById(e),this.setState({selectList:e.split(",")}))},this.updataDomCallBack=t=>{var e=this,l=e.state,n=l.selectList,i=l.teacherList,c=l.selectItemList,_=this.props,v=_.commondesign,a=_.globaldesign,d=v.Customer,o=d.element,u=d.callback,E=d.callClose,g=a.isMobile;if(g)return o.attr("data-useridarr",n.join(",")),!1;var p="",S=c.length?c:i;n.map(U=>{var h="";S.map(M=>{M.userId==U&&(h=M)}),h&&(p+=`
`).concat(h.realName||h.nickname,`
`))});var L=o.find(".customerBox");L.length?L.html(p):(o.append('
'.concat(p,"
")),L=o.find(".customerBox")),o.attr("data-useridarr",n.join(",")),o.css({height:52*n.length+6+66+20})},this.cancelEvent=()=>{var t=this,e=this.props.dispatch;e({type:"commondesign/setState",payload:{Customer:{visible:!1,callback:()=>{},callClose:()=>{}}}})},this.currentPage=1,this.pageSize=20,this.getTeacherList=()=>{var t=this,e=this.props.dispatch;e({type:"globaldesign/teacherList",payload:{currentPage:this.currentPage,pageSize:this.pageSize,usState:1},callback:l=>{var n=l.data;t.setState({teacherList:n.list,total:n.total})}})},this.getListById=t=>{var e=this,l=this.props.dispatch;l({type:"page/getListById",payload:{ids:t},callback:n=>{e.setState({selectItemList:n.data})}})}}componentDidMount(){var t=this.props,e=t.visible,l=t.element,n=t.callback,i=t.callClose,c=t.commondesign;this.setState({visible:e,callback:n}),this.show(l)}renderContent(){var t=this,e=this.state,l=e.teacherList,n=e.total,i=e.selectList,c=e.selectItemList,_=a=>{var d=i.indexOf(a.userId+"");d>-1?i.splice(d,1):i.length>=5?C.ZP.warning("\u6700\u591A\u9009\u62E9\u4E94\u4EBA"):(c.push(a),i.push(a.userId+"")),t.setState({selectItemList:[...c],selectList:[...i]})},v={current:t.currentPage,pageSize:t.pageSize,total:n,showSizeChanger:!1,onChange:(a,d)=>{t.currentPage=a,t.getTeacherList()}};return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"main",children:l.map(a=>(0,r.jsxs)("div",{className:"teacherBox ".concat(i.indexOf(a.userId+"")>-1?"teacherBoxOn":""),onClick:()=>_(a),children:[(0,r.jsx)("img",{className:"headImg",src:""+a.headPortrait}),(0,r.jsxs)("div",{className:"rightBox",children:[(0,r.jsx)("p",{className:"first",children:a.realName||a.nickname}),(0,r.jsx)("p",{children:a.loginName})]}),(0,r.jsx)("div",{className:"rightIcon",children:(0,r.jsx)(K.Z,{})})]},a.userId))}),(0,r.jsx)(b.Z,(0,x.Z)({},v))]})}render(){var t=this,e=this.state,l=e.width,n=e.selectList,i=this.props,c=i.commondesign,_=i.element,v=i.dispatch,a=i.visible,d=i.globaldesign,o=c.Customer.callback,u=()=>{if(n.length<1){C.ZP.warning("\u6700\u5C11\u9009\u62E9\u4E00\u4EBA");return}var g={};t.updataDomCallBack(g),o&&o(g),t.cancelEvent()},E=()=>{t.cancelEvent()};return(0,r.jsxs)(f.Z,{title:"\u5728\u7EBF\u5BA2\u670D",visible:a,onOk:u,width:l,onCancel:E,maskClosable:!1,className:W().menu,footer:null,children:[t.renderContent(),(0,r.jsxs)("div",{className:"footer",children:[(0,r.jsx)(O.Z,{onClick:u,type:"primary",children:"\u786E\u5B9A"}),(0,r.jsx)(O.Z,{onClick:E,children:"\u53D6\u6D88"})]})]})}})||I)}}]);