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.
1 line
46 KiB
1 line
46 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[54492,90282],{88996:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(24931),i=n(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},r=n(99194),o=function(e,t){return i.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:s}))};var l=i.forwardRef(o)},6309:function(e,t,n){n.d(t,{Z:function(){return y}});n(7557),n(41498);var a=n(82100),i=n.n(a),s=n(29186),r=n.n(s),o=n(13720),l=n.n(o),c=n(80619),d=n.n(c),u=n(47074),h=n.n(u),m=n(85573),f=n.n(m),p=n(59301),v=n(8591),x=n(8772),g="codeBox___WpkVl",_=n(92310),j=n.n(_),w=n(37712),N=function(e){d()(n,e);var t=h()(n);function n(e){var a;return i()(this,n),a=t.call(this,e),f()(l()(a),"canvas",void 0),f()(l()(a),"randomNum",(function(e,t){return Math.floor(Math.random()*(t-e)+e)})),f()(l()(a),"drawPic",(function(){a.randomCode()})),f()(l()(a),"reloadPic",(function(){a.drawPic()})),f()(l()(a),"changeCode",(function(e){console.log(e.target.value,222),a.setState({value:e.target.value,showError:!1})})),f()(l()(a),"onVerify",(function(){var e;return""!==a.state.value.toLowerCase()&&a.state.value.toLowerCase()!==a.state.code.toLowerCase()?(e=!0,v.ZP.error("请输入正确的验证码"),a.reloadPic()):""===a.state.value.toLowerCase()?(e=!0,v.ZP.error("请输入验证码")):a.state.value.toLowerCase()===a.state.code.toLowerCase()&&(e=!1),a.setState({showError:e}),e})),a.canvas=p.createRef(),a.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1},a}return r()(n,[{key:"componentDidMount",value:function(){this.drawPic()}},{key:"randomColor",value:function(e,t){var n=this.randomNum(e,t),a=this.randomNum(e,t),i=this.randomNum(e,t);return"rgb(".concat(n,", ").concat(a,", ").concat(i,")")}},{key:"drawText",value:function(e,t,n){e.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);var a=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);e.font=a+"px SimHei";var i=(this.state.contentWidth-40)/(this.state.code.length-1),s=10;n>0&&(s=10+n*i);var r=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);a>40&&(r=40);var o=this.randomNum(-10,10);e.translate(s,r),e.rotate(o*Math.PI/180),e.fillText(t,0,0),e.rotate(-o*Math.PI/180),e.translate(-s,-r)}},{key:"drawLine",value:function(e){for(var t=0;t<1;t++)e.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.stroke()}},{key:"drawDot",value:function(e){for(var t=0;t<100;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),e.fill()}},{key:"randomCode",value:function(){for(var e=this,t="",n=0;n<this.state.codeLength;n++){t+="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890"[Math.floor(57*Math.random())]}this.setState({code:t},(function(){var t=e.canvas.current.getContext("2d");t.textBaseline="bottom",t.fillStyle=e.randomColor(e.state.backgroundColorMin,e.state.backgroundColorMax),t.fillRect(0,0,e.state.contentWidth,e.state.contentHeight);for(var n=0;n<e.state.code.length;n++)e.drawText(t,e.state.code[n],n);e.drawLine(t),e.drawDot(t)}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.width,a=void 0===n?300:n;return(0,w.jsxs)("div",{className:j()(g,t),style:{width:a},children:[(0,w.jsx)("aside",{children:(0,w.jsx)(x.Z,{value:this.state.value,onChange:this.changeCode,placeholder:"请输入图片中的验证码"})}),(0,w.jsxs)("div",{children:[(0,w.jsx)("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),(0,w.jsx)("div",{className:"current",onClick:this.reloadPic,children:"看不清?换一张"})]})]})}}]),n}(p.Component),y=N},39019:function(e,t,n){n.r(t),n.d(t,{default:function(){return je}});var a=n(59301),i=n(7880),s=n(87876),r=n(82242),o=n.n(r),l=n(37205),c=n.n(l),d=n(7557),u=n.n(d),h=n(41498),m=n.n(h),f=n(79800),p=n.n(f),v={flex_box_center:"flex_box_center___Oy3Ur",flex_space_between:"flex_space_between___tSEQI",flex_box_vertical_center:"flex_box_vertical_center___ub8YO",flex_box_center_end:"flex_box_center_end___MdOG3",flex_box_column:"flex_box_column___yn_xj",wrap:"wrap___j5lSK",teacherList:"teacherList___eiRwI",list:"list___xa00z",top:"top___Cgsez",tag:"tag___J4aum",name:"name___tDF5G",num:"num___pHt23",check:"check___kslxc",center:"center___FWR7i",img:"img___xWZT8",col:"col___Wszet",bottom:"bottom___ErSvm"},x=n(6848),g=n(43418),_=n(8591),j=n(52306),w=n(95237),N=n(71418),y=n(88590),b=n(57809),S=n(90963),k=n(13281),C=n(51136),Z=n(6457),z=n(27065),E=n(7406),$="wrap___Lk1KU",O="des___NrGnB",P="row____lS7x",M="list___PEHaz",I="actionBtns___eC3BF",T="state___PF2x0",H="tag0___HB3U8",L="tag1___YmXRD",W="tag2___l3QtF",D="tag3___dBINp",B=n(42783),R=n(89918),F=n(37712),G=function(e){var t,n=e.visible,s=e.data,r=void 0===s?{}:s,l=e.onSucceed,c=void 0===l?function(){}:l,d=e.onClose,h=void 0===d?function(){}:d,f=(0,i.useParams)(),v=(0,a.useState)(!0),x=p()(v,2),w=x[0],N=x[1],y=(0,a.useState)(1),b=p()(y,2),k=b[0],E=b[1],G=(0,a.useState)(0),Y=p()(G,2),A=Y[0],X=Y[1],V=(0,a.useState)([]),q=p()(V,2),K=q[0],Q=q[1],U=(0,a.useState)({page:1,per_page:20}),J=p()(U,2),ee=J[0],te=J[1];(0,a.useEffect)((function(){n&&((0,R.tu)()?(ne(ee),E(r.tabs)):N(!1))}),[n]),console.log(r,"data");var ne=function(){var e=m()(u()().mark((function e(t){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.next=3,(0,C.ZP)("/api/graduations/".concat(f.id,"/student_tasks/review_list.json"),{method:"get",params:o()(o()({},t),{},{task_id:r.id})});case 3:0===(n=e.sent).status&&(Q((null==n?void 0:n.data)||[]),X(null==n?void 0:n.count)),N(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=m()(u()().mark((function e(t,n){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/graduations/".concat(f.id,"/").concat("通过"===n?"student_tasks":"student_tasks/not_pass",".json"),{method:"post",body:{id:t.id}});case 2:0===e.sent.status&&(_.ZP.success("操作成功"),ne(ee),c());case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),ie=[{title:"学生姓名",dataIndex:"name",ellipsis:!0,width:110,render:function(e,t){var n;return(0,F.jsx)("span",{children:null==t||null===(n=t.student)||void 0===n?void 0:n.name})}},{title:"学号",dataIndex:"student_id",ellipsis:!0,width:140,render:function(e,t){var n;return(0,F.jsx)("span",{children:(null==t||null===(n=t.student)||void 0===n?void 0:n.student_id)||"--"})}},{title:"专业",dataIndex:"major",ellipsis:!0,render:function(e,t){return(0,F.jsx)("span",{className:"c-grey-333",children:e})}},{title:"选题审核状态",dataIndex:"state",width:120,ellipsis:!0,render:function(e){return(0,F.jsxs)(F.Fragment,{children:[0===e&&(0,F.jsx)("div",{className:H,children:"待审核"}),1===e&&(0,F.jsx)("div",{className:L,children:"已通过"}),2===e&&(0,F.jsx)("div",{style:{color:"#E30000"},className:W,children:"已驳回"}),3===e&&(0,F.jsx)("div",{className:D,children:"已撤回"})]})}},{title:"申请时间",width:190,dataIndex:"time",render:function(e){return(0,F.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:(0,F.jsx)("span",{children:"操作"}),dataIndex:"action",key:"action",align:"right",width:120,render:function(e,t){return(0,F.jsx)("span",{className:I,children:0===t.state?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("span",{onClick:function(){return ae(t,"通过")},children:"通过"}),(0,F.jsx)("span",{onClick:function(){return ae(t,"驳回")},className:"ml10",children:"驳回"})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("b",{children:"通过"}),(0,F.jsx)("b",{className:"ml10",children:"驳回"})]})})}}];return(0,F.jsx)(g.Z,{centered:!0,destroyOnClose:!0,onCancel:h,open:n,footer:null,title:(0,R.tu)()?(0,F.jsx)(S.tp,{dataSource:[{id:1,name:"课题详情"},{id:2,name:"申请记录"}],value:k,onChange:function(e){return E(e)}}):"课题详情",width:1e3,afterClose:function(){te({page:1,per_page:20})},children:(0,F.jsxs)("div",{className:$,children:[1===k&&(0,F.jsxs)("div",{className:O,children:[(0,F.jsxs)("div",{className:P,style:{alignItems:"center"},children:[(0,F.jsx)("span",{children:"课题名称"}),(0,F.jsx)("span",{style:{maxWidth:(0,R.tu)()?"100%":"769px"},title:r.name,children:r.name||"--"}),(0,R.h)()&&(0,F.jsxs)("div",{className:T,children:[0===r.state&&(0,F.jsx)("div",{className:H,children:"待审核"}),1===r.state&&(0,F.jsx)("div",{className:L,children:"已通过"}),2===r.state&&(0,F.jsx)("div",{className:W,children:"已驳回"}),3===r.state&&(0,F.jsx)("div",{className:D,children:"已撤回"})]})]}),(0,F.jsxs)("div",{className:P,children:[(0,F.jsx)("span",{children:"指导老师"}),(0,F.jsx)("span",{title:r.teacher_names,children:r.teacher_names||"--"})]}),(0,F.jsxs)("div",{className:P,children:[(0,F.jsx)("span",{children:"课题适合专业"}),(0,F.jsx)("span",{title:r.major,children:r.major||"--"})]}),(0,F.jsxs)("div",{className:P,children:[(0,F.jsx)("span",{children:"课题来源"}),(0,F.jsx)("span",{title:r.source,children:r.source||"--"})]}),(0,F.jsxs)("div",{className:P,children:[(0,F.jsx)("span",{children:"课题学科方向"}),(0,F.jsx)("span",{title:r.direction,children:r.direction||"--"})]}),(0,F.jsxs)("div",{className:P,children:[(0,F.jsx)("span",{children:"课题介绍"}),(0,F.jsx)("span",{children:r.description?(0,F.jsx)(B.Z,{value:r.description}):"--"})]}),(0,F.jsx)("div",{className:M,children:null==r||null===(t=r.attachments)||void 0===t?void 0:t.map((function(e,t){return(0,F.jsx)("div",{onClick:function(){var t;(0,Z.Nd)("","".concat(z.Z.API_SERVER).concat(null==e||null===(t=e.url)||void 0===t?void 0:t.replace("disposition=inline","")))},children:e.title})}))})]}),2===k&&(0,F.jsx)(j.Z,{dataSource:K,bordered:!1,rowKey:function(e){return e.id},columns:ie,loading:w,scroll:{y:500},size:"large",onChange:function(e,t,n){ee.page=null==e?void 0:e.current,ee.per_page=null==e?void 0:e.pageSize,te(o()({},ee)),ne(ee)},pagination:{pageSize:ee.per_page,total:A,current:ee.page,showQuickJumper:!0,showSizeChanger:!0,hideOnSinglePage:!A,size:"default",pageSizeOptions:["10","20","50","100","200"],showTotal:Z.rU}}),(0,F.jsx)("div",{style:{height:"20px"}})]})})},Y=n(38270),A=n(6309),X=(0,i.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t,n=e.graduations,r=(e.dispatch,(0,i.useParams)()),l=(0,i.useSearchParams)(),d=p()(l,1)[0],h=(0,a.useState)(1),f=p()(h,2),$=f[0],O=f[1],P=(0,a.useState)(!1),M=p()(P,2),I=M[0],T=M[1],H=(0,a.useState)(0),L=p()(H,2),W=L[0],D=L[1],B=(0,a.useState)(0),R=p()(B,2),X=R[0],V=R[1],q=(0,a.useState)([]),K=p()(q,2),Q=K[0],U=K[1],J=(0,a.useState)([]),ee=p()(J,2),te=ee[0],ne=ee[1],ae=(0,a.useState)({}),ie=p()(ae,2),se=ie[0],re=ie[1],oe=(0,a.useState)({}),le=p()(oe,2),ce=le[0],de=le[1],ue=(0,a.useState)(!0),he=p()(ue,2),me=he[0],fe=he[1],pe=(0,a.useState)(!1),ve=p()(pe,2),xe=ve[0],ge=ve[1],_e=n.menus,je=(0,a.useRef)(null),we=null!=d&&d.get("state")?Number(null==d?void 0:d.get("state")):"",Ne=_e.find((function(e){return"student_selection"===e.clazz}))||{},ye=_e.find((function(e){return"student_selection"===e.clazz}))||1,be=(0,a.useState)({keyword:"",status:we,page:1,per_page:20}),Se=p()(be,2),ke=Se[0],Ce=Se[1];(0,a.useEffect)((function(){Ze(ke)}),[$]);var Ze=function(){var e=m()(u()().mark((function e(t){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),e.next=3,(0,C.ZP)("/api/graduations/".concat(null==r?void 0:r.id,"/").concat(1===$?"graduation_tasks":"student_tasks/student_list",".json"),{method:"get",params:t});case 3:0===(n=e.sent).status&&(U((null==n?void 0:n.data)||[]),D(null==n?void 0:n.count),V((null==n?void 0:n.total_count)||0)),T(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ze=[{title:"学生姓名",dataIndex:"name",ellipsis:!0,width:100,render:function(e,t){return(0,F.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,F.jsx)("span",{children:e||"--"})})}},{title:"学号",ellipsis:!0,width:100,dataIndex:"student_id",render:function(e){return(0,F.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,F.jsx)("span",{children:e||"--"})})}},{title:"专业",dataIndex:"major",ellipsis:!0,width:110,render:function(e){return(0,F.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,F.jsx)("span",{className:"c-grey-666",children:e||"--"})})}},{title:"课题名称",ellipsis:!0,dataIndex:"graduation_tasks",render:function(e){return(0,F.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,F.jsx)("span",{children:e||"--"})})}},{title:"指导老师",dataIndex:"teacher",ellipsis:!0,width:110,render:function(e){return(0,F.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,F.jsx)("span",{children:e||"--"})})}},{title:"双选状态",dataIndex:"status",width:90,render:function(e){return(0,F.jsxs)(F.Fragment,{children:[0===e&&(0,F.jsx)("div",{style:{color:"#E30000"},children:"未达成双选"}),1===e&&(0,F.jsx)("div",{children:"达成双选"})]})}},{title:"操作",dataIndex:"action",align:"right",width:90,render:function(e,t){return(0,F.jsx)("span",{onClick:m()(u()().mark((function e(){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return fe(!0),ge(2),e.next=4,(0,C.ZP)("/api/graduations/".concat(null==r?void 0:r.id,"/graduation_tasks.json"),{method:"get",params:{per_page:1e3,status:0,page:1}});case 4:0===(n=e.sent).status&&(0===t.status?ne(null==n?void 0:n.data):ne([{id:t.task_id,name:t.graduation_tasks}].concat(c()(null==n?void 0:n.data)))),fe(!1),de(o()(o()({},t),{},{save_task_id:t.task_id}));case 8:case"end":return e.stop()}}),e)}))),className:"current font14 c-light-primary",children:0===t.status?"分配课题":"变更课题"})}}],Ee=function(){var e=m()(u()().mark((function e(t,n){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),g.Z.confirm({centered:!0,title:"提示",icon:null,content:"确认取消双选?取消双选后学生需要重新进行选题,且学生在原课题提交的文档将被清空且无法恢复。",okText:"确认",cancelText:"取消",onOk:function(){var e=m()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/graduations/".concat(r.id,"/student_tasks/").concat(n.ger_id,".json"),{method:"delete"});case 2:0===e.sent.status&&(_.ZP.success("操作成功"),Ze(ke));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,F.jsxs)("div",{className:v.wrap,children:[(0,F.jsx)(k.Z,{style:{marginBottom:12},title:"学生选题",status:null==Ne?void 0:Ne.status,startAt:null==Ne?void 0:Ne.start_at,endAt:null==Ne?void 0:Ne.end_at}),(0,F.jsx)(S.YG,{value:$,tabBarExtraContent:(0,Z.QB)(null==Ne?void 0:Ne.next_start_at)&&(0,F.jsxs)(S.op,{onClick:function(){ge(3)},children:[(0,F.jsx)("i",{className:"iconfont icon-anquanshezhi font14 mr5"}),"学生选题设置"]}),dataSource:[{id:1,name:"选题列表"},{id:2,name:"学生列表"}],onChange:function(e){e!==$&&(ke.page=1,ke.keyword="",ke.status="",U([]),D(0),O(e))}}),!!X&&(0,F.jsxs)(w.Z,{align:"middle",justify:"space-between",style:{margin:"6px 0 14px 0"},children:[(0,F.jsx)(S.qp,{title:"双选状态",className:"mt20",value:ke.status,onChange:function(e){ke.status=e,ke.page=1,Ce(ke),Ze(ke)},dataSource:[{id:"",name:"全部"},{id:1,name:"达成双选"},{id:0,name:"未达成双选"}],titleWidth:56}),(0,F.jsx)(S.t7,{style:{width:329},placeholder:1===$?"请输入课题名称/指导老师进行搜索":"请输入课题名称/学生姓名/学号进行搜索",value:ke.keyword,onChange:function(e){ke.keyword=e,ke.page=1,Ce(ke),Ze(ke)}})]}),(0,F.jsx)(N.Z,{spinning:I,children:Q.length?2===$?(0,F.jsx)(j.Z,{columns:ze,dataSource:Q,pagination:!1,className:"mb30",style:{minHeight:500}}):(0,F.jsx)("div",{className:v.teacherList,children:Q.map((function(e){var t,n,a,i,s,r,l;return(0,F.jsxs)("div",{onClick:function(){re(o()(o()({},e),{},{tabs:1})),ge(1)},className:v.list,children:[(0,F.jsxs)("div",{className:v.top,children:[0===e.status&&(0,F.jsx)("div",{className:v.tag,children:"未达成双选"}),1===e.status&&(0,F.jsx)("div",{className:v.tag,style:{borderColor:"#D6F7EF",color:"#01795D"},children:"达成双选"}),(0,F.jsx)(x.Z,{title:e.name,children:(0,F.jsx)("div",{className:v.name,children:e.name})}),0===e.status&&!(null==e||!e.wait_review_count)&&(0,F.jsx)("div",{className:v.num,children:(null==e?void 0:e.wait_review_count)>99?"99+":null==e?void 0:e.wait_review_count}),(0,F.jsxs)("div",{className:v.check,onClick:function(t){t.stopPropagation(),re(o()(o()({},e),{},{tabs:2})),ge(1)},children:[(0,F.jsx)("i",{className:"iconfont icon-HISTORY font14 mr5"}),"查看选题申请"]})]}),1===e.status&&(0,F.jsxs)("div",{className:v.center,children:[(0,F.jsx)("img",{className:v.img,src:z.Z.IMG_SERVER+"/images/"+(null==e||null===(t=e.passed_student)||void 0===t?void 0:t.image_url)}),(0,F.jsxs)("div",{className:v.col,children:[(0,F.jsx)("div",{className:"c-black",title:null==e||null===(n=e.passed_student)||void 0===n?void 0:n.name,children:(0,Z.Pq)(null==e||null===(a=e.passed_student)||void 0===a?void 0:a.name,6)}),(0,F.jsx)("div",{className:"c-black",children:(null==e||null===(i=e.passed_student)||void 0===i?void 0:i.student_id)||"--"})]}),(0,F.jsxs)("div",{className:v.col,children:[(0,F.jsx)("div",{children:"专业"}),(0,F.jsx)("div",{style:{maxWidth:112},title:null==e||null===(s=e.passed_student)||void 0===s?void 0:s.major,className:"c-grey-666 multi-llipsis1e",children:(null==e||null===(r=e.passed_student)||void 0===r?void 0:r.major)||"--"})]}),(0,F.jsxs)("div",{className:v.col,children:[(0,F.jsx)("div",{children:"申请时间"}),(0,F.jsx)("div",{className:"c-black",children:(null==e||null===(l=e.passed_student)||void 0===l?void 0:l.passed_time)||"--"})]}),(0,F.jsxs)("div",{className:v.col,children:[(0,F.jsx)("div",{children:"选题审核状态"}),(0,F.jsx)("div",{className:"c-grey-333",children:null==e?void 0:e.state_name})]}),(0,F.jsx)(S.op,{onClick:function(t){return Ee(t,e)},style:{marginLeft:"auto"},children:"取消双选"})]}),(0,F.jsxs)("div",{className:v.bottom,children:[(0,F.jsxs)("div",{className:"mr30",children:[(0,F.jsx)("div",{children:"指导老师"}),(0,F.jsx)("div",{style:{maxWidth:70},title:null==e?void 0:e.teacher_names,children:(null==e?void 0:e.teacher_names)||"--"})]}),(0,F.jsxs)("div",{className:"mr30",children:[(0,F.jsx)("div",{children:"课题来源"}),(0,F.jsx)("div",{style:{maxWidth:100},title:null==e?void 0:e.source,children:(null==e?void 0:e.source)||"--"})]}),(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{children:"学科方向"}),(0,F.jsx)("div",{style:{maxWidth:180},title:null==e?void 0:e.direction,children:(null==e?void 0:e.direction)||"--"})]})]})]},e.id)}))}):(0,F.jsx)(E.Z,{customText:!X&&(1===$?(0,F.jsxs)("span",{children:["暂无选题,请先完成",(0,F.jsx)(i.Link,{to:"/graduations/".concat(r.id,"/topics"),children:"课题录入"})]}):(0,F.jsxs)("span",{children:["暂无学生,点击去",(0,F.jsx)(i.Link,{to:"/graduations/".concat(r.id,"/students"),children:"邀请学生"}),"加入毕设"]}))})}),(0,F.jsx)(y.Z,{current:ke.page,showQuickJumper:!0,showSizeChanger:!0,hideOnSinglePage:!W,pageSize:ke.per_page,className:"mb30",pageSizeOptions:["10","20","50","100","200"],total:W,showTotal:Z.rU,onChange:function(e,t){ke.page=e,ke.per_page=t,Ce(ke),Ze(ke)}}),(0,F.jsx)(G,{data:se,visible:1===xe,onClose:function(){ge(!1)},onSucceed:function(){Ze(ke)}}),(0,F.jsx)(g.Z,{centered:!0,destroyOnClose:!0,onCancel:function(){return ge(!1)},open:2===xe,title:0===ce.status?"分配课题":"变更课题",width:520,afterClose:function(){de({})},onOk:function(){var e=function(){var e=m()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/graduations/".concat(r.id,"/student_tasks/give_task.json"),{method:"post",body:{task_id:ce.task_id,student_id:ce.id}});case 2:0===e.sent.status&&(_.ZP.success("操作成功"),Ze(ke),ge(!1));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();ce.task_id===ce.save_task_id||1!==ce.status?e():g.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"变更课题",content:(0,F.jsxs)("div",{children:[(0,F.jsx)("p",{children:"该操作无法撤销。确认为该学生变更课题?变更后学生在原课题提交的文档将清空且无法恢复。"}),(0,F.jsx)("div",{children:"请输入验证码后确认变更"}),(0,F.jsx)(A.Z,{ref:function(e){return je.current=e}})]}),onOk:e})},children:(0,F.jsx)("div",{className:v.modal,children:(0,F.jsxs)(s.Z,{loading:me,children:[(0,F.jsx)("div",{className:"mb10",children:"课题"}),(0,F.jsx)(b.default,{showSearch:!0,size:"large",placeholder:"请选择课题",optionFilterProp:"children",value:ce.task_id,onChange:function(e){de(o()(o()({},ce),{},{task_id:e}))},style:{width:"100%"},children:te.map((function(e){return(0,F.jsx)(b.default.Option,{value:e.id,children:e.name},e.id)}))})]})})}),(0,F.jsx)(Y.Z,{visible:3===xe,data:o()(o()({},Ne),{},{disabled_time:null==_e||null===(t=_e[ye-1])||void 0===t?void 0:t.end_at}),onClose:function(){return ge(!1)},onSuccess:function(){ge(!1)}})]})})),V="wrap___Cl57w",q="tip___sGVnl",K="listWrap___OYoyC",Q="list___rT4Q_",U="left___b7Ykx",J="state___ZiQzs",ee="tag0___M6FYN",te="tag1___Sg8yD",ne="tag2___iT8lP",ae="tag3___jqhO2",ie="name___BNDAZ",se="info___pKNSG",re="time___jyND5",oe="right___XT6Gh",le="btn___vKu7W",ce="wrap___CkyzG",de="listWrap___d0chX",ue="list___S7Zml",he="top___FxvYM",me="box___kpIeL",fe="name___MGi0J",pe="des___VqXEd",ve="check___tTb0k",xe="bottom____2Rzh",ge=function(e){var t=e.visible,n=e.onSucceed,s=void 0===n?function(){}:n,r=e.onClose,l=void 0===r?function(){}:r,c=e.onListClick,d=(0,i.useParams)(),h=(0,a.useState)(!0),f=p()(h,2),v=f[0],j=f[1],w=(0,a.useState)(0),b=p()(w,2),k=b[0],z=b[1],$=(0,a.useState)([]),O=p()($,2),P=O[0],M=O[1],I={keyword:"",page:1,per_page:20,status:0},T=(0,a.useState)(o()({},I)),H=p()(T,2),L=H[0],W=H[1];(0,a.useEffect)((function(){t&&D(L)}),[t]);var D=function(){var e=m()(u()().mark((function e(t){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(!0),e.next=3,(0,C.ZP)("/api/graduations/".concat(d.id,"/graduation_tasks.json"),{method:"get",params:t});case 3:0===(n=e.sent).status&&(M((null==n?void 0:n.data)||[]),z(null==n?void 0:n.count)),j(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=m()(u()().mark((function e(t,n){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),g.Z.confirm({centered:!0,title:"提示",icon:null,content:"确认加入该课题?",okText:"确认",cancelText:"取消",onOk:function(){var e=m()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/graduations/".concat(d.id,"/student_tasks/").concat(n,".json"),{method:"put"});case 2:0===e.sent.status&&(_.ZP.success("申请成功"),s());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,F.jsx)(g.Z,{centered:!0,destroyOnClose:!0,onCancel:l,open:t,footer:null,title:"学生选题",width:1e3,afterClose:function(){W(o()({},I))},children:(0,F.jsxs)("div",{className:ce,children:[(0,F.jsx)(S.t7,{style:{width:329},placeholder:"请输入课题名称/指导老师进行搜索",value:L.keyword,onChange:function(e){L.keyword=e,L.page=1,W(L),D(L)},className:"mb20"}),(0,F.jsx)("div",{className:de,children:(0,F.jsx)(N.Z,{spinning:v,children:P.length?P.map((function(e){return(0,F.jsxs)("div",{onClick:function(){c(e)},className:ue,children:[(0,F.jsxs)("div",{className:he,children:[(0,F.jsxs)("div",{className:me,children:[(0,F.jsx)(x.Z,{title:e.name,children:(0,F.jsx)("div",{className:fe,children:e.name})}),(0,F.jsx)("div",{className:pe,children:(0,F.jsx)(B.Z,{showTextOnly:!0,showLines:2,value:e.description||""})})]}),(0,F.jsx)("div",{className:ve,children:(0,F.jsx)(S.op,{onClick:function(t){return R(t,e.id)},children:"申请该课题"})})]}),(0,F.jsxs)("div",{className:xe,children:[(0,F.jsxs)("div",{className:"mr30",children:[(0,F.jsx)("div",{children:"指导老师"}),(0,F.jsx)("div",{title:null==e?void 0:e.teacher_names,style:{maxWidth:70},children:(null==e?void 0:e.teacher_names)||"--"})]}),(0,F.jsxs)("div",{className:"mr30",children:[(0,F.jsx)("div",{children:"课题来源"}),(0,F.jsx)("div",{title:null==e?void 0:e.source,style:{maxWidth:100},children:(null==e?void 0:e.source)||"--"})]}),(0,F.jsxs)("div",{className:"mr30",children:[(0,F.jsx)("div",{children:"学科方向"}),(0,F.jsx)("div",{title:null==e?void 0:e.direction,style:{maxWidth:180},children:(null==e?void 0:e.direction)||"--"})]}),(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{children:"适用专业"}),(0,F.jsx)("div",{title:null==e?void 0:e.major,style:{maxWidth:140},children:(null==e?void 0:e.major)||"--"})]})]})]},e.id)})):(0,F.jsx)(E.Z,{loading:v})})}),(0,F.jsx)(y.Z,{current:L.page,hideOnSinglePage:!k,showQuickJumper:!0,className:"mb20",showSizeChanger:!0,pageSize:L.per_page,pageSizeOptions:["10","20","50","100","200"],total:k,showTotal:Z.rU,onChange:function(e,t){L.page=e,L.per_page=t,W(L),D(L)}})]})})},_e=(0,i.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t=e.graduations,n=(e.dispatch,(0,i.useParams)()),s=(0,i.useSearchParams)(),r=p()(s,1)[0],l=(0,a.useState)(!1),c=p()(l,2),d=c[0],h=c[1],f=(0,a.useState)(0),v=p()(f,2),j=v[0],b=v[1],z=(0,a.useState)(0),$=p()(z,2),O=$[0],P=$[1],M=(0,a.useState)([]),I=p()(M,2),T=I[0],H=I[1],L=(0,a.useState)({}),W=p()(L,2),D=W[0],B=W[1],R=(0,a.useState)(!1),Y=p()(R,2),A=Y[0],X=Y[1],ce=(0,a.useState)(!1),de=p()(ce,2),ue=de[0],he=de[1],me=null!=r&&r.get("state")?Number(null==r?void 0:r.get("state")):"",fe=(0,a.useState)({keyword:"",state:me,page:1,per_page:20}),pe=p()(fe,2),ve=pe[0],xe=pe[1],_e=t.menus.find((function(e){return"student_selection"===e.clazz}))||{};(0,a.useEffect)((function(){je(ve)}),[]);var je=function(){var e=m()(u()().mark((function e(t){var a;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.next=3,(0,C.ZP)("/api/graduations/".concat(null==n?void 0:n.id,"/student_tasks/checked_list.json"),{method:"get",params:t});case 3:0===(a=e.sent).status&&(H((null==a?void 0:a.data)||[]),b(null==a?void 0:a.count),P(null==a?void 0:a.total_count)),h(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=function(){var e=m()(u()().mark((function e(t,a){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),g.Z.confirm({centered:!0,title:"提示",icon:null,content:0===a.state?"确认撤回该课题申请?":"确认取消双选?取消后需要重新进行选题",okText:"确认",cancelText:"取消",onOk:function(){var e=m()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/graduations/".concat(n.id,"/student_tasks/").concat(a.id,".json"),{method:"delete"});case 2:0===e.sent.status&&(_.ZP.success("操作成功"),je(ve));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ne=!!T.length;return(0,F.jsxs)("div",{className:V,children:[2===(null==_e?void 0:_e.status)&&(0,F.jsxs)("div",{className:q,children:[(0,F.jsx)("i",{style:{paddingTop:2},className:"iconfont icon-weixiada font12 mr5"}),(0,F.jsx)("span",{children:"选题阶段已结束,若要变更课题需联系管理员手动进行变更"})]}),(0,F.jsx)(k.Z,{style:{marginBottom:12},title:"学生选题",status:null==_e?void 0:_e.status,startAt:null==_e?void 0:_e.start_at,endAt:null==_e?void 0:_e.end_at}),!!O&&(0,F.jsxs)(w.Z,{align:"middle",justify:"space-between",children:[(0,F.jsx)(S.qp,{title:"审核状态",className:"mt20",value:ve.state,onChange:function(e){ve.state=e,ve.page=1,xe(ve),je(ve)},dataSource:[{id:"",name:"全部"},{id:0,name:"待审核"},{id:1,name:"已通过"},{id:2,name:"已驳回"},{id:3,name:"已撤回"}],titleWidth:56}),2!==(null==_e?void 0:_e.status)&&(0,F.jsx)(S.op,{onClick:function(){return he(!0)},children:"点击选题"})]}),(0,F.jsx)(N.Z,{spinning:d,children:Ne?(0,F.jsx)("div",{className:K,children:T.map((function(e){return(0,F.jsxs)("div",{onClick:function(){X(!0),B(o()({},e))},className:Q,children:[(0,F.jsxs)("div",{className:U,children:[(0,F.jsxs)("div",{className:J,children:[0===e.state&&(0,F.jsx)("div",{className:ee,children:"待审核"}),1===e.state&&(0,F.jsx)("div",{className:te,children:"已通过"}),2===e.state&&(0,F.jsx)("div",{className:ne,children:"已驳回"}),3===e.state&&(0,F.jsx)("div",{className:ae,children:"已撤回"}),(0,F.jsx)(x.Z,{title:e.name,children:(0,F.jsx)("div",{className:ie,children:e.name})})]}),(0,F.jsxs)("div",{className:se,children:[(0,F.jsxs)("span",{children:["指导老师",(0,F.jsx)("span",{title:e.teacher_names,children:(0,Z.Pq)(e.teacher_names,9)})]}),(0,F.jsxs)("span",{children:["课题来源",(0,F.jsx)("span",{title:e.source,children:(0,Z.Pq)(e.source,9)})]}),(0,F.jsxs)("span",{children:["学科方向",(0,F.jsx)("span",{title:e.direction,children:(0,Z.Pq)(e.direction,9)})]})]}),(0,F.jsxs)("div",{className:re,children:["申请时间 ",e.time]})]}),[0,1].includes(null==_e?void 0:_e.status)&&(0,F.jsxs)("div",{className:oe,children:[0===e.state&&(0,F.jsx)("div",{onClick:function(t){return we(t,e)},className:le,children:"撤回申请"}),1===e.state&&(0,F.jsx)("div",{onClick:function(t){return we(t,e)},className:le,children:"取消双选"})]})]},e.id)}))}):(0,F.jsx)(E.Z,{loading:d,ButtonTwo:2!==(null==_e?void 0:_e.status)&&!O&&(0,F.jsx)(S.op,{onClick:function(){return he(!0)},children:"点击选题"})})}),(0,F.jsx)(y.Z,{current:ve.page,hideOnSinglePage:!j,showSizeChanger:!0,showQuickJumper:!0,className:"mb20",pageSizeOptions:["10","20","50","100","200"],total:j,pageSize:ve.per_page,showTotal:Z.rU,onChange:function(e,t){ve.page=e,ve.per_page=t,xe(ve),je(ve)}}),(0,F.jsx)(ge,{onClose:function(){return he(!1)},visible:ue,onListClick:function(e){B(o()({},e)),X(!0)},onSucceed:function(){je(ve),he(!1)}}),(0,F.jsx)(G,{data:D,visible:A,onClose:function(){return X(!1)},onSucceed:function(){}})]})})),je=(0,i.connect)((function(e){return{loading:e.loading,graduations:e.graduations}}))((function(e){e.graduations,e.dispatch;var t=e.loading;return(0,F.jsx)(s.Z,{style:{margin:"20px 0 0 45px"},loading:t.effects["graduations/getGraduationsDetails"],children:(0,R.tu)()?(0,F.jsx)(X,{}):(0,F.jsx)(_e,{})})}))},13281:function(e,t,n){n.d(t,{Z:function(){return u}});n(59301);var a="title___Ynb7w",i="time___dxFRB",s=n(92310),r=n.n(s),o=n(83274),l=n(99232),c=n.n(l),d=n(37712),u=function(e){var t=e.className,n=e.status,s=e.style,l=void 0===s?{}:s,u=e.startAt,h=e.endAt,m=e.title;return(0,d.jsxs)("div",{className:r()(a,t),style:l,children:[(0,d.jsx)("b",{children:m}),(0,d.jsx)(o.Z,{className:"ml10",status:n}),(0,d.jsxs)("span",{className:i,children:[(0,d.jsxs)("span",{children:["开启时间",(0,d.jsx)("span",{className:"ml10",children:u?c()(u).format("YYYY-MM-DD HH:mm"):"--"})]}),(0,d.jsxs)("span",{className:"ml30",children:["截止时间",(0,d.jsx)("span",{className:"ml10",children:h?c()(h).format("YYYY-MM-DD HH:mm"):"--"})]})]})]})}},83274:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(59301),i="tag___NEywM",s=n(92310),r=n.n(s),o=n(37712),l=function(e){var t=e.className,n=e.status;return(0,o.jsxs)(a.Fragment,{children:[0===n&&(0,o.jsx)("div",{className:r()(i,t),children:"未开始"}),1===n&&(0,o.jsx)("div",{className:r()(i,t),style:{background:"#19CB70"},children:"进行中"}),2===n&&(0,o.jsx)("div",{className:r()(i,t),style:{background:"#EE5D5D"},children:"已结束"})]})}},28103:function(e,t,n){n.d(t,{Z:function(){return m}});var a=n(92310),i=n.n(a),s=n(59301),r=n(36355),o=n(17313),l=n(83116),c=n(37613);const d=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:a,lineWidth:i,textPaddingInline:s,orientationMargin:r,verticalMarginInline:l}=e;return{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{borderBlockStart:`${i}px solid ${a}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${a}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${a}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*r+"%"},"&::after":{width:100-100*r+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*r+"%"},"&::after":{width:100*r+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:s},"&-dashed":{background:"none",borderColor:a,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var u=(0,l.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[d(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),h=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n};var m=e=>{const{getPrefixCls:t,direction:n,divider:a}=s.useContext(r.E_),{prefixCls:o,type:l="horizontal",orientation:c="center",orientationMargin:d,className:m,rootClassName:f,children:p,dashed:v,plain:x,style:g}=e,_=h(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),j=t("divider",o),[w,N]=u(j),y=c.length>0?`-${c}`:c,b=!!p,S="left"===c&&null!=d,k="right"===c&&null!=d,C=i()(j,null==a?void 0:a.className,N,`${j}-${l}`,{[`${j}-with-text`]:b,[`${j}-with-text${y}`]:b,[`${j}-dashed`]:!!v,[`${j}-plain`]:!!x,[`${j}-rtl`]:"rtl"===n,[`${j}-no-default-orientation-margin-left`]:S,[`${j}-no-default-orientation-margin-right`]:k},m,f),Z=s.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),z=Object.assign(Object.assign({},S&&{marginLeft:Z}),k&&{marginRight:Z});return w(s.createElement("div",Object.assign({className:C,style:Object.assign(Object.assign({},null==a?void 0:a.style),g)},_,{role:"separator"}),p&&"vertical"!==l&&s.createElement("span",{className:`${j}-inner-text`,style:z},p)))}},41750:function(e,t,n){n.d(t,{Z:function(){return P}});var a=n(24931),i=n(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},r=n(99194),o=function(e,t){return i.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:s}))};var l=i.forwardRef(o),c=n(92310),d=n.n(c),u=n(84957),h=n(69553),m=n(46012),f=n(290),p=n(81331),v=n(90339);function x(e,t){var n=e.disabled,a=e.prefixCls,s=e.character,r=e.characterRender,o=e.index,l=e.count,c=e.value,u=e.allowHalf,h=e.focused,m=e.onHover,f=e.onClick,v=o+1,x=new Set([a]);0===c&&0===o&&h?x.add("".concat(a,"-focused")):u&&c+.5>=v&&c<v?(x.add("".concat(a,"-half")),x.add("".concat(a,"-active")),h&&x.add("".concat(a,"-focused"))):(v<=c?x.add("".concat(a,"-full")):x.add("".concat(a,"-zero")),v===c&&h&&x.add("".concat(a,"-focused")));var g="function"==typeof s?s(e):s,_=i.createElement("li",{className:d()(Array.from(x)),ref:t},i.createElement("div",{onClick:n?null:function(e){f(e,o)},onKeyDown:n?null:function(e){e.keyCode===p.Z.ENTER&&f(e,o)},onMouseMove:n?null:function(e){m(e,o)},role:"radio","aria-checked":c>o?"true":"false","aria-posinset":o+1,"aria-setsize":l,tabIndex:n?-1:0},i.createElement("div",{className:"".concat(a,"-first")},g),i.createElement("div",{className:"".concat(a,"-second")},g)));return r&&(_=r(_,e)),_}var g=i.forwardRef(x);var _=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function j(e,t){var n,s,r=e.prefixCls,o=void 0===r?"rc-rate":r,l=e.className,c=e.defaultValue,x=e.value,j=e.count,w=void 0===j?5:j,N=e.allowHalf,y=void 0!==N&&N,b=e.allowClear,S=void 0===b||b,k=e.character,C=void 0===k?"★":k,Z=e.characterRender,z=e.disabled,E=e.direction,$=void 0===E?"ltr":E,O=e.tabIndex,P=void 0===O?0:O,M=e.autoFocus,I=e.onHoverChange,T=e.onChange,H=e.onFocus,L=e.onBlur,W=e.onKeyDown,D=e.onMouseLeave,B=(0,m.Z)(e,_),R=(s=i.useRef({}),[function(e){return s.current[e]},function(e){return function(t){s.current[e]=t}}]),F=(0,h.Z)(R,2),G=F[0],Y=F[1],A=i.useRef(null),X=function(){var e;z||(null===(e=A.current)||void 0===e||e.focus())};i.useImperativeHandle(t,(function(){return{focus:X,blur:function(){var e;z||(null===(e=A.current)||void 0===e||e.blur())}}}));var V=(0,f.Z)(c||0,{value:x}),q=(0,h.Z)(V,2),K=q[0],Q=q[1],U=(0,f.Z)(null),J=(0,h.Z)(U,2),ee=J[0],te=J[1],ne=function(e,t){var n,a,i,s,r="rtl"===$,o=e+1;if(y){var l=G(e),c=(a=function(e){var t,n,a=e.ownerDocument,i=a.body,s=a&&a.documentElement,r=e.getBoundingClientRect();return t=r.left,n=r.top,{left:t-=s.clientLeft||i.clientLeft||0,top:n-=s.clientTop||i.clientTop||0}}(n=l),i=n.ownerDocument,s=i.defaultView||i.parentWindow,a.left+=function(e){var t=e.pageXOffset,n="scrollLeft";if("number"!=typeof t){var a=e.document;"number"!=typeof(t=a.documentElement[n])&&(t=a.body[n])}return t}(s),a.left),d=l.clientWidth;(r&&t-c>d/2||!r&&t-c<d/2)&&(o-=.5)}return o},ae=function(e){Q(e),null==T||T(e)},ie=i.useState(!1),se=(0,h.Z)(ie,2),re=se[0],oe=se[1],le=i.useState(null),ce=(0,h.Z)(le,2),de=ce[0],ue=ce[1],he=function(e,t){var n=ne(t,e.pageX);n!==ee&&(ue(n),te(null)),null==I||I(n)},me=function(e){z||(ue(null),te(null),null==I||I(void 0)),e&&(null==D||D(e))},fe=function(e,t){var n=ne(t,e.pageX),a=!1;S&&(a=n===K),me(),ae(a?0:n),te(a?n:null)};i.useEffect((function(){M&&!z&&X()}),[]);var pe=new Array(w).fill(0).map((function(e,t){return i.createElement(g,{ref:Y(t),index:t,count:w,disabled:z,prefixCls:"".concat(o,"-star"),allowHalf:y,value:null===de?K:de,onClick:fe,onHover:he,key:e||t,character:C,characterRender:Z,focused:re})})),ve=d()(o,l,(n={},(0,u.Z)(n,"".concat(o,"-disabled"),z),(0,u.Z)(n,"".concat(o,"-rtl"),"rtl"===$),n));return i.createElement("ul",(0,a.Z)({className:ve,onMouseLeave:me,tabIndex:z?-1:P,onFocus:z?null:function(){oe(!0),null==H||H()},onBlur:z?null:function(){oe(!1),null==L||L()},onKeyDown:z?null:function(e){var t=e.keyCode,n="rtl"===$,a=K;t===p.Z.RIGHT&&a<w&&!n?(ae(a+=y?.5:1),e.preventDefault()):t===p.Z.LEFT&&a>0&&!n||t===p.Z.RIGHT&&a>0&&n?(ae(a-=y?.5:1),e.preventDefault()):t===p.Z.LEFT&&a<w&&n&&(ae(a+=y?.5:1),e.preventDefault()),null==W||W(e)},ref:A,role:"radiogroup"},(0,v.Z)(B,{aria:!0,data:!0,attr:!0})),pe)}var w=i.forwardRef(j),N=n(36355),y=n(6848),b=n(17313),S=n(83116),k=n(37613);const C=e=>{const{componentCls:t}=e;return{[`${t}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.starColor}`,transform:e.starHoverScale}},"&-first, &-second":{color:e.starBg,transition:`all ${e.motionDurationMid}`,userSelect:"none",[e.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:"inherit"}}}},Z=e=>({[`&-rtl${e.componentCls}`]:{direction:"rtl"}}),z=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,b.Wf)(e)),{display:"inline-block",margin:0,padding:0,color:e.starColor,fontSize:e.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${t} ${t}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),C(e)),{[`+ ${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,fontSize:e.fontSize}}),Z(e))}};var E=(0,S.Z)("Rate",(e=>{const t=(0,k.TS)(e,{});return[z(t)]}),(e=>({starColor:e.yellow6,starSize:.5*e.controlHeightLG,starHoverScale:"scale(1.1)",starBg:e.colorFillContent}))),$=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n};const O=i.forwardRef(((e,t)=>{const{prefixCls:n,className:a,rootClassName:s,style:r,tooltips:o,character:c=i.createElement(l,null)}=e,u=$(e,["prefixCls","className","rootClassName","style","tooltips","character"]),{getPrefixCls:h,direction:m,rate:f}=i.useContext(N.E_),p=h("rate",n),[v,x]=E(p),g=Object.assign(Object.assign({},null==f?void 0:f.style),r);return v(i.createElement(w,Object.assign({ref:t,character:c,characterRender:(e,t)=>{let{index:n}=t;return o?i.createElement(y.Z,{title:o[n]},e):e}},u,{className:d()(a,s,x,null==f?void 0:f.className),style:g,prefixCls:p,direction:m})))}));var P=O},31797:function(e,t,n){n.d(t,{Z:function(){return w}});var a=n(59301),i=n(56762),s=n(92343),r=n(92310),o=n.n(r),l=n(36355),c=n(87876);var d=e=>{const{value:t,formatter:n,precision:i,decimalSeparator:s,groupSeparator:r="",prefixCls:o}=e;let l;if("function"==typeof n)l=n(t);else{const e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){const e=n[1];let t=n[2]||"0",c=n[4]||"";t=t.replace(/\B(?=(\d{3})+(?!\d))/g,r),"number"==typeof i&&(c=c.padEnd(i,"0").slice(0,i>0?i:0)),c&&(c=`${s}${c}`),l=[a.createElement("span",{key:"int",className:`${o}-content-value-int`},e,t),c&&a.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},c)]}else l=e}return a.createElement("span",{className:`${o}-content-value`},l)},u=n(17313),h=n(83116),m=n(37613);const f=e=>{const{componentCls:t,marginXXS:n,padding:a,colorTextDescription:i,titleFontSize:s,colorTextHeading:r,contentFontSize:o,fontFamily:l}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,u.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:i,fontSize:s},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:r,fontSize:o,fontFamily:l,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}};var p=(0,h.Z)("Statistic",(e=>{const t=(0,m.TS)(e,{});return[f(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var v=e=>{const{prefixCls:t,className:n,rootClassName:i,style:s,valueStyle:r,value:u=0,title:h,valueRender:m,prefix:f,suffix:v,loading:x=!1,onMouseEnter:g,onMouseLeave:_,decimalSeparator:j=".",groupSeparator:w=","}=e,{getPrefixCls:N,direction:y,statistic:b}=a.useContext(l.E_),S=N("statistic",t),[k,C]=p(S),Z=a.createElement(d,Object.assign({decimalSeparator:j,groupSeparator:w,prefixCls:S},e,{value:u})),z=o()(S,{[`${S}-rtl`]:"rtl"===y},null==b?void 0:b.className,n,i,C);return k(a.createElement("div",{className:z,style:Object.assign(Object.assign({},null==b?void 0:b.style),s),onMouseEnter:g,onMouseLeave:_},h&&a.createElement("div",{className:`${S}-title`},h),a.createElement(c.Z,{paragraph:!1,loading:x,className:`${S}-skeleton`},a.createElement("div",{style:r,className:`${S}-content`},f&&a.createElement("span",{className:`${S}-content-prefix`},f),m?m(Z):Z,v&&a.createElement("span",{className:`${S}-content-suffix`},v)))))};const x=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function g(e,t){const{format:n=""}=t,a=new Date(e).getTime(),i=Date.now();return function(e,t){let n=e;const a=/\[[^\]]*]/g,i=(t.match(a)||[]).map((e=>e.slice(1,-1))),s=t.replace(a,"[]"),r=x.reduce(((e,t)=>{let[a,i]=t;if(e.includes(a)){const t=Math.floor(n/i);return n-=t*i,e.replace(new RegExp(`${a}+`,"g"),(e=>{const n=e.length;return t.toString().padStart(n,"0")}))}return e}),s);let o=0;return r.replace(a,(()=>{const e=i[o];return o+=1,e}))}(Math.max(a-i,0),n)}const _=e=>{const{value:t,format:n="HH:mm:ss",onChange:r,onFinish:o}=e,l=(0,i.Z)(),c=a.useRef(null),d=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(c.current=setInterval((()=>{l(),null==r||r(e-Date.now()),e<Date.now()&&(null==o||o(),c.current&&(clearInterval(c.current),c.current=null))}),33.333333333333336))};a.useEffect((()=>(d(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[t]);return a.createElement(v,Object.assign({},e,{valueRender:e=>(0,s.Tm)(e,{title:void 0}),formatter:(e,t)=>g(e,Object.assign(Object.assign({},t),{format:n}))}))};var j=a.memo(_);v.Countdown=j;var w=v}}]); |