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/5605.async.js

2 lines
16 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5605],{59279:function(j,L,i){var E=i(59301),n=i(46651),u=i(78241),f=i(43418),l=i(26220),g=i(63144),C=i(76265),Y=i(99232),D=i.n(Y),x=i(15826),d=i(59301),s=Object.defineProperty,_=Object.defineProperties,I=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,y=(o,r,c)=>r in o?s(o,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):o[r]=c,m=(o,r)=>{for(var c in r||(r={}))H.call(r,c)&&y(o,c,r[c]);if(Z)for(var c of Z(r))p.call(r,c)&&y(o,c,r[c]);return o},P=(o,r)=>_(o,I(r)),A=(o,r,c)=>new Promise((F,h)=>{var b=v=>{try{O(c.next(v))}catch(S){h(S)}},$=v=>{try{O(c.throw(v))}catch(S){h(S)}},O=v=>v.done?F(v.value):Promise.resolve(v.value).then(b,$);O((c=c.apply(o,r)).next())});const{Dragger:B}=n.default,R=({classroomList:o,dispatch:r,onOk:c})=>{const F=(0,g.useParams)(),[h]=u.default.useForm(),[b,$]=(0,E.useState)(),[O,v]=(0,E.useState)(!1),S={height:100,onRemove:()=>{$("")},accept:".xls,.xlsx",multiple:!1,beforeUpload:T=>A(void 0,null,function*(){return $(T),!1})};return(0,E.useEffect)(()=>{h.setFieldsValue({publish_time:D()(D()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm")),end_time:D()(D()(new Date((0,x.qd)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))})},[]),d.createElement(f.default,{centered:!0,title:"\u4FEE\u6539\u6210\u7EE9",open:o.actionTabs.key==="\u4FEE\u6539\u6210\u7EE9",okText:"\u786E\u5B9A",width:600,cancelText:"\u53D6\u6D88",okButtonProps:{loading:O},onOk:()=>A(void 0,null,function*(){h.submit()}),onCancel:()=>{h.resetFields(),r({type:"classroomList/setActionTabs",payload:{}})}},d.createElement(u.default,{form:h,onFinish:T=>A(void 0,null,function*(){var W,V;console.log("---",o.actionTabs,T,F);let U=((W=o==null?void 0:o.actionTabs)==null?void 0:W.type)==="exercise"?`/api/exercises/${F==null?void 0:F.category}/exercise_user/edit_score.json`:`/api/student_works/${o.actionTabs.id}/edit_score.json`;v(!0);let k=yield(0,C.ZP)(U,{method:"post",body:P(m({},T),{exercise_user_id:((V=o==null?void 0:o.actionTabs)==null?void 0:V.type)==="exercise"?o.actionTabs.id:""})});v(!1),h.resetFields(),r({type:"classroomList/setActionTabs",payload:{}}),c()})},d.createElement(u.default.Item,{label:"\u6700\u7EC8\u6210\u7EE9",style:{marginBottom:0},name:"score",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6700\u7EC8\u6210\u7EE9"}]},d.createElement(l.Z,{min:0,style:{width:"100%"}}))))};L.Z=(0,g.connect)(({classroomList:o})=>({classroomList:o}))(R)},50006:function(j,L,i){var E=i(59301),n=i(46651),u=i(78241),f=i(3113),l=i(95237),g=i(81327),C=i(84291),Y=i(63144),D=i(99232),x=i.n(D),d=i(5073),s=i(76265),_=i(59301),I=(p,y,m)=>new Promise((P,A)=>{var B=r=>{try{o(m.next(r))}catch(c){A(c)}},R=r=>{try{o(m.throw(r))}catch(c){A(c)}},o=r=>r.done?P(r.value):Promise.resolve(r.value).then(B,R);o((m=m.apply(p,y)).next())});const{Dragger:Z}=n.default,H=({})=>{const p=(0,Y.useParams)(),[y]=u.default.useForm(),[m,P]=(0,E.useState)(!0),[A,B]=(0,E.useState)(!1);console.log("----",p);function R(){return I(this,null,function*(){var o,r;let c;window.location.href.indexOf("exercise")>-1?c=`/api/exercises/${p==null?void 0:p.categoryId}/get_time_setting.json`:c=`/api/homework_commons/${p==null?void 0:p.categoryId}/get_time_setting.json`;let F=yield(0,s.ZP)(c,{method:"get"});(F==null?void 0:F.status)===0&&y.setFieldsValue({publish_time:x()(x()((o=F==null?void 0:F.data)==null?void 0:o.publish_time).format("YYYY-MM-DD HH:mm")),end_time:x()(x()((r=F==null?void 0:F.data)==null?void 0:r.end_time).format("YYYY-MM-DD HH:mm"))})})}return(0,E.useEffect)(()=>{R()},[]),_.createElement("div",{style:{padding:"50px 30px",background:"#fff"}},_.createElement("div",{style:{textAlign:"end"}},m&&_.createElement(f.ZP,{onClick:()=>{P(!1)}},"\u7F16\u8F91\u8BBE\u7F6E"),!m&&_.createElement("div",null,_.createElement(f.ZP,{type:"primary",loading:A,onClick:()=>{y.submit()}},"\u63D0\u4EA4"),_.createElement(f.ZP,{style:{marginLeft:20},onClick:()=>{P(!0)}},"\u53D6\u6D88"))),_.createElement(u.default,{form:y,disabled:m,onFinish:o=>I(void 0,null,function*(){B(!0),console.log("---",window.location.href);let r;window.location.href.indexOf("exercise")>-1?r=`/api/exercises/${p==null?void 0:p.categoryId}/time_setting.json`:r=`/api/homework_commons/${p==null?void 0:p.categoryId}/time_setting.json`;let c=yield(0,s.ZP)(r,{method:"post",body:{publish_time:x()(o.publish_time).format("YYYY-MM-DD HH:mm"),end_time:x()(o.end_time).format("YYYY-MM-DD HH:mm")}});B(!1),(c==null?void 0:c.status)===0&&P(!0)})},_.createElement(l.Z,null,_.createElement(g.Z,null,_.createElement(u.default.Item,{label:"\u5F00\u59CB\u65F6\u95F4",name:"publish_time",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4"}]},_.createElement(C.default,{placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},style:{width:260},size:"large",disabledDate:o=>(0,d.Q8)(o),disabledTime:o=>(0,d.d0)(o),allowClear:!1,format:"YYYY-MM-DD HH:mm"})),_.createElement("span",{style:{color:"#999999",fontSize:"14px",height:40,marginBottom:8,display:"block"}},"\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u7684\u65F6\u95F4\uFF09"))),_.createElement(l.Z,null,_.createElement(g.Z,null,_.createElement(u.default.Item,{label:"\u7ED3\u675F\u65F6\u95F4",name:"end_time",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4"}]},_.createElement(C.default,{placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},style:{width:260},size:"large",disabledDate:o=>(0,d.Q8)(o,"",y.getFieldValue("publish_time")),disabledTime:o=>(0,d.d0)(o,y.getFieldValue("publish_time")),allowClear:!1,format:"YYYY-MM-DD HH:mm"})),_.createElement("span",{style:{color:"#999999",fontSize:"14px",height:40,marginBottom:8,display:"block"}},"\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9\uFF09")))))};L.Z=(0,Y.connect)(({classroomList:p})=>({classroomList:p}))(H)},2054:function(j,L,i){i.d(L,{AD:function(){return v},D9:function(){return k},Hp:function(){return R},IM:function(){return Q},Iy:function(){return r},KM:function(){return ne},MJ:function(){return o},Ne:function(){return q},ON:function(){return ee},Uj:function(){return oe},VY:function(){return J},YO:function(){return ue},YX:function(){return te},Zn:function(){return Z},_g:function(){return P},_k:function(){return V},c6:function(){return $},cr:function(){return H},eV:function(){return O},fi:function(){return p},gh:function(){return h},hS:function(){return z},iA:function(){return y},j6:function(){return A},je:function(){return W},jj:function(){return B},kS:function(){return X},o6:function(){return b},pO:function(){return se},rQ:function(){return S},sA:function(){return F},xm:function(){return U},xo:function(){return G},y8:function(){return T},yd:function(){return m}});var E=i(43785),n=i(63144),u=i(15826),f=i(8591),l=i(46961),g=Object.defineProperty,C=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,x=(e,t,a)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,d=(e,t)=>{for(var a in t||(t={}))Y.call(t,a)&&x(e,a,t[a]);if(C)for(var a of C(t))D.call(t,a)&&x(e,a,t[a]);return e},s=(e,t,a)=>new Promise((re,w)=>{var ie=M=>{try{N(a.next(M))}catch(K){w(K)}},le=M=>{try{N(a.throw(M))}catch(K){w(K)}},N=M=>M.done?re(M.value):Promise.resolve(M.value).then(ie,le);N((a=a.apply(e,t)).next())});const _=()=>{(0,n.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},I=()=>{(0,n.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},Z=e=>s(void 0,null,function*(){_(),(yield(0,E.YR)(d({},e))).status===0&&(yield(0,u.QH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/courses/${e.coursesId}/export_couser_info.json`,query:e}))),I()}),H=e=>s(void 0,null,function*(){const t=yield(0,E.yS)(d({},e));if(t.status===0)f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_member_act_score`);else{if(t.status===-2)return t;t.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_member_act_score`))}}),p=e=>s(void 0,null,function*(){const t=yield(0,E.W0)(d({},e));if(t.status===0)f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_score`);else{if(t.status===-4)return t;t.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_score`))}}),y=e=>s(void 0,null,function*(){const t=yield(0,E.Nl)(d({},e));if(t.status===0)f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_exercise_and_other`);else{if(t.status===-4)return t;t.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_exercise_and_other`))}}),m=e=>s(void 0,null,function*(){const t=yield(0,E.IU)(d({},e));if(t.status===0)f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/export_star_user`);else{if(t.status===-4)return t;t.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/export_star_user`))}}),P=e=>s(void 0,null,function*(){const t=yield(0,E.td)(d({},e));if(t.status===0)f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_exercise_and_other`);else{if(t.status===-2)return t;if(t.status===-3)(0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_exercise_and_other`);else if(t.status===-4)return t}}),A=e=>s(void 0,null,function*(){const t=yield(0,E.QX)(d({},e));if(t.status===0)f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_homework`);else{if(t.status===-4)return t;t.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/course_total_homework`))}}),B=(e,t)=>s(void 0,null,function*(){const a=yield(0,E.o_)(d({},e));a.status===0?(f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`)):a.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`))}),R=(e,t)=>s(void 0,null,function*(){const a=yield(0,E.ZL)(d({},e));a.status===0?(f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`)):a.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`))}),o=(e,t)=>s(void 0,null,function*(){const a=yield(0,E.vV)(d({},e));a.status===0?(f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`)):a.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`))}),r=(e,t)=>s(void 0,null,function*(){const a=yield(0,E.aP)(d({},e));a.status===0?(f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`)):a.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/${t}`))}),c=e=>s(void 0,null,function*(){_(),(yield exportCourseWorkListAppendix(d({},e))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${e.categoryId}/works_list.zip`,query:e}))),I()}),F=e=>s(void 0,null,function*(){_(),(yield(0,E.MJ)(d({},e))).status===0&&(yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/polls/${e.categoryId}/commit_result.xlsx`,query:e}))),I()}),h=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/courses/${e.coursesId}/attendances/export_xlsx_data.xlsx`,query:e}))}),b=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/courses/${e.coursesId}/video_study_statics.xlsx`,query:e}))}),$=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/courses/${e.coursesId}/export_video_study.xlsx`,query:e}))}),O=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/courses/${e.coursesId}/export_course_students_info.xlsx`,query:e}))}),v=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/school_manages/students.xlsx",query:e}))}),S=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/item_banks/export.xlsx",query:e}))}),T=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:e}))}),W=e=>s(void 0,null,function*(){const t=yield(0,E.Uy)(d({},e));t.status===0?(f.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),n.history.push(`/classrooms/${e.coursesId}/exportlist/exercise_score`)):t.status===-3&&((0,n.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),n.history.push(`/classrooms/${e.coursesId}/exportlist/exercise_score`))}),V=e=>s(void 0,null,function*(){console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/export_records/${e.id}.xlsx`,query:e}))}),U=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:e}))}),k=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/courses/${e==null?void 0:e.coursesId}/${e.menuKey}_statistic.xlsx?${e.checkedList.map(t=>`course_group_id[]=${t}`).join("&")}`,query:e}))}),q=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/ec_years/${e==null?void 0:e.ec_year_id}/ec_training_objectives.xlsx`,query:e}))}),Q=e=>s(void 0,null,function*(){yield(0,u.FH)(e==null?void 0:e.name,(0,u.NY)({url:l.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:e}))}),z=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/ec_years/${e==null?void 0:e.ec_year_id}/ec_courses.xlsx`,query:e}))}),G=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/ec_years/${e==null?void 0:e.ec_year_id}/ec_graduation_requirements.xlsx`,query:e}))}),J=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:e}))}),X=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:e}))}),ee=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/examination_banks/${e.id}.json`,query:e}))}),te=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/exercises/${e.categoryId}.json`,query:e}))}),ue=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/polls/${e==null?void 0:e.id}/commit_result.json`,query:e}))}),oe=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+"/api/paths/get_task_pass.json",query:e}))}),se=(e,t)=>s(void 0,null,function*(){yield(0,u.FH)(t||"",(0,u.NY)({url:l.Z.API_SERVER+`/api/exercises/${e==null?void 0:e.exercise_id}/consult_exercise.json`,query:e}))}),ne=e=>s(void 0,null,function*(){yield(0,u.FH)("",(0,u.NY)({url:l.Z.API_SERVER+`/api/competitions/${e==null?void 0:e.identifier}/competition_commit_records/member_works.xlsx`,query:e}))})}}]);