|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9416,39483],{48689:function(e,t,n){n.d(t,{Z:function(){return s}});var a=n(87462),i=n(67294),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},l=n(43387),o=function(e,t){return i.createElement(l.Z,(0,a.Z)({},e,{ref:t,icon:r}))};var s=i.forwardRef(o)},64789:function(e,t,n){n.d(t,{Z:function(){return s}});var a=n(87462),i=n(67294),r={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"},l=n(43387),o=function(e,t){return i.createElement(l.Z,(0,a.Z)({},e,{ref:t,icon:r}))};var s=i.forwardRef(o)},25035:function(e,t,n){n.d(t,{Z:function(){return s}});var a=n(87462),i=n(67294),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},l=n(43387),o=function(e,t){return i.createElement(l.Z,(0,a.Z)({},e,{ref:t,icon:r}))};var s=i.forwardRef(o)},43409:function(e,t,n){n.r(t),n.d(t,{default:function(){return Y}});var a=n(67294),i=n(88275),r=n(4310),l=n(42122),o=n.n(l),s=n(17061),c=n.n(s),u=n(17156),d=n.n(u),f=n(27424),p=n.n(f),h=n(2453),m=n(92421),v=n(83062),g=n(71230),x=n(29427),_=n(83280),j=n(59758),b=n(84519),w=n(14446),y="File___Vzzv4",S="deletfileIcon___snNZ9",k="wrap___eGzSn",N="row___qfnoA",Z="img___Ftdlp",z=n(82749),$=n(87462),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},E=n(43387),P=function(e,t){return a.createElement(E.Z,(0,$.Z)({},e,{ref:t,icon:C}))};var I=a.forwardRef(P),R=n(85893),T=function(e){var t,n,i,r=e.visible,l=e.data,s=e.onClose,u=void 0===s?function(){}:s,f=e.sendUrl,v=(0,a.useState)([]),_=p()(v,2),$=_[0],C=_[1],E=$.map((function(e){var t;return e.response?o()(o()({},e),{},{linkProps:{download:!0},url:null==e||null===(t=e.response)||void 0===t?void 0:t.url}):e}));(0,a.useEffect)((function(){var e;r&&C((null==l||null===(e=l.attachments)||void 0===e?void 0:e.map((function(e){return{name:e.title,status:"done",linkProps:{download:!0},response:{id:e.id,url:e.url}}})))||[])}),[r]);var P={multiple:!0,withCredentials:!0,fileList:E,beforeUpload:function(e){return!(e.size/1024/1024>150)||(h.ZP.error("《".concat(e.name,"》文件无法上传。超过文件大小限制(150M)")),m.Z.LIST_IGNORE)},itemRender:function(e,t){var n;return(0,R.jsxs)(g.Z,{wrap:!1,align:"middle",justify:"space-between",className:"ant-upload-list-item ant-upload-list-item-done ".concat(y),children:[(0,R.jsxs)("a",{download:"download",onClick:function(e){var n;console.log(t,"file"),e.preventDefault(),(0,x.Nd)("","".concat(j.Z.API_SERVER).concat(null==t||null===(n=t.url)||void 0===n?void 0:n.replace("disposition=inline","")))},title:null==t?void 0:t.name,href:t.url,children:[(0,R.jsx)(I,{className:"mr10 c-grey-666"}),(0,x.tP)(null==t?void 0:t.name,35)]}),(null==t||null===(n=t.response)||void 0===n?void 0:n.id)&&(0,R.jsx)("i",{className:"iconfont icon-shanchu14 font14 ".concat(S),onClick:d()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(null==E?void 0:E.filter((function(e){return e.response.id!=t.response.id})));case 2:0==e.sent.status&&(h.ZP.success("删除成功"),C(null==E?void 0:E.filter((function(e){var n,a;return(null==e||null===(n=e.response)||void 0===n?void 0:n.id)!=(null==t||null===(a=t.response)||void 0===a?void 0:a.id)}))));case 4:case"end":return e.stop()}}),e)})))})]})},action:"".concat(j.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){var t=(0,x.uD)(e);C(t),t.every((function(e){return"uploading"!==e.status}))&&T(t)}},T=function(){var e=d()(c()().mark((function e(t){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)(f,{method:"post",body:{graduation_task_id:l.id,attachment_ids:t.filter((function(e){return"done"===e.status})).map((function(e){var t;return null==e||null===(t=e.response)||void 0===t?void 0:t.id}))}});case 2:return(n=e.sent).status,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,R.jsx)(w.Z,{centered:!0,destroyOnClose:!0,onCancel:u,open:r,footer:null,title:"任务书详情",width:620,className:"pb20",afterClose:function(){C([])},children:(0,R.jsxs)("div",{className:k,children:[(0,R.jsxs)("div",{className:N,children:[(0,R.jsx)("div",{children:"课题名称"}),(0,R.jsx)("div",{title:l.name,children:l.name})]}),(0,R.jsxs)("div",{className:N,children:[(0,R.jsx)("div",{children:"指导老师"}),(0,R.jsx)("div",{children:null!=l&&null!==(t=l.teachers)&&void 0!==t&&t.length?null==l||null===(n=l.teachers)||void 0===n||null===(i=n.map((function(e){return e.real_name})))||void 0===i?void 0:i.join("、"):"--"})]}),(0,R.jsxs)("div",{className:N,children:[(0,R.jsx)("div",{children:"课题来源"}),(0,R.jsx)("div",{children:l.source||"--"})]}),(0,R.jsxs)("div",{className:N,children:[(0,R.jsx)("div",{children:"选题学生"}),(0,R.jsx)("div",{children:l.real_name||"--"})]}),1===l.status&&(0,R.jsx)("div",{className:"".concat(Z," iconfont icon-yixiada")}),(0,R.jsx)(m.Z,o()(o()({},P),{},{children:(0,R.jsxs)(g.Z,{align:"middle",className:"mt10",children:[(0,R.jsxs)(z.op,{style:{borderRadius:2},children:[(0,R.jsx)("i",{className:"icon-shangchuan3 mr5"}),"上传文档"]}),(0,R.jsx)("div",{className:"ml10 font14",style:{color:"#5F6367"},onClick:function(e){e.stopPropagation()},children:"上传任务书,单个文档大小不超过150M"})]})})),(0,R.jsx)("div",{style:{height:"20px"}})]})})},M=(0,i.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t,n=e.graduations,r=e.dispatch,l=(0,i.useParams)(),s=(0,a.useState)([]),u=p()(s,2),f=u[0],w=u[1],y=(0,a.useState)({}),S=p()(y,2),k=S[0],N=S[1],Z=(0,a.useState)(!1),z=p()(Z,2),$=z[0],C=z[1],E=(0,a.useState)(1),P=p()(E,2),I=P[0],M=P[1],O=(0,a.useRef)(null),L=(0,a.useRef)([]),H=null===(t=location.pathname.split("/"))||void 0===t?void 0:t[3],W=n.menus.find((function(e){return e.clazz===H}))||{},B="/api/graduations/".concat(l.id,"/graduation_stages/").concat(null==W?void 0:W.id,"/submit.json"),D={multiple:!0,withCredentials:!0,fileList:f,showUploadList:!1,beforeUpload:function(e){return!(e.size/1024/1024>150)||(h.ZP.error("《".concat(e.name,"》文件无法上传。超过文件大小限制(150M)")),m.Z.LIST_IGNORE)},action:"".concat(j.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){r({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在上传中,请稍候"}});var t=(0,x.uD)(e);w(t),t.every((function(e){return"uploading"!==e.status}))&&V(t)}},V=function(){var e=d()(c()().mark((function e(t){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)(B,{method:"post",body:{graduation_task_id:O.current,attachment_ids:null===(n=t.filter((function(e){return"done"===e.status})).map((function(e){var t;return null==e||null===(t=e.response)||void 0===t?void 0:t.id})))||void 0===n?void 0:n.concat(L.current)}});case 2:0===e.sent.status&&(h.ZP.success("提交成功"),M(I+1)),w([]),O.current=null,L.current=[],r({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=[{title:"课题名称",dataIndex:"name",ellipsis:!0,render:function(e){return(0,R.jsx)(v.Z,{placement:"topLeft",title:e,children:(0,R.jsx)("span",{className:"c-grey-333",children:e||"--"})})}},{title:"指导老师",dataIndex:"teachers",width:156,ellipsis:!0,render:function(e){var t,n=null!=e&&e.length?null==e||null===(t=e.map((function(e){return e.real_name})))||void 0===t?void 0:t.join("、"):"";return(0,R.jsx)(v.Z,{placement:"topLeft",title:n,children:(0,R.jsx)("span",{className:"c-grey-333",children:n||"--"})})}},{title:"选题学生",width:156,ellipsis:!0,dataIndex:"real_name",render:function(e){return(0,R.jsx)(v.Z,{placement:"topLeft",title:e,children:(0,R.jsx)("span",{className:"c-black",children:e||"--"})})}},{title:"文档",dataIndex:"attachments",width:156,ellipsis:{showTitle:!1},render:function(e,t){var n;if(null==e||!e.length)return"--";var a,i="";null!=e&&e.length&&(i=(0,x.tP)(null==e||null===(a=e[0])||void 0===a?void 0:a.title,6));return(0,R.jsx)(v.Z,{placement:"topLeft",title:null==e||null===(n=e[0])||void 0===n?void 0:n.title,children:(0,R.jsx)("span",{onClick:function(){var t,n;(0,x.Nd)("","".concat(j.Z.API_SERVER).concat(null===(t=e[0])||void 0===t||null===(n=t.url)||void 0===n?void 0:n.replace("disposition=inline","")))},className:"current",style:{color:"#3061D0"},children:i})})}},{title:"状态",dataIndex:"status",width:90,render:function(e){return(0,R.jsxs)(R.Fragment,{children:[0===e&&(0,R.jsx)("span",{className:"c-black",children:"未下达"}),1===e&&(0,R.jsx)("span",{className:"c-black",children:"已下达"})]})}},{title:"操作",dataIndex:"action",align:"right",width:100,render:function(e,t){return(0,R.jsxs)(g.Z,{align:"middle",justify:"end",children:[(0,R.jsx)(m.Z,o()(o()({},D),{},{children:(0,R.jsx)("span",{onClick:function(){var e;O.current=t.id,L.current=null==t||null===(e=t.attachments)||void 0===e?void 0:e.map((function(e){return e.id}))},className:"current font14 c-light-primary",children:"提交"})})),(0,R.jsx)("span",{onClick:function(){C(!0),N(o()({},t))},className:"current font14 c-light-primary ml20",children:"详情"})]})}}];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(_.Z,{tags:[{id:"",name:"全部"},{id:0,name:"未下达"},{id:1,name:"已下达"}],tagsTitle:"下达状态",tagsTitleWidth:56,placeholder:"请输入课题名称进行搜索",columns:A,updateKey:I,inputWidth:222}),(0,R.jsx)(T,{visible:$,data:k,sendUrl:B,onClose:function(){C(!1),N({}),M(I+1)}})]})})),O=n(74704),L=n.n(O),H=n(861),W=n.n(H),B={flex_box_center:"flex_box_center___YhVJ8",flex_space_between:"flex_space_between___ZwNFf",flex_box_vertical_center:"flex_box_vertical_center___zVi38",flex_box_center_end:"flex_box_center_end___XiBd9",flex_box_column:"flex_box_column___wlJ_z",wrap:"wrap___btDZi",card:"card___ynWkb",title:"title___ZK2i5",teacherWrap:"teacherWrap___mwbsp",titleCol:"titleCol___Yw1us",head:"head___Eh7hH",rowWrap:"rowWrap___iqlIh",row:"row___ysuMF",name:"name___Vp5LK",btns:"btns___TQ4qx"},D=n(84567),V=n(82982),A=n(25104),F=n(36579),G=n(55733),q=n.n(G),U=n(96486),K=(0,i.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t,n=e.graduations,l=(e.dispatch,(0,i.useParams)()),o=(0,a.useState)(!0),s=p()(o,2),u=s[0],f=s[1],m=(0,a.useState)([{}]),_=p()(m,2),y=_[0],S=_[1],k=(0,a.useState)([{}]),N=p()(k,2),Z=N[0],z=N[1],$=(0,a.useState)([]),C=p()($,2),E=C[0],P=C[1],I=(0,a.useState)([]),T=p()(I,2),M=T[0],O=T[1],H=(0,a.useState)(0),G=p()(H,2),K=G[0],X=G[1],Y=(0,a.useRef)(),J=n.menus,Q=n.details,ee=J.find((function(e){return"tasks"===e.clazz}))||{};(0,a.useEffect)((function(){null!=ee&&ee.id&&te()}),[null==ee?void 0:ee.id]);var te=function(){var e=d()(c()().mark((function e(){var t,n,a,i,r,o,s,u;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.next=3,(0,b.ZP)("/api/graduations/".concat(l.id,"/graduation_stages/").concat(null==ee?void 0:ee.id,".json"),{method:"get"});case 3:0===(t=e.sent).status&&(S((null==t||null===(n=t.data)||void 0===n?void 0:n[0])||{}),P((null==t||null===(a=t.data)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.attachments)||[]),u=0,(0,U.isEmpty)(null==t||null===(r=t.data)||void 0===r?void 0:r[0])?u=1:0===(null==t||null===(o=t.data)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.status)&&(u=2),X(u)),f(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(e,t,n){var a=[];"all"===n&&e?a=E.map((function(e){return e.id})):"all"!==n&&(a=e?[].concat(W()(M),[t]):M.filter((function(e){return e!==t}))),O(a)},ae=function(){var e=d()(c()().mark((function e(t){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("txt"!==t.file_type){e.next=5;break}return e.next=3,(0,b.ZP)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 3:n=e.sent,Y.current=n;case 5:z({type:t.file_type,content:j.Z.API_SERVER+t.url});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=d()(c()().mark((function e(t){var n,a,i,r,l,o,s,u,f,p,m=arguments;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=m.length>1&&void 0!==m[1]?m[1]:[],a=null==n?void 0:n.filter((function(e){return""!=e.url})),0!=a.length){e.next=5;break}return h.ZP.warning("暂无下载文件"),e.abrupt("return");case 5:if(i=w.Z.info({width:500,icon:null,title:(0,R.jsxs)("div",{children:["正在批量导出任务文件,",(0,R.jsx)("span",{className:"c-red",children:"请勿关闭或操作当前浏览器窗口"})]}),content:(0,R.jsxs)("div",{children:["当前进度: ",(0,R.jsx)("span",{className:"c-blue",children:0}),"/",a.length]}),maskClosable:!1,className:B.modal,onOk:function(){}}),r=new(q()),l=[],o=function(){var e=d()(c()().mark((function e(t,n){var o,s,u;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(j.Z.API_SERVER+t.url,{method:"get"});case 3:return o=e.sent,e.next=6,o.blob();case 6:return s=e.sent,u=function(){var e=d()(c()().mark((function e(t){var n,a,i,o=arguments;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=o.length>1&&void 0!==o[1]?o[1]:0,(a=t.split(".")).pop(),i="".concat(a.join(""),"(").concat(n,").").concat(t.split(".").at(-1)),0==n&&l.includes(t)||l.includes(i)?u(t,n+1):(l.push(0==n?t:i),r.file(0==n?t:i,s));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=10,u(null==t?void 0:t.title);case 10:i.update({content:(0,R.jsxs)("div",{children:["当前进度: ",(0,R.jsx)("span",{className:"c-blue",children:n}),"/",a.length]})}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),h.ZP.error("".concat(null==t?void 0:t.title,"下载失败,原因:").concat(e.t0));case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t,n){return e.apply(this,arguments)}}(),!(a.length>0)){e.next=29;break}s=0,u=L()(a),e.prev=12,u.s();case 14:if((f=u.n()).done){e.next=20;break}return p=f.value,e.next=18,o(p,++s);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),u.e(e.t0);case 25:return e.prev=25,u.f(),e.finish(25);case 28:r.generateAsync({type:"blob"}).then((function(e){(0,x.FH)(t,window.URL.createObjectURL(e))}));case 29:i.destroy();case 30:case"end":return e.stop()}}),e,null,[[12,22,25,28]])})));return function(t){return e.apply(this,arguments)}}();return console.log(Z,"previewData"),(0,R.jsxs)("div",{className:B.wrap,children:[(0,R.jsx)(A.Z,{title:"任务书",status:null==ee?void 0:ee.status,startAt:null==ee?void 0:ee.start_at,endAt:null==ee?void 0:ee.end_at}),(0,R.jsxs)(r.Z,{active:!0,loading:u,children:[!!K&&(0,R.jsx)(V.Z,{customText:1===K?"当前阶段暂时无法开启,请先完成之前阶段的任务":"当前老师还未下达任务书哦"}),!K&&(0,R.jsxs)("div",{className:B.card,children:[(0,R.jsxs)(g.Z,{align:"middle",children:[(0,R.jsx)("span",{style:{color:"#5f6368"},className:"mr20 font14",children:"课题名称"}),(0,R.jsx)(v.Z,{title:null==y?void 0:y.name,children:(0,R.jsx)("span",{style:{color:"#333",fontSize:16},children:(0,x.Pq)(null==y?void 0:y.name,59)})})]}),(0,R.jsxs)("div",{className:B.title,children:[(0,R.jsx)("span",{style:{flexShrink:0,marginTop:4,color:"#5f6368"},className:"mr20",children:"指导老师"}),(0,R.jsx)("div",{className:B.teacherWrap,children:null==y||null===(t=y.teachers)||void 0===t?void 0:t.map((function(e,t){return(0,R.jsxs)("div",{className:B.titleCol,children:[(0,R.jsx)("img",{width:28,height:28,style:{borderRadius:"50%"},src:"".concat(null===j.Z||void 0===j.Z?void 0:j.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.avatar_url)}),(0,R.jsx)("span",{className:"c-grey-333 ml10 font16",children:e.real_name})]},t)}))})]}),(0,R.jsxs)("div",{className:B.head,children:[(0,R.jsx)(D.Z,{onChange:function(e){return ne(e.target.checked,null,"all")},checked:!!M.length&&M.length===E.length,indeterminate:!!M.length&&M.length!==E.length}),(0,R.jsx)("span",{className:"ml10",children:"任务书"}),!(null==M||!M.length)&&(0,R.jsxs)("span",{onClick:function(){if(M.length){var e=E.filter((function(e){return M.includes(e.id)}));ie((null==Q?void 0:Q.name)+"-任务书",e)}else h.ZP.warning("请选择文件")},style:{marginLeft:"auto"},className:"c-light-primary current",children:[(0,R.jsx)("i",{className:"iconfont icon-xiazai4 mr5 font14"}),"批量下载"]})]}),(0,R.jsx)("div",{className:B.rowWrap,children:null==E?void 0:E.map((function(e){return(0,R.jsxs)("div",{className:B.row,children:[(0,R.jsx)(D.Z,{onChange:function(t){return ne(t.target.checked,e.id)},checked:M.includes(e.id)}),(0,R.jsx)("span",{className:B.name,title:e.title,children:(0,x.tP)(e.title,60)}),(0,R.jsxs)("span",{className:B.btns,children:[(0,R.jsxs)(v.Z,{className:"mr20",title:"预览",children:[" ",(0,R.jsx)("i",{onClick:function(){return ae(e)},className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})]}),(0,R.jsxs)(v.Z,{title:"下载",children:[" ",(0,R.jsx)("i",{onClick:function(){var t;(0,x.Nd)("","".concat(j.Z.API_SERVER).concat(null===(t=e.url)||void 0===t?void 0:t.replace("disposition=inline","")))},className:"iconfont icon-xiazai4 c-light-primary current font14"})]})]})]},e.id)}))})]})]}),(0,R.jsx)(F.Z,{close:!0,data:null==Z?void 0:Z.content,type:null==Z?void 0:Z.type,hasMask:!0,monacoEditor:{value:Y.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){z({content:"",type:""})}})]})})),X=n(7),Y=(0,i.connect)((function(e){return{loading:e.loading,graduations:e.graduations}}))((function(e){e.graduations,e.dispatch;var t=e.loading;return(0,R.jsx)(r.Z,{style:{margin:"20px 0 0 45px"},loading:t.effects["graduations/getGraduationsDetails"],children:(0,X.tu)()?(0,R.jsx)(M,{}):(0,R.jsx)(K,{})})}))},83280:function(e,t,n){n.d(t,{Z:function(){return y}});var a=n(42122),i=n.n(a),r=n(17061),l=n.n(r),o=n(17156),s=n.n(o),c=n(27424),u=n.n(c),d=n(67294),f="wrap____H2XH",p=n(88275),h=n(71230),m=n(76661),v=n(82749),g=n(25104),x=n(84519),_=n(43035),j=n(82982),b=n(29427),w=n(85893),y=(0,p.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t,n,a,r=e.graduations,o=(e.dispatch,e.tags),c=e.tagsTitle,y=e.tagsTitleWidth,S=e.placeholder,k=e.columns,N=e.updateKey,Z=e.inputWidth,z=void 0===Z?214:Z,$=(0,p.useParams)(),C=(0,p.useSearchParams)(),E=u()(C,1)[0],P=(0,d.useState)(!1),I=u()(P,2),R=I[0],T=I[1],M=(0,d.useState)(0),O=u()(M,2),L=O[0],H=O[1],W=(0,d.useState)([]),B=u()(W,2),D=B[0],V=B[1],A=(0,d.useState)(!1),F=u()(A,2),G=F[0],q=F[1],U=r.menus,K=null===(t=location.pathname.split("/"))||void 0===t?void 0:t[3],X=U.find((function(e){return e.clazz===K}))||{},Y=U.find((function(e){return e.clazz===K}))||1,J=null!=E&&E.get("state")?Number(null==E?void 0:E.get("state")):"",Q=(0,d.useState)({keyword:"",status:J,page:1,limit:20}),ee=u()(Q,2),te=ee[0],ne=ee[1];(0,d.useEffect)((function(){null!=X&&X.id&&ae(te)}),[null==X?void 0:X.id,N]);var ae=function(){var e=s()(l()().mark((function e(t){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),e.next=3,(0,x.ZP)("/api/graduations/".concat($.id,"/graduation_stages/").concat(null==X?void 0:X.id,".json"),{method:"get",params:t});case 3:0===(n=e.sent).status&&(V((null==n?void 0:n.data)||[]),H(null==n?void 0:n.total_count)),T(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=[{name:"任务书",key:"tasks",notStartText:"当前阶段还未开启"},{name:"开题报告",key:"opening_report",notStartText:"当前阶段还未开启"},{name:"中期检查",key:"midterm_report",notStartText:"当前阶段还未开启"},{name:"毕业论文",key:"thesis",notStartText:"当前阶段还未开启"},{name:"毕业答辩",key:"final_defense",notStartText:"当前阶段还未开启"},{name:"论文定稿",key:"final_thesis",notStartText:"当前阶段还未开启"}],re=null==ie||null===(n=ie.find((function(e){return e.key===(null==X?void 0:X.clazz)})))||void 0===n?void 0:n.notStartText;return(0,w.jsxs)("div",{className:f,children:[(0,w.jsx)(g.Z,{title:null==X?void 0:X.name,className:"mb10",status:null==X?void 0:X.status,startAt:null==X?void 0:X.start_at,endAt:null==X?void 0:X.end_at}),(0,w.jsxs)(h.Z,{align:"middle",justify:"end",style:{height:66},children:[!(null==X||!X.status)&&(0,w.jsxs)(h.Z,{align:"middle",style:{flex:1},children:[(0,w.jsx)(v.qp,{title:c,value:te.status,onChange:function(e){te.status=e,te.page=1,ne(te),ae(te)},dataSource:o,className:"mt20",titleWidth:y}),(0,w.jsx)(v.t7,{style:{width:z,marginLeft:"auto"},placeholder:S,value:te.keyword,onChange:function(e){te.keyword=e,te.page=1,ne(te),ae(te)}})]}),(0,b.QB)(null==X?void 0:X.next_start_at)&&(0,w.jsxs)(v.op,{style:{marginLeft:15},onClick:function(){return q(!0)},children:[(0,w.jsx)("i",{className:"iconfont icon-anquanshezhi font14 mr5"}),null==X?void 0:X.name,"设置"]})]}),0===(null==X?void 0:X.status)&&(0,w.jsx)(j.Z,{customText:re}),!(null==X||!X.status)&&(0,w.jsx)(m.Z,{columns:k,dataSource:D,loading:R,rowKey:"id",locale:{emptyText:(0,w.jsx)(j.Z,{})},pagination:{current:te.page,hideOnSinglePage:!L,showQuickJumper:!0,showSizeChanger:!0,pageSize:te.limit,pageSizeOptions:["10","20","50","100","200"],total:L,size:"default",showTotal:b.rU,onChange:function(e,t){te.page=e,te.limit=t,ne(te),ae(te)}}}),(0,w.jsx)(_.Z,{visible:G,data:i()(i()({},X),{},{disabled_time:null==U||null===(a=U[Y-1])||void 0===a?void 0:a.end_at}),onClose:function(){return q(!1)},onSuccess:function(){q(!1)}})]})}))},96074:function(e,t,n){n.d(t,{Z:function(){return p}});var a=n(94184),i=n.n(a),r=n(67294),l=n(53124),o=n(14747),s=n(67968),c=n(45503);const u=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:a,lineWidth:i,textPaddingInline:r,orientationMargin:l,verticalMarginInline:s}=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:s,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*l+"%"},"&::after":{width:100-100*l+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*l+"%"},"&::after":{width:100*l+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:r},"&-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 d=(0,s.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[u(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),f=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 p=e=>{const{getPrefixCls:t,direction:n,divider:a}=r.useContext(l.E_),{prefixCls:o,type:s="horizontal",orientation:c="center",orientationMargin:u,className:p,rootClassName:h,children:m,dashed:v,plain:g,style:x}=e,_=f(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),j=t("divider",o),[b,w]=d(j),y=c.length>0?`-${c}`:c,S=!!m,k="left"===c&&null!=u,N="right"===c&&null!=u,Z=i()(j,null==a?void 0:a.className,w,`${j}-${s}`,{[`${j}-with-text`]:S,[`${j}-with-text${y}`]:S,[`${j}-dashed`]:!!v,[`${j}-plain`]:!!g,[`${j}-rtl`]:"rtl"===n,[`${j}-no-default-orientation-margin-left`]:k,[`${j}-no-default-orientation-margin-right`]:N},p,h),z=r.useMemo((()=>"number"==typeof u?u:/^\d+$/.test(u)?Number(u):u),[u]),$=Object.assign(Object.assign({},k&&{marginLeft:z}),N&&{marginRight:z});return b(r.createElement("div",Object.assign({className:Z,style:Object.assign(Object.assign({},null==a?void 0:a.style),x)},_,{role:"separator"}),m&&"vertical"!==s&&r.createElement("span",{className:`${j}-inner-text`,style:$},m)))}},55054:function(e,t,n){n.d(t,{Z:function(){return b}});var a=n(67294),i=n(57838),r=n(96159),l=n(94184),o=n.n(l),s=n(53124),c=n(4310);var u=e=>{const{value:t,formatter:n,precision:i,decimalSeparator:r,groupSeparator:l="",prefixCls:o}=e;let s;if("function"==typeof n)s=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,l),"number"==typeof i&&(c=c.padEnd(i,"0").slice(0,i>0?i:0)),c&&(c=`${r}${c}`),s=[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 s=e}return a.createElement("span",{className:`${o}-content-value`},s)},d=n(14747),f=n(67968),p=n(45503);const h=e=>{const{componentCls:t,marginXXS:n,padding:a,colorTextDescription:i,titleFontSize:r,colorTextHeading:l,contentFontSize:o,fontFamily:s}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,d.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:i,fontSize:r},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:l,fontSize:o,fontFamily:s,[`${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 m=(0,f.Z)("Statistic",(e=>{const t=(0,p.TS)(e,{});return[h(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var v=e=>{const{prefixCls:t,className:n,rootClassName:i,style:r,valueStyle:l,value:d=0,title:f,valueRender:p,prefix:h,suffix:v,loading:g=!1,onMouseEnter:x,onMouseLeave:_,decimalSeparator:j=".",groupSeparator:b=","}=e,{getPrefixCls:w,direction:y,statistic:S}=a.useContext(s.E_),k=w("statistic",t),[N,Z]=m(k),z=a.createElement(u,Object.assign({decimalSeparator:j,groupSeparator:b,prefixCls:k},e,{value:d})),$=o()(k,{[`${k}-rtl`]:"rtl"===y},null==S?void 0:S.className,n,i,Z);return N(a.createElement("div",{className:$,style:Object.assign(Object.assign({},null==S?void 0:S.style),r),onMouseEnter:x,onMouseLeave:_},f&&a.createElement("div",{className:`${k}-title`},f),a.createElement(c.Z,{paragraph:!1,loading:g,className:`${k}-skeleton`},a.createElement("div",{style:l,className:`${k}-content`},h&&a.createElement("span",{className:`${k}-content-prefix`},h),p?p(z):z,v&&a.createElement("span",{className:`${k}-content-suffix`},v)))))};const g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function x(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))),r=t.replace(a,"[]"),l=g.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}),r);let o=0;return l.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:l,onFinish:o}=e,s=(0,i.Z)(),c=a.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(c.current=setInterval((()=>{s(),null==l||l(e-Date.now()),e<Date.now()&&(null==o||o(),c.current&&(clearInterval(c.current),c.current=null))}),33.333333333333336))};a.useEffect((()=>(u(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[t]);return a.createElement(v,Object.assign({},e,{valueRender:e=>(0,r.Tm)(e,{title:void 0}),formatter:(e,t)=>x(e,Object.assign(Object.assign({},t),{format:n}))}))};var j=a.memo(_);v.Countdown=j;var b=v}}]); |