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