You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/53696.async.js

1 line
9.0 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[53696],{13261:function(e,t,n){var a=n(82242),r=n.n(a),s=(n(59301),n(93314)),l=n(3113),i=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,a=void 0===n?{}:n,c=e.styles,o=void 0===c?{}:c,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,x=e.imgStyles,m=e.loading,y=void 0!==m&&m;return(0,i.jsxs)("section",{className:"tc animated fadeIn",style:r()(r()({},{color:"#999",margin:"100px auto",visibility:y?"hidden":"visible"}),o),children:[(0,i.jsx)("img",{src:t||s,style:r()(r()({},x),{},{pointerEvents:"none",userSelect:"none"})}),(0,i.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,i.jsx)(l.ZP,r()(r()({className:f,onClick:p},a),{},{children:d})),h&&h]})}},53696:function(e,t,n){var a=n(37205),r=n.n(a),s=n(82242),l=n.n(s),i=n(7557),c=n.n(i),o=n(41498),u=n.n(o),d=n(79800),p=n.n(d),f=n(59301),h=n(51876),x=n(78241),m=n(6848),y=n(8591),g=n(43418),v=n(57809),j=n(92832),b=n(88522),w=n(61998),S=n(61186),k=n.n(S),Z=n(13261),C=n(79954),O=n(6808),_=n(37712);t.Z=(0,h.connect)((function(e){return{graduations:e.graduations}}))((function(e){e.graduations.StageSetting;var t=e.onCancel,n=e.OnOk,a=e.open,s=void 0!==a&&a,i=e.title,o=(e.dispatch,(0,h.useParams)()),d=(0,f.useState)([]),S=p()(d,2),N=S[0],I=S[1],E=x.Z.useForm(),T=p()(E,1)[0],L=(0,f.useState)({school:"",search:"",search_type:"name"}),P=p()(L,2),B=P[0],F=P[1],D=(0,f.useState)(!0),H=p()(D,2),Y=H[0],q=H[1],M=(0,f.useState)(!1),R=p()(M,2),U=R[0],V=R[1],$=(0,f.useState)(!1),z=p()($,2),K=z[0],G=z[1],W=(0,f.useState)([]),X=p()(W,2),A=X[0],J=X[1],Q=(0,f.useState)(0),ee=p()(Q,2),te=ee[0],ne=ee[1],ae=(0,f.useState)(0),re=p()(ae,2),se=re[0],le=re[1],ie=(0,f.useState)(1),ce=p()(ie,2),oe=ce[0],ue=ce[1],de=(0,f.useState)([]),pe=p()(de,2),fe=pe[0],he=pe[1],xe=(0,f.useState)(!1),me=p()(xe,2),ye=me[0],ge=me[1],ve=(0,f.useRef)(null);(0,f.useEffect)((function(){switch(i){case"添加学生":le(0);break;case"添加老师":le(1);break;default:le(null)}}),[s]),(0,f.useEffect)((function(){u()(c()().mark((function e(){var t,n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.xF)({keyword:"",per_page:9999,display_aliases:!0});case 2:n=e.sent,I(null==n||null===(t=n.schools)||void 0===t?void 0:t.map((function(e){return{label:e.name,value:e.id}})));case 4:case"end":return e.stop()}}),e)})))()}),[]);var je=[{title:"姓名",width:100,ellipsis:!0,dataIndex:"name",render:function(e){return(0,_.jsx)(m.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{style:{color:"#000"},children:e||"--"})})}},{title:"学校/单位",dataIndex:"school",ellipsis:!0,render:function(e){return(0,_.jsx)(m.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{style:{color:"#000"},children:e||"--"})})}},{title:"院系/部门",dataIndex:"department",width:130,ellipsis:!0,render:function(e){return(0,_.jsx)(m.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{style:{color:"#000"},children:e||"--"})})}},{title:"学号/工号",width:100,dataIndex:"student_number",ellipsis:!0,render:function(e,t){return(0,_.jsx)(m.Z,{placement:"topLeft",title:t.staff_id||t.student_id,children:(0,_.jsx)("span",{className:"c-grey-666",children:t.staff_id||t.student_id||"--"})})}},{title:"手机",width:110,dataIndex:"phone",ellipsis:!0,render:function(e){return(0,_.jsx)(m.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{className:"c-grey-666",children:e||"--"})})}},{title:"邮箱",dataIndex:"mail",width:120,ellipsis:!0,render:function(e){return(0,_.jsx)(m.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{className:"c-grey-666",children:e||"--"})})}},{title:"实名认证",dataIndex:"authentication",width:80,render:function(e){return e?(0,_.jsx)("span",{style:{color:"#000"},children:"是"}):"否"}},{title:"最后登录时间",dataIndex:"last_login_on",width:140,ellipsis:!0,render:function(e){return(0,_.jsx)(m.Z,{placement:"topLeft",title:e,children:(0,_.jsx)("span",{className:"c-grey-666",children:k()(e).format("YYYY-MM-DD HH:mm")})})}},{title:"状态",dataIndex:"checked",width:80,render:function(e){return e?(0,_.jsx)("span",{className:"c-green",children:"已添加"}):(0,_.jsx)("span",{className:"c-grey-333",children:"未添加"})}}],be=function(){var e=u()(c()().mark((function e(t){var n,a,r;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ve.current&&(null===(n=ve.current)||void 0===n||null===(n=n.querySelector(".ant-table-body"))||void 0===n||n.scrollTo(0,0)),ge(!0),he([]),t.search||t.school){e.next=6;break}return y.ZP.warning("请输入搜索内容"),e.abrupt("return");case 6:if(V(!0),F(t),ue(1),r=l()(l()({id:o.id},t),{},{display_aliases:!0}),0!=se){e.next=14;break}return e.next=13,(0,C.l5)(r);case 13:a=e.sent;case 14:if(1!=se){e.next=18;break}return e.next=17,(0,C.bS)(r);case 17:a=e.sent;case 18:0==a.status&&(J(a.data),ne(a.count)),V(!1);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=function(){var e=u()(c()().mark((function e(){var t,n,a,s,i,u,d,p,f,h=arguments;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.length>0&&void 0!==h[0]&&h[0],s=null===(t=ve.current)||void 0===t?void 0:t.querySelector(".ant-table-body").scrollHeight,i=null===(n=ve.current)||void 0===n?void 0:n.querySelector(".ant-table-body").scrollTop,u=null===(a=ve.current)||void 0===a?void 0:a.querySelector(".ant-table-body").clientHeight,s!=i+u||!Y||U){e.next=18;break}if(V(!0),ue(oe+1),p=l()({page:oe+1,id:o.id},B),0!=se){e.next=12;break}return e.next=11,(0,C.l5)(p);case 11:d=e.sent;case 12:if(1!=se){e.next=16;break}return e.next=15,(0,C.bS)(p);case 15:d=e.sent;case 16:0==d.status&&((null===(f=d)||void 0===f||null===(f=f.data)||void 0===f?void 0:f.length)+A.length==d.count&&q(!1),J([].concat(r()(A),r()(d.data))),ne(d.count)),V(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se={selectedRowKeys:fe,onChange:function(e,t){he(e)},getCheckboxProps:function(e){return{disabled:e.checked,name:e.checked}}};return(0,_.jsxs)(g.Z,{destroyOnClose:!0,width:1200,style:{height:"613px"},open:s,confirmLoading:K,title:i,bodyStyle:{padding:"0px 25px"},onOk:u()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(fe.length>0)){e.next=11;break}return G(!0),e.next=4,n(fe);case 4:G(!1),T.resetFields(),J([]),ge(!1),he([]),e.next=12;break;case 11:y.ZP.warning("请选择添加人员");case 12:case"end":return e.stop()}}),e)}))),onCancel:function(){t(),T.resetFields(),ge(!1),J([]),he([])},children:[(0,_.jsxs)(x.Z,{layout:"inline",className:"mt10",colon:!1,form:T,initialValues:{school:"",search:"",search_type:"name"},onValuesChange:function(e,t){return F(t)},size:"large",onFinish:be,children:[(0,_.jsx)(x.Z.Item,{name:"search_type",label:"搜索类型",children:(0,_.jsxs)(v.default,{style:{width:160},children:[(0,_.jsx)(v.default.Option,{value:"name",children:"姓名"}),(0,_.jsx)(v.default.Option,{value:"phone",children:"手机号"}),(0,_.jsx)(v.default.Option,{value:"mail",children:"邮箱"})]})}),(0,_.jsx)(x.Z.Item,{name:"search",label:"搜索内容",children:(0,_.jsx)(j.Z,{allowClear:!0,style:{width:320},placeholder:"请输入搜索内容",defaultValue:""})}),(0,_.jsx)(x.Z.Item,{name:"school",label:"单位",children:(0,_.jsx)(b.Z,{options:N,style:{width:380},placeholder:"请输入单位名称",onSelect:function(e,t){console.log(e,t),T.setFieldsValue({school:t.label})},filterOption:function(e,t){return-1!==t.label.toUpperCase().indexOf(e.toUpperCase())}})}),(0,_.jsx)(x.Z.Item,{noStyle:!0,children:(0,_.jsx)(O.op,{onClick:function(){return T.submit()},size:"large",shape:"default",children:"搜索"})})]}),(0,_.jsx)("div",{onScrollCapture:function(){return we()},children:ye?(0,_.jsx)(w.Z,{className:"mt20",loading:U,showHeader:A.length>0,scroll:te>10?{y:450}:{},rowKey:"user_id",rowSelection:Se,locale:{emptyText:(0,_.jsx)(Z.Z,{customText:"未找到符合条件的数据,请重新调整您的筛选条件。"})},pagination:!1,dataSource:A,ref:ve,columns:je}):(0,_.jsx)(Z.Z,{customText:"请搜索要添加的人员"})})]})}))},88522:function(e,t,n){var a=n(92310),r=n.n(a),s=n(75440),l=n(55405),i=n(59301),c=n(53487),o=n(92343),u=n(36355),d=n(57809);const{Option:p}=d.default;function f(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const h=(e,t)=>{const{prefixCls:n,className:a,popupClassName:c,dropdownClassName:h,children:x,dataSource:m}=e,y=(0,s.Z)(x);let g;1===y.length&&(0,o.l$)(y[0])&&!f(y[0])&&([g]=y);const v=g?()=>g:void 0;let j;j=y.length&&f(y[0])?x:m?m.map((e=>{if((0,o.l$)(e))return e;switch(typeof e){case"string":return i.createElement(p,{key:e,value:e},e);case"object":{const{value:t}=e;return i.createElement(p,{key:t,value:t},e.text)}default:return}})):[];const{getPrefixCls:b}=i.useContext(u.E_),w=b("select",n);return i.createElement(d.default,Object.assign({ref:t,suffixIcon:null},(0,l.Z)(e,["dataSource","dropdownClassName"]),{prefixCls:w,popupClassName:c||h,className:r()(`${w}-auto-complete`,a),mode:d.default.SECRET_COMBOBOX_MODE_DO_NOT_USE},{getInputElement:v}),j)},x=i.forwardRef(h),m=(0,c.Z)(x);x.Option=p,x._InternalPanelDoNotUseOrYouWillBeFired=m,t.Z=x}}]);