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/p__Classrooms__Lists__Expor...

1 line
15 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[54572],{86413:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(33614),i=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},s=t(1393),a=function(e,n){return i.createElement(s.Z,(0,r.Z)({},e,{ref:n,icon:o}))};var l=i.forwardRef(a)},76897:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(33614),i=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},s=t(1393),a=function(e,n){return i.createElement(s.Z,(0,r.Z)({},e,{ref:n,icon:o}))};var l=i.forwardRef(a)},2399:function(e,n,t){t.r(n),t.d(n,{default:function(){return S}});var r=t(7557),i=t.n(r),o=t(41498),s=t.n(o),a=t(82242),l=t.n(a),c=t(79800),u=t.n(c),d=t(59301),p=t(40578),f=t(32007),m=t(43418),x=t(85750),v="modal___VXplb",h=t(37712),g=(0,f.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.onOk,t=e.dispatch,r=e.classroomList,o=(0,d.useState)(!1),a=u()(o,2),l=a[0],c=a[1],p=function(){var e=s()(i()().mark((function e(){var o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,(0,x.ZP)("/api/homework_commons/".concat(null===(o=r.actionTabs)||void 0===o||null===(o=o.params)||void 0===o?void 0:o.categoryId,"/export_workspace_files.json"),{method:"post",body:{is_repeat_export:1}});case 3:0===e.sent.status&&(n(),t({type:"classroomList/setActionTabs",payload:{}})),c(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,h.jsx)(m.Z,{title:"温馨提示",zIndex:9999,className:v,confirmLoading:l,open:"重复导出提醒"===r.actionTabs.key,onCancel:function(){t({type:"classroomList/setActionTabs",payload:{}})},onOk:p,children:(0,h.jsx)("div",{className:"mb20",children:" 您在当前栏目中已存在导出记录,是否重新导出?"})})})),y=t(61186),b=t.n(y),_=t(6848),w=t(8591),k=t(3113),j=t(51945),C=t(86859),Z=t(25510),O=t(2555),E=t(89260);b().locale("zh-cn");var z=[{id:"exercise_score",name:"试卷成绩"},{id:"shixun_work_list",name:"课堂实验成绩"},{id:"normal_work_list",name:"图文作业成绩"},{id:"group_work_list",name:"分组作业成绩"},{id:"course_total_score",name:"课堂总成绩"},{id:"course_total_homework",name:"课堂作业成绩"},{id:"course_total_exercise_and_other",name:"课堂试卷成绩"},{id:"course_member_act_score",name:"课堂活跃度"},{id:"mooc_records",name:"第三方慕课"},{id:"hack_work_list",name:"编程作业成绩"},{id:"workspace_files",name:"实验数据"},{id:"messages_statistics",name:"课堂互动统计"},{id:"challenge_statistics",name:"课堂实验通关详情"},{id:"shixun_report",name:"实训报告"},{id:"export_exercise_users",name:"学生试卷"}],P=[{id:"failed",name:"失败"},{id:"running",name:"执行中"},{id:"finished",name:"完成"},{id:"expired",name:"过期"}],S=(0,f.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n}}))((function(e){e.globalSetting,e.loading,e.dispatch;var n,t,r=(0,d.useState)(l()({},(0,f.useParams)())),o=u()(r,2),a=o[0],c=(o[1],(0,f.useLocation)()),v=(0,d.useState)(),y=u()(v,2),S=y[0],M=y[1],T=(0,d.useState)(!0),N=u()(T,2),I=N[0],L=N[1],B=(0,d.useState)(1),D=u()(B,2),R=D[0],$=D[1],F=(null==a||null===(n=a.type)||void 0===n||n.split(","),null===(t=c.pathname.split("/"))||void 0===t||null===(t=t[4])||void 0===t?void 0:t.split(","));function A(){return Y.apply(this,arguments)}function Y(){return Y=s()(i()().mark((function e(){var n,t,r=arguments;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:1,L(!0),e.next=4,(0,x.ZP)("/api/courses/".concat(a.coursesId,"/export_records.json"),{method:"get",params:{page:n,per_page:10,export_types:F}});case 4:(t=e.sent)&&M(t),L(!1);case 7:case"end":return e.stop()}}),e)}))),Y.apply(this,arguments)}(0,d.useEffect)((function(){A(R)}),[c.pathname]);var Q=function(){m.Z.info({centered:!0,autoFocusButton:null,icon:null,width:460,zIndex:1e4,title:"联系平台管理员",content:(0,h.jsx)("div",{className:"tc",children:(0,h.jsx)("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:Z,alt:"二维码",width:160})}),okText:"我知道了"})},q=[{title:"文件名",dataIndex:"filename",ellipsis:!0,width:"30%",render:function(e,n,t){return(0,h.jsx)(_.Z,{placement:"topLeft",title:e||(null==n?void 0:n.preview_filename),children:(0,h.jsx)("span",{children:e||(null==n?void 0:n.preview_filename)})})}},{title:"类型",dataIndex:"export_type",ellipsis:!0,render:function(e){return null==z?void 0:z.map((function(n){if(e===(null==n?void 0:n.id))return(0,h.jsx)(_.Z,{title:n.name,children:(0,h.jsx)("span",{children:n.name})})}))}},{title:"状态",dataIndex:"status",ellipsis:!0,render:function(e){return null==P?void 0:P.map((function(n){if(e===(null==n?void 0:n.id))return"failed"===e?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("span",{children:n.name}),(0,h.jsx)(_.Z,{title:(0,h.jsxs)("div",{className:"c-grey-999 font14",children:["文件导出发生未知错误!建议",(0,h.jsx)("span",{onClick:Q,className:"c-light-primary current",children:"联系平台管理员"}),"进行解决~"]}),color:"#ffffff",children:(0,h.jsx)("i",{className:"iconfont icon-tishi12 font14 ml5 current",style:{color:"#ff904d"}})})]}):n.name}))}},{title:"导出人",dataIndex:"user",ellipsis:!0,render:function(e){return null==e?void 0:e.real_name}},{title:"下载次数",dataIndex:"downloads"},{title:"创建时间",dataIndex:"created_at",width:"20%",render:function(e){return b()(e).format("YYYY-MM-DD HH:mm:ss")}},{title:"操作",ellipsis:!0,align:"right",render:function(e,n,t){return(0,h.jsx)("span",{style:{cursor:"pointer",color:"#0152d9"},onClick:s()(i()().mark((function e(){var t,r,o,a;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("expired"!==(null==n?void 0:n.status)&&"failed"!==(null==n?void 0:n.status)){e.next=6;break}return e.next=3,(0,x.ZP)("/api/export_record/".concat(null==n?void 0:n.id,"/restart.json"),{method:"post"});case 3:return 0===(null==(t=e.sent)?void 0:t.status)&&A(R),e.abrupt("return");case 6:if("shixun_report"!==n.export_type&&"export_exercise_users"!==n.export_type||(0,E.Ny)()){e.next=9;break}return w.ZP.info("仅支持平台管理员和运营人员下载!"),e.abrupt("return");case 9:if("workspace_files"!==n.export_type){e.next=17;break}return r=(new Date).getTime(),o=new Date(n.created_at).getTime(),a=(o-r)/864e5,Math.abs(a)<=30?(m.Z.info({icon:null,title:"温馨提示",width:460,content:(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{children:["由于平台的实验数据储存容量和成本消耗较大,导出的实验数据压缩包将会从创建时间(",b()(null==n?void 0:n.created_at).format("YYYY-MM-DD HH:mm:ss"),")起将保存 ",(0,h.jsx)("a",{children:"30"})," 天,超过保存期限将自动清除。请尽快下载!"]}),(0,h.jsx)("div",{style:{marginTop:15,background:"#F6F7F9",padding:10,color:"rgba(0, 0, 0, 0.50)"},children:"注意:保存期限截止后,只会自动清除导出的实验数据压缩包,不会清除原始的实验环境临时数据。您可以重新导出实验数据并进行下载。"})]}),okText:"知道了"}),(0,O._k)({id:null==n?void 0:n.id})):m.Z.confirm({icon:null,title:"温馨提示",width:460,onOk:function(){var e=s()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.ZP)("/api/homework_commons/".concat(n.exportable_id,"/export_workspace_files.json"),{method:"post",body:{is_repeat_export:1}});case 2:0===e.sent.status&&A();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),content:(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{children:["导出的实验数据压缩包已超过 ",30," 天保存期限,为减少平台的实验数据储存容量和成本消耗,目前已被自动清除。"]}),(0,h.jsx)("div",{style:{marginTop:15,background:"#F6F7F9",padding:10,color:"rgba(0, 0, 0, 0.50)"},children:"注意:保存期限截止后,只会自动清除导出的实验数据压缩包,不会清除原始的实验环境临时数据。您可以重新导出实验数据并进行下载。"})]}),okText:"重新导出",cancelText:"取消"}),e.abrupt("return");case 17:(0,O._k)({id:null==n?void 0:n.id});case 18:case"end":return e.stop()}}),e)}))),children:"finished"===(null==n?void 0:n.status)?"下载":"expired"!==(null==n?void 0:n.status)&&"failed"!==(null==n?void 0:n.status)||null==n||!n.job_name?"":"重新导出"})}}].filter((function(e){return!!e}));return(0,h.jsxs)("div",{style:{background:"#fff"},children:[(0,h.jsxs)("span",{style:{fontSize:"16px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",background:"#fff",padding:"10px 20px"},children:[(0,h.jsxs)("div",{children:[(0,h.jsx)(p.Z,{onClick:function(){f.history.back()},style:{marginTop:"4px",cursor:"pointer",marginRight:"5px"}})," ","导出列表"]}),(0,h.jsx)(k.ZP,{onClick:function(){$(1),A()},type:"primary",style:{height:"30px",borderRadius:"4px"},children:"更新"})]}),(0,h.jsx)("div",{style:{background:"#fff",marginBottom:14},children:(0,h.jsx)(j.Z,{rowKey:"id",columns:q,dataSource:null==S?void 0:S.export_records,pagination:!1,loading:I})}),(0,h.jsx)(C.Z,{hideOnSinglePage:!0,pageSize:10,showSizeChanger:!1,onChange:function(){var e=s()(i()().mark((function e(n,t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$(n),A(n);case 2:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),style:{textAlign:"center",paddingBottom:20},current:R,total:null==S?void 0:S.total_count}),(0,h.jsx)(g,{onOk:A})]})}))},92832:function(e,n,t){t.d(n,{Z:function(){return z}});var r=t(92310),i=t.n(r),o=t(59301),s=t(36355),a=t(32441),l=t(9937);var c=e=>{const{getPrefixCls:n,direction:t}=(0,o.useContext)(s.E_),{prefixCls:r,className:c}=e,u=n("input-group",r),d=n("input"),[p,f]=(0,l.ZP)(d),m=i()(u,{[`${u}-lg`]:"large"===e.size,[`${u}-sm`]:"small"===e.size,[`${u}-compact`]:e.compact,[`${u}-rtl`]:"rtl"===t},f,c),x=(0,o.useContext)(a.aM),v=(0,o.useMemo)((()=>Object.assign(Object.assign({},x),{isFormItemInput:!1})),[x]);return p(o.createElement("span",{className:m,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},o.createElement(a.aM.Provider,{value:v},e.children)))},u=t(9432),d=t(86413),p=t(76897),f=t(55405),m=t(25629),x=t(59412),v=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t};const h=e=>e?o.createElement(p.Z,null):o.createElement(d.Z,null),g={click:"onClick",hover:"onMouseOver"};var y=o.forwardRef(((e,n)=>{const{visibilityToggle:t=!0}=e,r="object"==typeof t&&void 0!==t.visible,[a,l]=(0,o.useState)((()=>!!r&&t.visible)),c=(0,o.useRef)(null);o.useEffect((()=>{r&&l(t.visible)}),[r,t]);const d=(0,x.Z)(c),p=()=>{const{disabled:n}=e;n||(a&&d(),l((e=>{var n;const r=!e;return"object"==typeof t&&(null===(n=t.onVisibleChange)||void 0===n||n.call(t,r)),r})))},{className:y,prefixCls:b,inputPrefixCls:_,size:w}=e,k=v(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:j}=o.useContext(s.E_),C=j("input",_),Z=j("input-password",b),O=t&&(n=>{const{action:t="click",iconRender:r=h}=e,i=g[t]||"",s=r(a),l={[i]:p,className:`${n}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return o.cloneElement(o.isValidElement(s)?s:o.createElement("span",null,s),l)})(Z),E=i()(Z,y,{[`${Z}-${w}`]:!!w}),z=Object.assign(Object.assign({},(0,f.Z)(k,["suffix","iconRender","visibilityToggle"])),{type:a?"text":"password",className:E,prefixCls:C,suffix:O});return w&&(z.size=w),o.createElement(u.Z,Object.assign({ref:(0,m.sQ)(n,c)},z))})),b=t(78405),_=t(92343),w=t(3113),k=t(19716),j=t(33234),C=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t};var Z=o.forwardRef(((e,n)=>{const{prefixCls:t,inputPrefixCls:r,className:a,size:l,suffix:c,enterButton:d=!1,addonAfter:p,loading:f,disabled:x,onSearch:v,onChange:h,onCompositionStart:g,onCompositionEnd:y}=e,Z=C(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:O,direction:E}=o.useContext(s.E_),z=o.useRef(!1),P=O("input-search",t),S=O("input",r),{compactSize:M}=(0,j.ri)(P,E),T=(0,k.Z)((e=>{var n;return null!==(n=null!=l?l:M)&&void 0!==n?n:e})),N=o.useRef(null),I=e=>{var n;document.activeElement===(null===(n=N.current)||void 0===n?void 0:n.input)&&e.preventDefault()},L=e=>{var n,t;v&&v(null===(t=null===(n=N.current)||void 0===n?void 0:n.input)||void 0===t?void 0:t.value,e,{source:"input"})},B="boolean"==typeof d?o.createElement(b.Z,null):null,D=`${P}-button`;let R;const $=d||{},F=$.type&&!0===$.type.__ANT_BUTTON;R=F||"button"===$.type?(0,_.Tm)($,Object.assign({onMouseDown:I,onClick:e=>{var n,t;null===(t=null===(n=null==$?void 0:$.props)||void 0===n?void 0:n.onClick)||void 0===t||t.call(n,e),L(e)},key:"enterButton"},F?{className:D,size:T}:{})):o.createElement(w.ZP,{className:D,type:d?"primary":void 0,size:T,disabled:x,key:"enterButton",onMouseDown:I,onClick:L,loading:f,icon:B},d),p&&(R=[R,(0,_.Tm)(p,{key:"addonAfter"})]);const A=i()(P,{[`${P}-rtl`]:"rtl"===E,[`${P}-${T}`]:!!T,[`${P}-with-button`]:!!d},a);return o.createElement(u.Z,Object.assign({ref:(0,m.sQ)(N,n),onPressEnter:e=>{z.current||f||L(e)}},Z,{size:T,onCompositionStart:e=>{z.current=!0,null==g||g(e)},onCompositionEnd:e=>{z.current=!1,null==y||y(e)},prefixCls:S,addonAfter:R,suffix:c,onChange:e=>{e&&e.target&&"click"===e.type&&v&&v(e.target.value,e,{source:"clear"}),h&&h(e)},className:A,disabled:x}))})),O=t(1643);const E=u.Z;E.Group=c,E.Search=Z,E.TextArea=O.Z,E.Password=y;var z=E}}]);