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
31 KiB
1 line
31 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[106,6],{"/A5M":function(e,n,t){e.exports={randomIcon:"randomIcon___o7OlS"}},"1vsH":function(e,n,t){"use strict";t.d(n,"i",(function(){return s})),t.d(n,"k",(function(){return l})),t.d(n,"e",(function(){return u})),t.d(n,"h",(function(){return d})),t.d(n,"c",(function(){return p})),t.d(n,"f",(function(){return m})),t.d(n,"g",(function(){return _})),t.d(n,"a",(function(){return g})),t.d(n,"y",(function(){return w})),t.d(n,"x",(function(){return b})),t.d(n,"z",(function(){return h})),t.d(n,"A",(function(){return y})),t.d(n,"r",(function(){return f})),t.d(n,"q",(function(){return v})),t.d(n,"o",(function(){return k})),t.d(n,"n",(function(){return E})),t.d(n,"w",(function(){return S})),t.d(n,"j",(function(){return A})),t.d(n,"v",(function(){return x})),t.d(n,"t",(function(){return C})),t.d(n,"l",(function(){return j})),t.d(n,"u",(function(){return O})),t.d(n,"m",(function(){return F})),t.d(n,"d",(function(){return T})),t.d(n,"b",(function(){return M})),t.d(n,"s",(function(){return I})),t.d(n,"p",(function(){return L}));var o=t("q1tI"),r=t.n(o),a=t("xKgJ"),i=t("aCH8"),c=t.n(i),s=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],l=e=>{var n={[-1]:"\u91cd\u505a\u4e2d",0:"\u672a\u5f00\u542f",1:"\u672a\u901a\u5173",2:"\u6309\u65f6\u901a\u5173"};return n[e]||"\u8fdf\u4ea4\u901a\u5173"},u=e=>{var n,t,o={[-1]:{name:"\u91cd\u505a\u4e2d",class:"c-orange"},0:{name:"\u672a\u5f00\u542f",class:"c-black"},1:{name:"\u672a\u901a\u5173",class:"c-red"},2:{name:"\u6309\u65f6\u901a\u5173",class:"c-green"},3:{name:"\u8fdf\u4ea4\u901a\u5173",class:"c-orange"}};return r.a.createElement("span",{className:null===o||void 0===o||null===(n=o[e.status])||void 0===n?void 0:n["class"]},null===o||void 0===o||null===(t=o[e.status])||void 0===t?void 0:t["name"])},d=e=>{var n=e.status,t={0:{class:"tag-style bg-blue ml10",name:"\u5f85\u9009\u4e2d"},1:{class:"tag-style bg-blue ml10",name:"\u5f85\u786e\u8ba4"},2:{class:"tag-style bg-pink ml10",name:"\u5df2\u786e\u8ba4"}};try{return r.a.createElement("span",{className:t[n]["class"]},t[n]["name"])}catch(o){console.log("utils.StatusGraduationProjectTags",e.status)}},p={1:"\u672a\u53d1\u5e03",2:"\u8003\u8bd5\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},m={1:"\u672a\u53d1\u5e03",2:"\u63d0\u4ea4\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},_=e=>{var n={"\u516c\u5f00":{class:"tag-style bg-blue ml10"},"\u5df2\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-green ml10"},"\u672a\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-pink ml10"},"\u672a\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u533f\u540d\u4f5c\u54c1":{class:"tag-style bg-cyan ml10"},"\u5df2\u9009\u62e9":{class:"tag-style bg-grey-ede ml10"},"\u5df2\u7ed3\u675f":{class:"tag-style bg-grey-ede ml10"},"\u63d0\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u533f\u8bc4\u4e2d":{class:"tag-style bg-blue ml10"},"\u7533\u8bc9\u4e2d":{class:"tag-style bg-blue ml10"},"\u8003\u8bd5\u4e2d":{class:"tag-style bg-light-blue ml10"},"\u8865\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u8bc4\u9605\u4e2d":{class:"tag-style bg-blue ml10"},"\u5f85\u9009\u4e2d":{class:"tag-style bg-blue ml10"},"\u4ea4\u53c9\u8bc4\u9605\u4e2d":{class:"tag-style bg-light-orange ml10"},"\u5df2\u5f00\u542f\u4ea4\u53c9\u8bc4\u9605":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u786e\u8ba4":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u5904\u7406":{class:"tag-style bg-lightblue-purple ml10"},"\u79c1\u6709":{class:"tag-style bg-lightblue-purple ml10"},"\u672a\u63d0\u4ea4":{class:"tag-style bg-lightblue-purple ml10"},"\u5df2\u786e\u8ba4":{class:"tag-style bg-light-pink ml10"},"\u5df2\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u5df2\u622a\u6b62":{class:"tag-style bg-light-pink ml10"},"\u5f00\u53d1\u8bfe\u7a0b":{class:"tag-style bg-orange ml10"},"\u5df2\u5f00\u64ad":{class:"tag-style-border border-green c-green ml10"},"\u672a\u5f00\u64ad":{class:"tag-style-border border-light-black ml10"},"\u6309\u65f6\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u8fdf\u4ea4\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u5f00\u542f":{class:"tag-style-border border-light-black ml10"}},t=[];e.is_random&&t.push(r.a.createElement("span",{className:"tag-style bg-blue ml10"},"\u968f\u673a"));try{e.status&&e.status.map((e,o)=>{t.push(r.a.createElement("span",{key:o,className:n[e]&&n[e]["class"]},e))})}catch(o){console.log("utils.status.tag:",o,e.status)}return t},g=e=>{var n,t,o={0:{name:"\u672a\u63d0\u4ea4",class:"c-black"},1:{name:"\u6309\u65f6\u63d0\u4ea4",class:"c-green"},2:{name:"\u5ef6\u65f6\u63d0\u4ea4",class:"c-red"}};return r.a.createElement("span",{className:null===(n=o[e.status])||void 0===n?void 0:n["class"]},null===(t=o[e.status])||void 0===t?void 0:t["name"])},w=e=>{e=new Date(e).getTime();var n=6e4,t=60*n,o=24*t,r="",a=(new Date).getTime(),i=a-e;if(i<0)return console.log("\u65f6\u95f4\u4e0d\u5bf9\u52b2,\u670d\u52a1\u5668\u521b\u5efa\u65f6\u95f4\u4e0e\u5f53\u524d\u65f6\u95f4\u4e0d\u540c\u6b65"),"\u521a\u521a";var c=parseInt(i/o,10),s=parseInt(i/t,10),l=parseInt(i/n,10);return r=c>30?""+b(e,"yyyy-MM-dd"):c>1?c+"\u5929\u524d":1==c?"\u6628\u5929":s>=1?s+"\u5c0f\u65f6\u524d":l>=5?l+"\u5206\u949f\u524d":"\u521a\u521a",r},b=(e,n)=>{"string"==typeof e&&(e.indexOf("T")>=0&&(e=e.replace("T"," ")),e=new Date(Date.parse(e.replace(/-/g,"/")))),e=new Date(e);var t={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},o=[["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]];for(var r in/(y+)/.test(n)&&(n=n.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(w+)/.test(n)&&(n=n.replace(RegExp.$1,o[RegExp.$1.length-1][e.getDay()])),t)new RegExp("("+r+")").test(n)&&(n=n.replace(RegExp.$1,1==RegExp.$1.length?t[r]:("00"+t[r]).substr((""+t[r]).length)));return n},h=e=>{if(!e)return"0";console.log("time:",e);var n=60,t=60*n,o=24*t,r=e/o,a=e/t,i=e/n;return r>=1?parseInt(r.toString())+"\u5929"+Math.floor(a%24)+"\u65f6"+Math.floor(i%60)+"\u5206"+Math.floor(e%60)+"\u79d2":a>1?parseInt(a.toString())+"\u65f6"+Math.floor(i%60)+"\u5206"+Math.floor(e%60)+"\u79d2":i>=1?parseInt(i.toString())+"\u5206"+Math.floor(e%60)+"\u79d2":e+"\u79d2"},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,t=0;if(e){t=e.length;for(var o=0;o<t;o++){var r=e.charCodeAt(o);r>=55296&&r<=56319&&(t--,o++)}}return t<=n},f=(e,n,t)=>{if(n){var o=/[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&*\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,r=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,a=r.test(n),i=o.test(n);(!0===a||!0===i||n.length<2||n.length>=21)&&t("2-20\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57\u53ca\u4e0b\u5212\u7ebf")}t()},v=(e,n,t)=>{if(n){var o=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,r=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,a=r.test(n),i=o.test(n);(!0===a||!0===i||n.length<2||n.length>=11)&&t("2-10\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57")}t()},k=e=>{if(!e)return"";for(var n=e.length-1,t="",o=0;o<n;o++)t+="*";var r=e.substr(0,1)+t;return r},E=(e,n)=>{var t=new FileReader;t.addEventListener("load",()=>n(t.result)),t.readAsDataURL(e)};function S(e){var n="79e33abd4b6588941ab7622aed1e67e8";return c()(n+e)}function A(e,n){var t=document.createElement("a");document.body.appendChild(t),t.href=n,t.download=e;var o=document.createEvent("MouseEvents");o.initEvent("click",!1,!1),t.dispatchEvent(o),document.body.removeChild(t)}var x=e=>{var n=e.url,t=e.query;return n?(t&&function(){var e=[],o=function(n){t.hasOwnProperty(n)&&!N(t[n])&&("object"===typeof t[n]?t[n].map(o=>{e.push("".concat(n,"[]=").concat(t[n]))}):e.push("".concat(n,"=").concat(t[n])))};for(var r in t)o(r);n=-1!==n.indexOf("?")?"".concat(n,"&").concat(e.join("&")):"".concat(n,"?").concat(e.join("&"))}(),n):""};function C(){for(var e=navigator.userAgent,n=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],t=!0,o=0;o<n.length;o++)if(e.indexOf(n[o])>0){t=!1;break}return t}var D,j=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null===n||void 0===n||null===(e=n.toString())||void 0===e?void 0:e.replace(/\B(?=(\d{3})+(?!\d))/g,",")},O=e=>{var n=document.createElement("a");n.target="_blank",document.body.appendChild(n),n.href=e;var t=document.createEvent("MouseEvents");t.initEvent("click",!1,!1),n.dispatchEvent(t),document.body.removeChild(n)},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=6?e:"".concat(e.substring(0,3),"...").concat(e.substring(e.length-3,e.length))},T=()=>{var e=(new Date).getHours(),n=(new Date).getMinutes();return n>=30?(e++,n="00"):n="30",e+":"+n},M=()=>{var e=(new Date).getHours(),n=(new Date).getMinutes();return n>=30?(e++,n="00"):n="30",(new Date).toLocaleDateString().replace(/\//g,"-")+" "+e+":"+n};(function(e){e["Number"]="Number",e["String"]="String",e["Boolean"]="Boolean",e["Object"]="Object",e["Array"]="Array",e["Function"]="Function"})(D||(D={}));var P=e=>{var n=Object.prototype.toString.call(e);return n.substring(8,n.length-1)},I=e=>P(e)===D.Array?0===e.length:P(e)===D.Object?0===Object.keys(e).length:!e,N=e=>void 0===e||null===e;var L=e=>{switch(e.container_type){case"ApplyUserAuthentication":if("Apply"===e.tiding_type){if(1===e.auth_type)return window.open("/admins/identity_authentications");if(2===e.auth_type)return window.open("/admins/professional_authentications")}return"System"===e.tiding_type?window.open("/account/certification"):void 0;case"CancelUserAuthentication":return window.open("/account/certification");case"CancelUserProCertification":return window.open("/account/certification");case"ApplyAddDepartment":return"Apply"===e.tiding_type?window.open("/admins/department_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAddSchools":return"Apply"===e.tiding_type?window.open("/admins/unit_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAction":switch(e.parent_container_type){case"ApplyShixun":if("Apply"===e.tiding_type)return window.open("/admins/shixun_authorizations");if("System"===e.tiding_type)return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"ApplySubject":if("Apply"===e.tiding_type)return window.open("/admins/subject_authorizations");if("System"===e.tiding_type)return window.open("/paths/".concat(e.parent_container_id));case"TrialAuthorization":if("Apply"===e.tiding_type)return window.open("/managements/trial_authorization");if("System"===e.tiding_type)return window.open("/account/profile")}return;case"JoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));case"StudentJoinCourse":if("Apply"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));if("System"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/students"));case"DealCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"TeacherJoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"Course":if("Delete"===e.tiding_type)return;return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"ArchiveCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"Shixun":return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"Subject":return window.open("/paths/".concat(e.container_id));case"JournalsForMessage":switch(e.parent_container_type){case"Principal":return"";case"HomeworkCommon":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):"";case"GraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):""}case"Memo":return window.open("/forums/".concat(e.parent_container_id));case"Message":return window.open("/forums/");case"Watcher":return window.open("/users/".concat(e.trigger_user.login,"/classrooms"));case"PraiseTread":return"";case"Grade":return"";case"JoinProject":return window.open("/projects/".concat(e.container_id));case"ReporterJoinProject":return window.open("/projects/".concat(e.container_id));case"DealProject":return window.open("/projects/".concat(e.container_id));case"ManagerJoinProject":return window.open("/projects/".concat(e.container_id));case"Poll":switch(e.parent_container_type){case"CommitPoll":return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id));default:return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id))}case"Exercise":switch(e.parent_container_type){case"CommitExercise":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));case"ExerciseScore":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));default:return window.open("/classrooms/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"))}case"StudentGraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"DealStudentTopicSelect":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"GraduationTask":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWork":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWorkScore":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.parent_container_id));case"HomeworkCommon":switch(e.parent_container_type){case"AnonymousCommentFail":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"HomeworkPublish":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"AnonymousAppeal":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));default:if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"))}case"StudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"StudentWorksScoresAppeal":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"ChallengeWorkScore":return"";case"SendMessage":return window.open("/managements/mirror_repository");case"Journal":return window.open("/issues/".concat(e.parent_container_id));case"Issue":return window.open("/issues/".concat(e.container_id));case"PullRequest":return window.open("/projects/".concat(e.parent_container_id,"/pull_requests"));case"Department":return window.open("/account/profile");case"Library":if("Apply"===e.tiding_type)return window.open("/admins/library_applies");if("System"===e.tiding_type)return window.open("/moop_cases/".concat(e.container_id));case"ProjectPackage":if("Destroyed"===e.tiding_type)return;return"Destroyed_end"===e.tiding_type?void 0:"Apply"===e.tiding_type?window.open("/admins/project_package_applies"):window.open("/crowdsourcing/".concat(e.container_id));case"Discuss":return"Hack"===e.parent_container_type&&e.extra?window.open("/myproblems/".concat(e.extra,"/comment")):window.open("/shixuns/".concat(e.identifier,"/shixun_discuss"));case"Video":return"Apply"===e.tiding_type?window.open("/admins/video_applies"):"System"===e.tiding_type?window.open("/users/".concat(null===(n=Object(a["o"])())||void 0===n?void 0:n.login,"/videos")):"";var n;case"PublicCourseStart":return window.open("/classrooms/".concat(e.container_id,"/informs"));case"SubjectStartCourse":return window.open("/paths/".concat(e.container_id));case"ResubmitStudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));case"AdjustScore":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id));case"LiveLink":return window.open("/classrooms/".concat(e.belong_container_id,"/course_videos?open=live"));case"Hack":if(e.extra&&"HackDelete"!==e.parent_container_type)return window.open("/problems/".concat(e.extra,"/edit"));default:return}}},MpT9:function(e,n,t){"use strict";t.r(n),t.d(n,"questionType",(function(){return F})),t.d(n,"difficultType",(function(){return T}));t("T2oS");var o=t("W9HT"),r=(t("IzEo"),t("bx4M")),a=(t("/zsF"),t("PArb")),i=(t("sPJy"),t("bE4q")),c=(t("+L6B"),t("2/Rp")),s=t("q1tI"),l=t.n(s),u=t("ErOA"),d=t("uYtH"),p=t("9kvl"),m=t("/A5M"),_=t.n(m),g=(t("2qtc"),t("kLXV")),w=(t("7Kak"),t("9yH6")),b=(t("miYZ"),t("tsqr")),h=t("WmNS"),y=t.n(h),f=t("9og8"),v=t("tJVT"),k=t("PpiC"),E=(t("5NDa"),t("5rEg")),S=t("WHYC"),A=t("hzL8"),x=t.n(A),C=t("1vsH"),D=E["a"].Search,j=e=>{e.paperlibrary,e.globalSetting;var n=e.loading,t=e.dispatch,o=e.visible,r=e.onCancel,a=void 0===r?()=>{}:r,i=(Object(k["a"])(e,["paperlibrary","globalSetting","loading","dispatch","visible","onCancel"]),Object(S["m"])()),c=Object(s["useState"])(""),u=Object(v["a"])(c,2),d=u[0],p=u[1],m=Object(s["useState"])([]),_=Object(v["a"])(m,2),h=_[0],E=_[1],A=Object(s["useState"])(),j=Object(v["a"])(A,2),O=j[0],F=j[1],T=Object(s["useState"])(!1),M=Object(v["a"])(T,2),P=M[0],I=M[1];Object(s["useEffect"])(()=>{N()},[]);var N=function(){var e=Object(f["a"])(y.a.mark((function e(){var n;return y.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t({type:"paperlibrary/getCourseList",payload:{search:d}});case 2:n=e.sent,n&&E((null===n||void 0===n?void 0:n.courses)||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=Object(f["a"])(y.a.mark((function e(){var n,o,r,a;return y.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(O){e.next=4;break}return b["a"].info("\u60a8\u9700\u8981\u521b\u5efa\u8bfe\u5802\uff0c\u624d\u80fd\u53d1\u9001"),I(!0),e.abrupt("return");case 4:return e.next=6,t({type:"paperlibrary/sendToClass",payload:{course_id:O,id:i.id}});case 6:n=e.sent,W(),n&&0===n.status&&(a=null===n||void 0===n||null===(o=n.first_category_url)||void 0===o||null===(r=o.split("/"))||void 0===r?void 0:r[2],Object(C["u"])("/classrooms/".concat(a,"/exercise/0")));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=()=>{a()};return l.a.createElement(g["a"],{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:o,title:"\u53d1\u9001\u81f3\u8bfe\u5802",okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",confirmLoading:n["paperlibrary/sendToClass"],width:600,onOk:L,onCancel:W},l.a.createElement("div",{className:x.a.wrap},l.a.createElement("div",{className:x.a.title},"\u6e29\u99a8\u63d0\u793a\uff1a\u9009\u62e9\u7684\u8bd5\u5377\u5c06\u4f1a\u53d1\u9001\u5230\u6307\u5b9a\u8bfe\u5802"),l.a.createElement("div",{className:"mb10"},l.a.createElement(D,{placeholder:"\u8f93\u5165\u8bfe\u5802\u540d\u79f0\u7684\u5173\u952e\u5b57\u8fdb\u884c\u641c\u7d22",value:d,onChange:e=>p(e.target.value),onSearch:e=>{p(e),N()}})),l.a.createElement("div",{className:x.a.radioWrap},l.a.createElement(w["default"].Group,{value:O,onChange:e=>{F(e.target.value),I(!1)}},h.map((e,n)=>l.a.createElement(w["default"],{className:x.a.radio,value:e.course_id,key:e.course_id},e.course_name)))),l.a.createElement("div",{className:"c-grey-999"},"\u672c\u5217\u8868\u4ec5\u8bfb\u53d6\u672c\u4eba\u7ba1\u7406\u7684\u3001\u4f7f\u7528\u4e2d\u7684\u8bfe\u5802\uff0c\u4e0d\u542b\u5df2\u7ed3\u675f\u8bfe\u5802"),P&&l.a.createElement("div",{className:x.a.colorFF0000},"\u8bf7\u5148\u9009\u62e9\u8bfe\u5802")))},O=Object(p["a"])(e=>{var n=e.paperlibrary,t=e.loading,o=e.globalSetting;return{paperlibrary:n,globalSetting:o,loading:t.effects}})(j),F={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591a\u9009\u9898",JUDGMENT:"\u5224\u65ad\u9898",COMPLETION:"\u586b\u7a7a\u9898",SUBJECTIVE:"\u7b80\u7b54\u9898",PRACTICAL:"\u5b9e\u8bad\u9898",PROGRAM:"\u7f16\u7a0b\u9898"},T={1:"\u7b80\u5355",2:"\u9002\u4e2d",3:"\u56f0\u96be"},M=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"];class P extends l.a.Component{constructor(e){super(e),this.getPaperData=()=>{var e=window.location.href.split("/").pop();this.setState({loading:!0,id:e}),Object(u["a"])("/api/examination_banks/".concat(e,"/edit_random_exam.json"),{method:"get"}).then(e=>{if(this.setState({loading:!1}),e){var n=e.contents,t=e.examination_bank,o=e.score_settings;this.setState({contents:n,examination_bank:t,score_settings:o})}})},this.state={loading:!1,contents:[],examination_bank:{},score_settings:[],modalVisible:!1,id:null}}componentDidMount(){this.getPaperData()}render(){var e=this.state,n=e.contents,t=e.examination_bank,s=e.score_settings,u=(e.loading,[]),m=0,g=0;Object.keys(F).map(e=>{var t=0;n.map(n=>{n.item_type===e&&(t+=n.quanlity)});var o=s.filter(n=>n.item_type===e);u=[...u,{item_type:e,num:t,score:o.length>0?o[0].score:0}]});var w=u.filter(e=>0!==e.num);w.map(e=>{s.map(n=>{e.item_type===n.item_type&&(m+=e.num*n.score,g+=e.num)})});var b=l.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},l.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",width:"50%",fontWeight:500,fontSize:"16px"}},l.a.createElement("span",null,"\u603b\u8ba1 ",w.length," \u5927\u9898\uff0c ",g," \u5c0f\u9898\uff0c\u603b\u5206 ",m," ","\u5206"),l.a.createElement("span",null,"\u8003\u8bd5\u65f6\u957f\uff1a ",t.time," \u5206\u949f"),l.a.createElement("span",null,"\u8bd5\u5377\u96be\u5ea6\uff1a",T[t.difficulty])),l.a.createElement("div",null,l.a.createElement(c["a"],{type:"primary",onClick:()=>this.setState({modalVisible:!0})},"\u53d1\u9001\u81f3\u8bfe\u5802")));return l.a.createElement("div",{style:{width:1200,margin:"0px auto"}},l.a.createElement(o["a"],{spinning:this.state.loading},l.a.createElement(i["a"],{separator:">",style:{padding:"12px 0px"}},l.a.createElement(i["a"].Item,null,"\u8bd5\u5377\u5e93"),l.a.createElement(i["a"].Item,null,l.a.createElement(d["Link"],{to:"/paperlibrary"},"\u6211\u7684\u8bd5\u5377\u5e93")),l.a.createElement(i["a"].Item,null,"\u8bd5\u5377\u67e5\u770b")),l.a.createElement("div",{style:{height:50,display:"flex",alignItems:"center"}},l.a.createElement("span",{style:{fontSize:20,fontWeight:600}},l.a.createElement("i",{className:"icon-leftarrow iconfont",style:{fontSize:14,marginRight:8,cursor:"pointer"},onClick:()=>{p["c"].goBack()}}),t.name),l.a.createElement("span",{className:_.a.randomIcon},"\u968f\u673a")),l.a.createElement(r["a"],{title:b,style:{marginBottom:200}},w.map((e,t)=>{var o=Array.from(new Set(n.map(n=>n.item_type===e.item_type?n.sub_discipline_id:null).filter(e=>e)));return l.a.createElement("div",null,l.a.createElement("div",{style:{color:"#1890FF"}},M[t],"\u3001",F[e.item_type],l.a.createElement("span",{style:{color:"#666666",marginLeft:5}},"(\u5171 ",e.num," \u9898\uff0c\u6bcf\u9898 ",e.score," \u5206)")),l.a.createElement("div",null,o.map(t=>{var o=n.filter(n=>n.sub_discipline_id===t&&e.item_type===n.item_type);return l.a.createElement("div",{style:{marginTop:20,display:"flex"}},l.a.createElement("div",{style:{width:"30%",fontWeight:"600"}},l.a.createElement("span",null,"".concat(o[0].discipline_name," /\n ").concat(o[0].sub_discipline_name))),l.a.createElement("div",null,Object.keys(T).map(e=>{var n=0;return o.map(t=>(t.difficulty==e&&(n=t.quanlity),null)),n>0?l.a.createElement("span",{style:{color:"#1890FF",marginLeft:30}},T[e],": ",n," \u9898"):null})))})),t===w.length-1?null:l.a.createElement(a["a"],null))})),l.a.createElement(O,{visible:this.state.modalVisible,onCancel:()=>this.setState({modalVisible:!1})})))}}n["default"]=P},hzL8:function(e,n,t){e.exports={wrap:"wrap___3xew9",title:"title___33cBU",radioWrap:"radioWrap___1GJxe",radio:"radio___3W-Oi",colorFF0000:"colorFF0000___2cz8C",pagination:"pagination___NI6NC"}},xKgJ:function(e,n,t){"use strict";t.d(n,"k",(function(){return s})),t.d(n,"c",(function(){return l})),t.d(n,"d",(function(){return u})),t.d(n,"e",(function(){return d})),t.d(n,"n",(function(){return p})),t.d(n,"f",(function(){return m})),t.d(n,"h",(function(){return _})),t.d(n,"i",(function(){return g})),t.d(n,"m",(function(){return w})),t.d(n,"g",(function(){return b})),t.d(n,"l",(function(){return h})),t.d(n,"b",(function(){return y})),t.d(n,"a",(function(){return f})),t.d(n,"j",(function(){return v})),t.d(n,"o",(function(){return k}));var o,r,a=t("9kvl");(function(e){e[e["SuperAdmin"]=1]="SuperAdmin",e[e["Operation"]=2]="Operation",e[e["CertifiedTeacher"]=5]="CertifiedTeacher",e[e["TrainingProduction"]=8]="TrainingProduction",e[e["UncertifiedTeacher"]=12]="UncertifiedTeacher",e[e["Student"]=15]="Student"})(o||(o={})),function(e){e[e["SuperAdmin"]=1]="SuperAdmin",e[e["Operation"]=2]="Operation",e[e["Admin"]=5]="Admin",e[e["Teacher"]=8]="Teacher",e[e["Assistant"]=12]="Assistant",e[e["Student"]=15]="Student"}(r||(r={}));var i=e=>{var n=Object(a["b"])()._store.getState(),t=n.user,o=t.userInfo;return e.some(e=>e==(null===o||void 0===o?void 0:o.role))},c=e=>{var n=Object(a["b"])()._store.getState(),t=n.user,o=t.userInfo;return!!(null===o||void 0===o?void 0:o.own)||e.some(e=>{var n;return e==(null===o||void 0===o||null===(n=o.course)||void 0===n?void 0:n.course_role)})},s=()=>{var e=Object(a["b"])()._store.getState(),n=e.user,t=n.userInfo;return t.main_site},l=()=>{var e,n=Object(a["b"])()._store.getState(),t=n.user,o=t.userInfo;return null===o||void 0===o||null===(e=o.course)||void 0===e?void 0:e.course_is_end},u=()=>c([r.SuperAdmin,r.Operation,r.Admin,r.Teacher,r.Assistant]),d=()=>c([r.SuperAdmin,r.Teacher,r.Admin]),p=()=>c([r.SuperAdmin]),m=()=>c([r.SuperAdmin,r.Operation,r.Admin]),_=()=>c([r.SuperAdmin,r.Operation,r.Admin,r.Teacher]),g=()=>c([r.Assistant]),w=()=>c([r.Student]),b=()=>c([r.SuperAdmin,r.Operation,r.Admin,r.Teacher,r.Assistant,r.Student]),h=()=>{var e,n=Object(a["b"])()._store.getState(),t=n.user,o=t.userInfo;return null===(null===o||void 0===o||null===(e=o.course)||void 0===e?void 0:e.course_role)},y=function(){return i([o.SuperAdmin,o.Operation,o.CertifiedTeacher,o.TrainingProduction])},f=function(){return c([r.Teacher,o.CertifiedTeacher])},v=()=>{var e,n=Object(a["b"])()._store.getState(),t=n.user;return!!(null===(e=t.userInfo)||void 0===e?void 0:e.login)},k=()=>{var e=Object(a["b"])()._store.getState(),n=e.user;return n.userInfo}}}]); |