(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0384152e"],{"0f95":function(e,t,s){"use strict";s.r(t);var n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-container examPaper-container"},[s("el-card",{staticClass:"box-card",attrs:{id:"paper"}},[s("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[s("div",{staticClass:"exam-title"},["teacherView"!==e.asType?s("div",{staticClass:"title text-center"},[e._v(e._s(e.examInfo.name))]):s("div",{staticClass:"title text-center"},[e._v(e._s(e.paperInfo.name))]),"teacherEdit"===e.asType?s("div",{staticClass:"student-info flex flex-around"},[s("span",[e._v("学生账号: "+e._s(e.studentAccount))]),s("span",[e._v("学生姓名: "+e._s(e.studentName))])]):e._e(),s("div",{staticClass:"infos flex flex-around"},["teacherView"!==e.asType?s("span",[e._v("考核时间周期: "+e._s(e.examInfo.startTime)+"至"+e._s(e.examInfo.endTime))]):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("span",[e._v("开始答卷时间: "+e._s(e.examResult.startTime))]):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("span",[e._v("交卷时间: "+e._s(e.examResult.endTime))]):e._e(),"single"!==e.paperInfo.type?s("span",[e._v("考卷总分: "+e._s(e.paperInfo.totalScore))]):e._e(),"single"!==e.paperInfo.type?s("span",[e._v("考卷及格分: "+e._s(e.paperInfo.passScore))]):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("span",[e._v("总得分: "+e._s(e.examResult.score))]):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("span",[e._v("考核结果: "+e._s(e.enums.examResultStatus[e.examResult.status]))]):e._e()])])]),s("div",{staticClass:"box-content"},[e._l(e.questionSections,(function(t,n){return s("div",{attrs:{id:"questionSections"}},["Radio"===t.sectionType?s("div",{staticClass:"section-div"},["single"!==e.paperInfo.type?s("div",{staticClass:"section-title"},[e._v(" "+e._s(e.enums.sectionChineseNumber[n])+"、"+e._s(t.sectionName)+" "),s("span",{staticClass:"title-score-des"},[e._v("(每题"+e._s(t["scorePerQuestion"])+"分,共"+e._s(t["questionTotal"])+"题,共计"+e._s(t["sectionTotalScore"])+"分)")])]):e._e(),e._l(t.sectionQuestions,(function(t,n){return s("div",{staticClass:"section-questions question-radio"},["text"===t.contentType?s("div",{staticClass:"question-title"},["single"!==e.paperInfo.type?s("span",[e._v(e._s(n+1)+"、")]):e._e(),e._v(e._s(t.content)+" ")]):e._e(),"html"===t.contentType?s("div",{staticClass:"question-title-html  flex flex-start"},[s("span",{staticStyle:{float:"left"}},["single"!==e.paperInfo.type?s("span",[e._v(e._s(n+1)+"、")]):e._e()]),s("div",{staticClass:"content-vhtml",staticStyle:{float:"left"},domProps:{innerHTML:e._s(t.content)}})]):e._e(),"exam"===e.asType||"studentView"===e.asType||"teacherEdit"===e.asType?s("div",{staticClass:"options"},[s("el-radio-group",{attrs:{disabled:"exam"!==e.asType&&"teacherView"!==e.asType},model:{value:e.studentAnswer.answerContent[t.id],callback:function(s){e.$set(e.studentAnswer.answerContent,t.id,s)},expression:"studentAnswer.answerContent[question.id]"}},e._l(t.options,(function(t){return s("el-radio",{staticClass:"block",attrs:{label:t.choice}},[e._v(" "+e._s(t.choice)+"、"+e._s(t.content)+" ")])})),1)],1):e._e(),"teacherView"===e.asType?s("div",{staticClass:"options-show"},[e._l(t.options,(function(n){return s("div",{staticClass:"block"},[e._v(" "+e._s(n.choice)+"、"+e._s(n.content)+" "),e.analysis&&e.questionAnalysis.hasOwnProperty(t.id)?s("div",{staticClass:"question-analysis per"},[s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择次数：")]),s("span",[e._v(e._s(e.questionAnalysis[t.id][n.choice])+"次")])]),s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择比例：")]),s("el-progress",{staticStyle:{width:"150px"},attrs:{percentage:(100*e.questionAnalysis[t.id]["percentage"+n.choice]).toFixed(0),color:"#13ce66"}})],1)]):e._e()])})),e.analysis?s("div",{staticClass:"question-analysis-this"},[s("el-tag",{staticClass:"right-answer",attrs:{type:"info",size:"medium"}},[e._v("标准答案:"+e._s(t.standardAnswer)+" ")]),e.questionAnalysis.hasOwnProperty(t.id)?s("el-tag",{staticClass:"right-answer",staticStyle:{"margin-left":"10px"},attrs:{type:"success",size:"medium"}},[e._v("得分率: "+e._s((100*e.questionAnalysis[t.id]["scoreRate"]).toFixed(0))+"% ")]):e._e()],1):e._e()],2):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("div",{staticClass:"answer"},[e.studentAnswer.answerContent[t.id]===t.standardAnswer?s("span",{staticClass:"right"},[s("i",{staticClass:"el-icon-check"},[e._v(" 正确")])]):s("span",{staticClass:"wrong"},[s("i",{staticClass:"el-icon-close"},[e._v(" 错误")])]),"teacherEdit"===e.asType||"studentView"===e.asType&&e.examInfo.canViewAnswer?s("el-tag",{staticClass:"right-answer",attrs:{type:"info",size:"medium"}},[e._v(" 标准答案:"+e._s(t.standardAnswer)+" ")]):e._e()],1):e._e()])}))],2):e._e(),"Multiple"===t.sectionType?s("div",{staticClass:"section-div"},["single"!==e.paperInfo.type?s("div",{staticClass:"section-title"},[e._v(" "+e._s(e.enums.sectionChineseNumber[n])+"、"+e._s(t.sectionName)+" "),s("span",{staticClass:"title-score-des"},[e._v("(每题"+e._s(t["scorePerQuestion"])+"分,共"+e._s(t["questionTotal"])+"题,共计"+e._s(t["sectionTotalScore"])+"分)")])]):e._e(),e._l(t.sectionQuestions,(function(t,n){return s("div",{staticClass:"section-questions question-multiple"},["text"===t.contentType?s("div",{staticClass:"question-title"},["single"!==e.paperInfo.type?s("span",[e._v(e._s(n+1)+"、")]):e._e(),e._v(e._s(t.content)+" ")]):e._e(),"html"===t.contentType?s("div",{staticClass:"question-title-html clearfix"},[s("span",{staticStyle:{float:"left"}},["single"!==e.paperInfo.type?s("span",[e._v(e._s(n+1)+"、")]):e._e()]),s("div",{staticClass:"content-vhtml",staticStyle:{float:"left"},domProps:{innerHTML:e._s(t.content)}})]):e._e(),"exam"===e.asType||"studentView"===e.asType||"teacherEdit"===e.asType?s("div",{staticClass:"options"},[s("el-checkbox-group",{attrs:{disabled:"exam"!==e.asType&&"teacherView"!==e.asType},model:{value:e.studentAnswer.answerContent[t.id],callback:function(s){e.$set(e.studentAnswer.answerContent,t.id,s)},expression:"studentAnswer.answerContent[question.id]"}},e._l(t.options,(function(t){return s("el-checkbox",{staticClass:"block",attrs:{label:t.choice}},[e._v(" "+e._s(t.choice)+"、"+e._s(t.content)+" ")])})),1)],1):e._e(),"teacherView"===e.asType?s("div",{staticClass:"options-show"},[e._l(t.options,(function(n){return s("div",{staticClass:"block"},[e._v(" "+e._s(n.choice)+"、"+e._s(n.content)+" "),e.analysis&&e.questionAnalysis.hasOwnProperty(t.id)?s("div",{staticClass:"question-analysis per"},[s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择次数：")]),s("span",[e._v(e._s(e.questionAnalysis[t.id][n.choice])+"次")])]),s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择比例：")]),s("el-progress",{staticStyle:{width:"150px"},attrs:{percentage:(100*e.questionAnalysis[t.id]["percentage"+n.choice]).toFixed(0),color:"#13ce66"}})],1)]):e._e()])})),e.analysis?s("div",{staticClass:"question-analysis-this"},[s("el-tag",{staticClass:"right-answer",attrs:{type:"info",size:"medium"}},[e._v(" 标准答案:"+e._s(t.standardAnswers.toString())+" ")]),e.questionAnalysis.hasOwnProperty(t.id)?s("el-tag",{staticClass:"right-answer",staticStyle:{"margin-left":"10px"},attrs:{type:"success",size:"medium"}},[e._v("得分率: "+e._s((100*e.questionAnalysis[t.id]["scoreRate"]).toFixed(0))+"% ")]):e._e()],1):e._e()],2):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("div",{staticClass:"answer"},[e.isTwoArrHasSameItems(e.studentAnswer.answerContent[t.id],t.standardAnswers)?s("span",{staticClass:"right"},[s("i",{staticClass:"el-icon-check"},[e._v(" 正确")])]):s("span",{staticClass:"wrong"},[s("i",{staticClass:"el-icon-close"},[e._v(" 错误")])]),"teacherEdit"===e.asType||"studentView"===e.asType&&e.examInfo.canViewAnswer?s("el-tag",{staticClass:"right-answer",attrs:{type:"info"}},[e._v(" 标准答案:"+e._s(t.standardAnswers.join("、"))+" ")]):e._e()],1):e._e()])}))],2):e._e(),"Judge"===t.sectionType?s("div",{staticClass:"section-div"},["single"!==e.paperInfo.type?s("div",{staticClass:"section-title"},[e._v(" "+e._s(e.enums.sectionChineseNumber[n])+"、"+e._s(t.sectionName)+" "),s("span",{staticClass:"title-score-des"},[e._v("(每题"+e._s(t["scorePerQuestion"])+"分,共"+e._s(t["questionTotal"])+"题,共计"+e._s(t["sectionTotalScore"])+"分)")])]):e._e(),e._l(t.sectionQuestions,(function(t,n){return s("div",{staticClass:"section-questions question-judge"},["text"===t.contentType?s("div",{staticClass:"question-title"},["single"!==e.paperInfo.type?s("span",[e._v(e._s(n+1)+"、")]):e._e(),e._v(e._s(t.content)+" ")]):e._e(),"html"===t.contentType?s("div",{staticClass:"question-title-html clearfix"},[s("span",{staticStyle:{float:"left"}},["single"!==e.paperInfo.type?s("span",[e._v(e._s(n+1)+"、")]):e._e()]),s("div",{staticClass:"content-vhtml",staticStyle:{float:"left"},domProps:{innerHTML:e._s(t.content)}})]):e._e(),"exam"===e.asType||"studentView"===e.asType||"teacherEdit"===e.asType?s("div",{staticClass:"options"},[s("el-radio-group",{attrs:{disabled:"exam"!==e.asType&&"teacherView"!==e.asType},model:{value:e.studentAnswer.answerContent[t.id],callback:function(s){e.$set(e.studentAnswer.answerContent,t.id,s)},expression:"studentAnswer.answerContent[question.id]"}},[s("el-radio",{staticClass:"block",attrs:{label:"true"}},[e._v(" 正确 ")]),s("el-radio",{staticClass:"block",attrs:{label:"false"}},[e._v(" 错误 ")])],1)],1):e._e(),"teacherView"!==e.asType||e.analysis?e._e():s("div",{staticClass:"options-show flex flex-start"},[s("div",{staticStyle:{"margin-left":"30px"}},[e._v("正确")]),s("div",{staticStyle:{"margin-left":"30px"}},[e._v("错误")])]),"teacherView"===e.asType&&e.analysis?s("div",{staticClass:"options-show"},[s("div",[e._v("正确")]),e.analysis&&e.questionAnalysis.hasOwnProperty(t.id)?s("div",{staticClass:"question-analysis per"},[s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择次数：")]),s("span",[e._v(e._s(e.questionAnalysis[t.id]["true"])+"次")])]),s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择比例：")]),s("el-progress",{staticStyle:{width:"150px"},attrs:{percentage:100*e.questionAnalysis[t.id]["percentageTrue"],color:"#13ce66"}})],1)]):e._e(),s("div",[e._v("错误")]),e.analysis&&e.questionAnalysis.hasOwnProperty(t.id)?s("div",{staticClass:"question-analysis per"},[s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择次数：")]),s("span",[e._v(e._s(e.questionAnalysis[t.id]["false"])+"次")])]),s("div",{staticClass:"flex flex-start"},[s("span",[e._v("选择比例：")]),s("el-progress",{staticStyle:{width:"150px"},attrs:{percentage:100*e.questionAnalysis[t.id]["percentageFalse"],color:"#13ce66"}})],1)]):e._e(),e.analysis?s("div",{staticClass:"question-analysis-this"},[s("el-tag",{staticClass:"right-answer",attrs:{type:"info",size:"medium"}},[e._v(" 标准答案:"+e._s(e.enums.questionJudgeAnswer[t.standardAnswer])+" ")]),e.questionAnalysis.hasOwnProperty(t.id)?s("el-tag",{staticClass:"right-answer",staticStyle:{"margin-left":"10px"},attrs:{type:"success",size:"medium"}},[e._v("得分率: "+e._s((100*e.questionAnalysis[t.id]["scoreRate"]).toFixed(0))+"% ")]):e._e()],1):e._e()]):e._e(),"studentView"===e.asType||"teacherEdit"===e.asType?s("div",{staticClass:"answer"},[e.studentAnswer.answerContent[t.id]===t.standardAnswer?s("span",{staticClass:"right"},[s("i",{staticClass:"el-icon-check"},[e._v(" 正确")])]):s("span",{staticClass:"wrong"},[s("i",{staticClass:"el-icon-close"},[e._v(" 错误")])]),"teacherEdit"===e.asType||"studentView"===e.asType&&e.examInfo.canViewAnswer?s("el-tag",{staticClass:"right-answer",attrs:{type:"info"}},[e._v(" 标准答案:"+e._s(e.enums.questionJudgeAnswer[t.standardAnswer])+" ")]):e._e()],1):e._e()])}))],2):e._e()])})),("teacherEdit"===e.asType||e.asType,e._e())],2)]),e._e(),"exam"===e.asType?s("div",{staticClass:"left-time-box"},[s("div",{staticStyle:{color:"#999"}},[e._v("当前时间")]),s("div",{staticStyle:{color:"#999"}},[e._v(e._s(e.now_time_text))]),s("hr"),s("div",[e._v("剩余时间")]),s("div",[e._v(e._s(e.left_time_text))])]):e._e()],1)},a=[],i=(s("4160"),s("c975"),s("b0c0"),s("b64b"),s("d3b7"),s("ac1f"),s("25f0"),s("466d"),s("159b"),s("3835")),r=(s("96cf"),s("1da1")),o=s("5c8a"),c=s("cf45"),u=s("d808"),l=s("a020"),d=s("d4ec"),p=s("bee2"),m=s("8ce4"),f=s("7b67");function h(e){return v.apply(this,arguments)}function v(){return v=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m["a"])(f["c"]+"consumer/questionResult/list","get",t));case 1:case"end":return e.stop()}}),e)}))),v.apply(this,arguments)}function x(e){return _.apply(this,arguments)}function _(){return _=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m["a"])(f["c"]+"consumer/questionResult/save","post_json",t));case 1:case"end":return e.stop()}}),e)}))),_.apply(this,arguments)}function w(e){return y.apply(this,arguments)}function y(){return y=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m["a"])(f["c"]+"consumer/questionResult/update","post_json",t));case 1:case"end":return e.stop()}}),e)}))),y.apply(this,arguments)}function g(e){return b.apply(this,arguments)}function b(){return b=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m["a"])(f["c"]+"consumer/questionResult/delete","post_json",t));case 1:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)}function C(e){return T.apply(this,arguments)}function T(){return T=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(m["a"])(f["c"]+"consumer/questionResult/info/"+t,"get",{}));case 1:case"end":return e.stop()}}),e)}))),T.apply(this,arguments)}var O=s("2ca2"),k=function(){function e(){Object(d["a"])(this,e)}return Object(p["a"])(e,null,[{key:"getList",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,s,n){var a,r,o,c,u,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a={page:t,size:s},a=Object.assign(a,n),e.next=4,h(a);case 4:if(r=e.sent,o=Object(i["a"])(r,1),c=o[0],0!==s){e.next=11;break}return e.abrupt("return",c.data);case 11:return u=O["a"].generateListMybatisPlus(c.data),l=u[0],e.abrupt("return",[l,u[1]]);case 14:case"end":return e.stop()}}),e)})));function t(t,s,n){return e.apply(this,arguments)}return t}()},{key:"save",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var s,n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,x(t);case 2:if(s=e.sent,n=Object(i["a"])(s,1),a=n[0],2e4!==a.code){e.next=9;break}return e.abrupt("return",!0);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"update",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var s,n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:if(s=e.sent,n=Object(i["a"])(s,1),a=n[0],2e4!==a.code){e.next=9;break}return e.abrupt("return",!0);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"remove",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var s,n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,g(t);case 2:if(s=e.sent,n=Object(i["a"])(s,1),a=n[0],2e4!==a.code){e.next=9;break}return e.abrupt("return",!0);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getOne",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var s,n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,C(t);case 2:if(s=e.sent,n=Object(i["a"])(s,1),a=n[0],2e4!==a.code){e.next=9;break}return e.abrupt("return",a.data);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}]),e}(),I=s("ff09"),q={name:"teacherExamPaper",watch:{},computed:{asType:function(){return this.$route.query.hasOwnProperty("asType")?this.$route.query["asType"]:void 0},examId:function(){return this.$route.query.hasOwnProperty("examId")?Math.ceil(this.$route.query["examId"]):void 0},id:function(){return this.$route.query.hasOwnProperty("id")?Math.ceil(this.$route.query["id"]):void 0},studentAccount:function(){return this.$route.query.hasOwnProperty("studentAccount")?this.$route.query["studentAccount"]:void 0},studentName:function(){return this.$route.query.hasOwnProperty("studentName")?this.$route.query["studentName"]:void 0}},data:function(){return{isTwoArrHasSameItems:c["m"],enums:{sectionChineseNumber:["一","二","三","四","五","六","七","八","九","十"],questionJudgeAnswer:u["a"].questionJudgeAnswer,examResultStatus:u["a"].examResultStatus},examInfo:{},examResult:{paper:{sections:[]}},questionSections:[],paperInfo:{},studentAnswer:{answerContent:{}},match:{},left_time_timer:void 0,left_time:"",left_time_text:"00:00:00",now_time_text:"00:00:00",timing_save_timer:void 0,timing_update_timer:void 0,sectionScore:[0,0,0,0,0,0,0,0],analysis:!1,questionAnalysis:{}}},mounted:function(){this.getExamInfo()},beforeDestroy:function(){this.TimeMethods().leavePage()},methods:{getExamInfo:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var s,n,a,r,u,d,p,m,f,h,v,x,_,w,y,g;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:s={},n=[],t.t0=e.asType,t.next="exam"===t.t0?5:"studentView"===t.t0?35:"teacherEdit"===t.t0?50:"teacherView"===t.t0?68:73;break;case 5:return t.next=7,ExamModel.getStudentExam(0,0,{examId:e.examId});case 7:if(a=t.sent,r=Object(i["a"])(a,1),n=r[0],1!==n.length){t.next=32;break}if(e.examInfo=n[0],"Going"===e.examInfo.examStatus){t.next=15;break}return e.$router.push("/exam/studentHistoryExam"),t.abrupt("return",!1);case 15:return t.next=17,ExamModel.startExam(e.examId);case 17:for(s=t.sent,s.answerContent&&e.$set(e.studentAnswer,"answerContent",s.answerContent),u=function(t){"Multiple"===s.paper.sections[t].sectionType&&s.paper.sections[t].sectionQuestions.forEach((function(n,a){e.studentAnswer.answerContent[n.question.id]||e.$set(e.studentAnswer.answerContent,s.paper.sections[t].sectionQuestions[a].question.id,[])})),"Completion"===s.paper.sections[t].sectionType&&s.paper.sections[t].sectionQuestions.forEach((function(n,a){e.studentAnswer.answerContent[n.question.id]||e.$set(e.studentAnswer.answerContent,s.paper.sections[t].sectionQuestions[a].question.id,[])})),"Match"===s.paper.sections[t].sectionType&&s.paper.sections[t].sectionQuestions.forEach((function(s){e.MatchMethods().setInitObj(s.question,t),e.studentAnswer.answerContent[s.question.id]&&e.$nextTick((function(){e.MatchMethods().setLines(s.question)}))}))},d=0;d<s.paper.sections.length;d++)u(d);p=s.paper.sections,s.paper.questionRandom&&(m=[],p.forEach((function(e){var t=Object(c["d"])(e.sectionQuestions);m.push(t)})),p=m),e.questionSections=p,e.studentAnswer.examId=e.examId,e.studentAnswer.paperId=s.paper.id,e.studentAnswer.subId=s.paper.subId,e.TimeMethods().secondCount(),e.TimeMethods().timingSaveAnswer(),e.TimeMethods().timingUpdateExamInfo(),t.next=33;break;case 32:Object(o["d"])("未找到该考核信息");case 33:return e.examResult=s,t.abrupt("break",73);case 35:return t.next=37,ExamModel.findOverExamById(e.id);case 37:for(s=t.sent,e.studentAnswer.answerContent=s.answerContent,f=function(t){"Completion"===s.paper.sections[t].sectionType&&s.paper.sections[t].sectionQuestions.forEach((function(n,a){n.question["answerSize"]=n.question["answerList"].length,e.studentAnswer.answerContent[n.question.id]||e.$set(e.studentAnswer.answerContent,s.paper.sections[t].sectionQuestions[a].question.id,[])})),"Match"===s.paper.sections[t].sectionType&&s.paper.sections[t].sectionQuestions.forEach((function(s){e.MatchMethods().setInitObj(s.question,t),e.studentAnswer.answerContent[s.question.id]&&e.$nextTick((function(){e.MatchMethods().setLines(s.question)}))}))},h=0;h<s.paper.sections.length;h++)f(h);return e.examInfo=s.exam,e.questionSections=s.paper.sections,s.blankQuestionScoreMap||(s.blankQuestionScoreMap={}),s.completionQuestionScoreMap||(s.completionQuestionScoreMap={}),s.essayQuestionScoreMap||(s.essayQuestionScoreMap={}),s.analysisQuestionScoreMap||(s.analysisQuestionScoreMap={}),e.examResult=s,e.calSectionScore(),t.abrupt("break",73);case 50:return t.next=52,k.getOne(e.id);case 52:return v=t.sent,t.next=55,I["a"].getOne(v.examId);case 55:return x=t.sent,t.next=58,l["a"].getOne(x.paperId);case 58:for(_=t.sent,_.sections=JSON.parse(_.sectionInfos),e.studentAnswer.answerContent=JSON.parse(v.objContent),w=0;w<_.sections.length;w++);return e.examInfo=x,e.questionSections=JSON.parse(_.sectionInfos),e.examResult=v,e.paperInfo=_,e.calSectionScore(),t.abrupt("break",73);case 68:return t.next=70,l["a"].getOne(e.id);case 70:return y=t.sent,y?(y.sections=JSON.parse(y.sectionInfos),g=y,e.examResult=g,e.paperInfo=JSON.parse(JSON.stringify(g)),e.questionSections=g.sections):Object(o["d"])("未找到该考卷信息"),t.abrupt("break",73);case 73:case"end":return t.stop()}}),t)})))()},clickSendBtn:function(e){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function s(){var n,a;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(e){s.next=10;break}return s.next=3,Object(o["a"])("确定要交卷吗？交卷后不能再次答题！");case 3:if(!s.sent){s.next=8;break}return s.next=6,ExamModel.endExam(t.studentAnswer);case 6:n=s.sent,n&&(Object(o["e"])("提交考卷成功"),t.$router.push("/exam/studentHistoryExam"));case 8:s.next=14;break;case 10:return s.next=12,ExamModel.endExam(t.studentAnswer);case 12:a=s.sent,a&&(Object(o["e"])("提交考卷成功"),t.$router.push("/exam/studentHistoryExam"));case 14:case"end":return s.stop()}}),s)})))()},clickTeacherSaveBtn:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["a"])("确定要保存答卷修改信息吗？");case 2:if(!t.sent){t.next=7;break}return t.next=5,ExamModel.updateExamResult(e.examResult);case 5:s=t.sent,s&&(Object(o["e"])("保存答卷信息成功"),e.getExamInfo());case 7:case"end":return t.stop()}}),t)})))()},clickPrintSaveBtn:function(){var e="<html><head><title></title></head><body>",t="</body>",s=document.getElementById("paper").innerHTML,n=document.body.innerHTML;return document.body.innerHTML=e+s+t,window.print(),document.body.innerHTML=n,Object(o["e"])("刷新页面后才能正常使用其他功能！"),!1},clickExportWord:function(){PaperModel.exportOnePaper(this.examResult.id,this.paper.name)},MatchMethods:function(){var e=this;return{setInitObj:function(t,s){e.$set(e.match,t.id,{clickLeftIndex:void 0,clickRightIndex:void 0,sectionIndex:s,svgList:{},leftOptions:t.leftOptions,rightOptions:t.rightOptions})},clickLeftOption:function(t,s,n){e.$set(e.match[t],"clickLeftIndex",s),e.$set(e.match[t],"leftOptions",n.leftOptions),e.$set(e.match[t],"rightOptions",n.rightOptions)},clickRightOption:function(t,s){e.$set(e.match[t],"clickRightIndex",s),"exam"===e.asType&&this.reDrawLine(t)},reDrawLine:function(t){if(void 0!==e.match[t].clickLeftIndex&&void 0!==e.match[t].clickRightIndex){for(var s in e.match[t].svgList)e.match[t].svgList.hasOwnProperty(s)&&(e.match[t].svgList[s][0]===e.match[t].clickLeftIndex&&(document.querySelector("#"+s).remove(),e.match[t].svgList[s]=[void 0,void 0]),e.match[t].svgList[s][1]===e.match[t].clickRightIndex&&(document.querySelector("#"+s).remove(),e.match[t].svgList[s]=[void 0,void 0]));for(var n in e.match[t].svgList)e.match[t].svgList.hasOwnProperty(n)&&void 0===e.match[t].svgList[n][0]&&delete e.match[t].svgList[n];this.drawLine(t,e.match[t].clickLeftIndex,e.match[t].clickRightIndex)}},drawLine:function(t,s,n){s+=1,n+=1;var a=150,i=250,r=21,o=21;r=21+50*(s-1),o=21+50*(n-1);var u="svg"+Math.ceil(1e4*Math.random()).toString();e.$set(e.match[t].svgList,u,[s-1,n-1]);var l='<svg id="'+u+'" style="position:absolute;width: 400px;height: 370px;"><line x1="'+a+'" y1="'+r+'" x2="'+i+'" y2="'+o+'" style="stroke: red; stroke-width: 2;"></line><svg>';Object(c["j"])(document.querySelector(".lines-"+t),l),this.setMapAnswer(t)},deleteAllLine:function(t){for(var s in e.match[t].svgList)e.match[t].svgList.hasOwnProperty(s)&&(document.querySelector("#"+s).remove(),e.match[t].svgList[s]=[void 0,void 0]);for(var n in e.match[t].svgList)e.match[t].svgList.hasOwnProperty(n)&&void 0===e.match[t].svgList[n][0]&&delete e.match[t].svgList[n];e.match[t].svgList={},e.match[t].clickLeftIndex=void 0,e.match[t].clickRightIndex=void 0},setMapAnswer:function(t){var s={},n=e.match[t].leftOptions,a=e.match[t].rightOptions;for(var i in e.match[t].svgList)if(e.match[t].svgList.hasOwnProperty(i)){var r=e.match[t].svgList[i][0],o=e.match[t].svgList[i][1];s[n[r]]=a[o]}e.studentAnswer.answerContent[t]=s},setLines:function(t){var s=this,n=e.studentAnswer.answerContent[t.id];Object.keys(n).forEach((function(e){var a=t.leftOptions.indexOf(e),i=t.rightOptions.indexOf(n[e]);setTimeout((function(){s.drawLine(t.id,a,i)}),1500)}))}}},TimeMethods:function(){var e=this;return{secondCount:function(){var t=this,s=new Date,n=new Date(e.examInfo.endTime);e.left_time=n-s,e.left_time_timer=setInterval((function(){e.left_time=e.left_time-1e3;var s=t.countdown(e.left_time),n=s.bool,a=s.hours,i=void 0===a?"00":a,r=s.minutes,c=void 0===r?"00":r,u=s.seconds,l=void 0===u?"00":u;n&&(Object(o["d"])("时间结束，将自动提交考卷，请勿刷新页面！"),t.leavePage(),e.clickSendBtn(!0)),e.left_time_text=i+":"+c+":"+l,e.now_time_text=date_format((new Date).getTime(),"HH:mm:ss")}),1e3)},countdown:function(e){var t=!1;if(e<=0)return t=!0,{bool:t};var s=parseInt(e/1e3/60/60%24,10);s<10&&(s="0"+s);var n=parseInt(e/1e3/60%60,10);n<10&&(n="0"+n);var a=parseInt(e/1e3%60,10);return a<10&&(a="0"+a),{bool:t,hours:s,minutes:n,seconds:a}},timingSaveAnswer:function(){e.timing_save_timer=setInterval(Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,ExamModel.updateExamAnswerInTime({examId:e.examId,answerContent:e.studentAnswer.answerContent});case 2:t.sent;case 4:case"end":return t.stop()}}),t)}))),1e4)},timingUpdateExamInfo:function(){var t=this;e.timing_update_timer=setInterval(Object(r["a"])(regeneratorRuntime.mark((function s(){var n,a,r,c,u;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,ExamModel.getStudentExam(0,0,{examId:e.examInfo.id});case 2:n=s.sent,a=Object(i["a"])(n,1),r=a[0],1===r.length&&(c=r[0],c.endTime!==e.examInfo.endTime&&(clearInterval(e.left_time_timer),u=Math.ceil((new Date(c.endTime)-new Date(e.examInfo.endTime))/1e3),Object(o["e"])("注意，本场考核已经增加了"+u+"分钟延时考核时间"),e.$set(e.examInfo,"endTime",c.endTime),t.secondCount()));case 6:case"end":return s.stop()}}),s)}))),2e3)},leavePage:function(){clearInterval(e.left_time_timer),clearInterval(e.timing_save_timer),clearInterval(e.timing_update_timer)}}},calSectionScore:function(){var e=this;this.questionSections.forEach((function(t,s){switch(t.sectionType){case"Radio":e.sectionScore[s]=e.examResult["radioQuestionScore"];break;case"Multiple":e.sectionScore[s]=e.examResult["multipleQuestionScore"];break;case"Judge":e.sectionScore[s]=e.examResult["judgeQuestionScore"];break;case"Match":e.sectionScore[s]=e.examResult["matchQuestionScore"];break;case"Blank":e.sectionScore[s]=e.examResult["blankQuestionScore"];break;case"Completion":e.sectionScore[s]=e.examResult["completionQuestionScore"];break;case"Essay":e.sectionScore[s]=e.examResult["essayQuestionScore"];break;case"Analysis":e.sectionScore[s]=e.examResult["analysisQuestionScore"];break}}))},clickAnalysisBtn:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.analysis){t.next=8;break}if("Over"!==e.examInfo.examStatus){t.next=6;break}return t.next=4,AnalysisModel.getSingleQuestionAnalysis({examId:e.examId});case 4:s=t.sent,s[e.examId]&&(e.questionAnalysis=Object(c["n"])(s[e.examId],"questionId"),e.analysis=!0);case 6:t.next=9;break;case 8:e.analysis=!1;case 9:case"end":return t.stop()}}),t)})))()}}},S=q,A=(s("35ca"),s("da85"),s("2877")),R=Object(A["a"])(S,n,a,!1,null,"323dd93a",null);t["default"]=R.exports},"2f23":function(e,t,s){},"35ca":function(e,t,s){"use strict";s("2f23")},"9cb9":function(e,t,s){},da85:function(e,t,s){"use strict";s("9cb9")}}]);