| 1 |
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e,a,s){var i;return i=function(e,a){if("object"!=t(e)||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var i=s.call(e,a||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===a?String:Number)(e)}(a,"string"),(a="symbol"==t(i)?i:String(i))in e?Object.defineProperty(e,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[a]=s,e}System.register(["./vendor-legacy-8856a2a6.js","./TestQuestionsServers-legacy-519384de.js","./LJFlexBox-legacy-f7dcb900.js","./TestQuestionOptions-legacy-2efb73e9.js","./index-legacy-240e7575.js","./variable-legacy-5f84074d.js","./LJFlexBox.vue_vue_type_style_index_0_scoped_62c7247f_lang-legacy-9d357713.js"],(function(t,a){"use strict";var s,i,n,o,r,l,c,u,d,m,p,f,v,x,g=document.createElement("style");return g.textContent=".auto-submit-dialog .submit-content[data-v-dfb05ff2]{text-align:center;display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;padding-bottom:20px}.auto-submit-dialog .submit-content.auto-submit-loading[data-v-dfb05ff2]{color:#0a77f6}.auto-submit-dialog .submit-content.auto-submit-success[data-v-dfb05ff2]{color:green}.auto-submit-dialog .submit-content.auto-submit-error[data-v-dfb05ff2]{color:#ff000a}.auto-submit-dialog .submit-content i[data-v-dfb05ff2]{font-size:28px}.auto-submit-dialog .submit-content .submit-text[data-v-dfb05ff2]{font-size:18px;padding:0 10px}.exit-rest-dialog .content[data-v-073de021]{font-size:18px;text-align:center;display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;color:#f56c6c}.exit-rest-dialog .content i[data-v-073de021]{font-size:28px;padding-right:10px}.start-the-exam-views[data-v-e7e89482]{user-select:none;position:relative;height:calc(100vh - var(--main-nav-height) - var(--main-tabs-height) - var(--main-footer-height) - 62px);background-color:#fff;border-radius:8px;overflow:hidden;padding:0 20px}.start-the-exam-views .loading-test-paper[data-v-e7e89482]{position:absolute;z-index:20;left:0;top:0;width:100%;height:100%;background-color:#fff;z-index:10;display:flex;justify-content:center;align-items:center}.start-the-exam-views .loading-test-paper .loading-test-paper-main[data-v-e7e89482]{line-height:30px}.start-the-exam-views .loading-test-paper .loading-test-paper-main .label[data-v-e7e89482]{padding-right:10px;color:#5b5b5b}.start-the-exam-views .loading-test-paper .loading-test-paper-main .value[data-v-e7e89482]{color:#3c3c3c}.start-the-exam-views .loading-test-paper .loading-test-paper-main .but-list[data-v-e7e89482]{display:flex;gap:20px;margin-top:20px;justify-content:center}.start-the-exam-views.is-full-screen[data-v-e7e89482]{background-color:#fff;padding:0!important}.start-the-exam-views.is-full-screen .start-the-exam-header .fullscreen-but .icon-open-full-screen[data-v-e7e89482]{display:none}.start-the-exam-views.is-full-screen .start-the-exam-header .fullscreen-but .icon-close-full-screen[data-v-e7e89482]{display:block}.start-the-exam-views.is-full-screen .start-the-exam-header .name[data-v-e7e89482]{padding:0 20px}.start-the-exam-views.is-full-screen .start-the-exam-header .exam-bg .exam-status[data-v-e7e89482]{padding:10px 20px}.start-the-exam-views.is-full-screen .start-the-exam-main[data-v-e7e89482]{height:calc(100vh - 153px);box-sizing:border-box;padding-bottom:30px}.start-the-exam-views.is-full-screen .start-the-exam-main .test-questions-lists[data-v-e7e89482]{padding:0 30px;margin-top:25px}.start-the-exam-views .start-the-exam-header[data-v-e7e89482]{height:173px;box-sizing:border-box;border-bottom:1px #cccccc solid;position:relative;z-index:1}.start-the-exam-views .start-the-exam-header .fullscreen-but[data-v-e7e89482]{z-index:2;position:absolute;left:15px;top:15px;transition:.1s}.start-the-exam-views .start-the-exam-header .fullscreen-but[data-v-e7e89482]:hover{cursor:pointer;text-shadow:0 0 10px #ccc;scale:1.2}.start-the-exam-views .start-the-exam-header .fullscreen-but .iconfont[data-v-e7e89482]{font-size:26px;color:#265cf0}.start-the-exam-views .start-the-exam-header .fullscreen-but .icon-close-full-screen[data-v-e7e89482]{display:none}.start-the-exam-views .start-the-exam-header .name[data-v-e7e89482]{height:80px;line-height:80px;text-align:center;font-size:30px;font-weight:600;letter-spacing:.5em;color:#265cf0}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status[data-v-e7e89482]{padding:15px 0;gap:10px;user-select:none;white-space:nowrap}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .label[data-v-e7e89482]{color:#7e7d7e;position:absolute}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .time[data-v-e7e89482]{padding:10px 25px;font-size:24px;background-color:#f6f9fc}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .time[data-v-e7e89482] .el-statistic{width:fit-content}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .time[data-v-e7e89482] .el-statistic .number{font-size:28px;color:#2256e5;font-weight:700}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .progress[data-v-e7e89482]{max-width:500px;min-width:240px}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .progress .use-num[data-v-e7e89482],.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .progress .total-num[data-v-e7e89482]{color:#1651ee}.start-the-exam-views .start-the-exam-header .exam-bg .exam-status .progress[data-v-e7e89482] .el-progress-bar__innerText{color:#fff!important}.start-the-exam-views .start-the-exam-main[data-v-e7e89482]{min-width:600px;height:calc(100vh - var(--main-nav-height) - var(--main-footer-height) - 153px - 150px);overflow-y:auto;overflow-x:auto}.start-the-exam-views .start-the-exam-main .test-questions-lists[data-v-e7e89482]{margin-top:25px;border-bottom:1px #cccccc solid}.table-name[data-v-e7e89482]{border-radius:8px 8px 0 0;width:524px;text-align:center;height:70px;border:1px solid #EBEBEB;line-height:70px;border-bottom:none;font-size:20px;background-image:linear-gradient(rgba(38,92,240,.1),rgba(38,92,240,.04))}.table-list[data-v-e7e89482]{width:524px;border:1px solid #eee;display:flex;height:70px;padding:0 40px}.table-list .table-title[data-v-e7e89482],.table-list .table-cont[data-v-e7e89482]{width:50%;height:100%;display:flex;align-items:center;font-size:14px}.table-list .table-title[data-v-e7e89482]{border-right:1px solid #eee;margin-right:10px;padding-right:20px;color:#666}.table-list .table-cont[data-v-e7e89482]{margin-left:10px;justify-content:flex-end;color:#333}[data-v-e7e89482] .el-slider__runway.disabled .el-slider__bar,[data-v-e7e89482] .el-slider__runway.disabled .el-slider__button{background-color:#2256e5}[data-v-e7e89482] .el-slider__runway.disabled .el-slider__button{border-color:#fff}\n",document.head.appendChild(g),{setters:[function(t){s=t.r,i=t.g,n=t.u,o=t.h,r=t.o,l=t.e},function(t){c=t.u},function(t){u=t.L},function(t){d=t.T,m=t.a,p=t.b},function(t){f=t.n,v=t.$},function(t){x=t.O},function(){}],execute:function(){var a={__name:"AutoSubmitDialog",emits:["confirm"],setup:function(t,e){var a=e.expose,i=e.emit,n=s(!1),o=s(!0),r=s("loading"),l=s({loading:"考试时间结束,正在自动为您交卷",success:"考试时间结束,已自动交卷成功",error:"交卷失败,请尝试重新交卷"}),c=function(t){n.value=!0,console.log("考试时间结束,已自动交卷 id:",t)},u=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.value="loading",n.value=!0,o.value=!0,setTimeout((function(){r.value=t?"success":"error",o.value=!1}),2e3)};function d(){n.value=!1}return a({handleInit:c,handleHide:d}),{__sfc:!0,emits:i,dialogVisible:n,loading:o,submitStatus:r,submitTexts:l,handleInit:c,handleSubmit:u,handleRestSubmit:function(){u(!0)},handleConfirm:function(){n.value=!1,o.value=!1,i("confirm")},handleHide:d}}},g=f(a,(function(){var t=this,a=t._self._c,s=t._self._setupProxy;return a("div",{staticClass:"auto-submit-dialog"},[a("el-dialog",{attrs:{visible:s.dialogVisible,"append-to-body":!0,width:"460px","show-close":!1,"close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){s.dialogVisible=t}}},[a("div",{staticClass:"submit-content",class:e({"is-loading":s.loading},"auto-submit-"+s.submitStatus,s.submitStatus)},[s.loading?a("i",{staticClass:"el-icon-loading"}):t._e(),"success"===s.submitStatus?a("i",{staticClass:"el-icon-success"}):t._e(),"error"===s.submitStatus?a("i",{staticClass:"el-icon-error"}):t._e(),a("span",{staticClass:"submit-text"},[t._v(t._s(s.submitTexts[s.submitStatus]))])]),s.loading?t._e():a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},["success"===s.submitStatus?a("el-button",{attrs:{type:"primary",icon:"el-icon-circle-check"},on:{click:s.handleConfirm}},[t._v(" 确 定 ")]):t._e(),"error"===s.submitStatus?a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:s.handleRestSubmit}},[t._v(" 重新交卷 ")]):t._e()],1)])],1)}),[],!1,null,"dfb05ff2",null,null).exports,h=f({__name:"ExitRestDialog",emits:["confirm"],setup:function(t,e){var a=e.expose,i=e.emit,n=s(!1),o=function(){console.log("考试时间结束,请退出重考"),n.value=!0};return a({handleInit:o}),{__sfc:!0,dialogVisible:n,emits:i,handleInit:o,handleConfirm:function(){n.value=!1,i("confirm")}}}},(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e("div",{staticClass:"exit-rest-dialog"},[e("el-dialog",{attrs:{visible:a.dialogVisible,"append-to-body":!0,width:"460px","show-close":!1,"close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){a.dialogVisible=t}}},[e("div",{staticClass:"content"},[e("i",{staticClass:"el-icon-warning-outline"}),e("span",[t._v("考试时间结束,请退出重考")])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",icon:"el-icon-refresh-left"},on:{click:a.handleConfirm}},[t._v(" 确 定 ")])],1)])],1)}),[],!1,null,"073de021",null,null).exports,b={__name:"startTheExamViews",setup:function(t){var e=i(),a=n(),f=s(),b=s(),_=s(),w=s({}),y=s(!0),C=s(e.query.id||null),S=s({}),T=s(e.query.test_paper),k=s(e.query.status||0),E=o((function(){return v.getters.is_taking_exam_ing})),P=s(!1),R=s(!1),j=s(!1),z=s(0),I=s([]),q=o((function(){return I.value.filter((function(t){return t.answer&&"success"===t.answer_status})).length})),D=o((function(){return I.value.length?Number((q.value/I.value.length*100).toFixed(2)):0}));function B(){v.dispatch("startTakeExam");var t=w.value.answer_time;z.value=Date.now()+6e4*t}function Q(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};HTTP.get("test_question_record",{test_record:C.value,fields:"id,test_record,test_question,answer"}).then((function(e){0===e.code&&e.data.results.map((function(t){var e=I.value.findIndex((function(e){return e.id===t.test_question}));e>-1&&(I.value[e].answer=t.answer,I.value[e].answer_status="success")})),t()})).catch((function(t){console.log("error:",t)}))}var F=function(){v.dispatch("endTakeExam")};var L=function(){_.value.handleInit()};var A=function(){a.back()};function H(){HTTP.getById("test_record",C.value).then((function(t){S.value=t.data,O()}))}var O=function(){if(!T.value)return l.exports.Message.error("没有试卷ID");y.value=!0,HTTP.getReadById("test_paper",T.value).then((function(t){w.value=t.data;var e=t.data.test_paper_Questions.map((function(t){return t.answer=null,t.answer_status="",t.options=JSON.parse(t.option),t}));c(e,t.data.total_score),I.value=JSON.parse(JSON.stringify(e))})).catch((function(t){console.log("error:",t)})).finally((function(){setTimeout((function(){y.value=!1}),1e3)}))};function J(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;R.value||P.value||(0===t?R.value=!0:1===t&&(P.value=!0),HTTP.post("submit_test_paper",{test_record_id:C.value,is_overtime:t}).then((function(t){if(0!==t.code)return new Error(t);l.exports.Message.success("交卷成功"),setTimeout((function(){v.dispatch("endTakeExam").then((function(){A()}),1500)}))})).catch((function(t){l.exports.Message.error(t.msg||"交卷失败,请重试")})).finally((function(){setTimeout((function(){P.value&&b.value.handleHide(),R.value=!1,P.value=!1}),200)})))}return r((function(){F(),C.value?H():O()})),{__sfc:!0,route:e,router:a,startTheExamRef:f,autoSubmitDialogRef:b,exitRestDialogRef:_,testPaper:w,testPaperLoading:y,testRecordId:C,testRecordObj:S,testPaperId:T,testRecordStatus:k,takingExamIng:E,autoSubmit:P,userSubmit:R,startLoading:j,deadline:z,test_questions_list:I,use_num:q,user_progress:D,updateStartTakeExam:B,continueAnswerQuestions:function(){Q(B)},testQuestionRecord:Q,handleStartTakeExam:function(){var t=new Date(w.value.start_date).getTime();if((new Date).getTime()<t)return l.exports.Message.warning("考试时间未到");j.value=!0,HTTP.post("start_test",{test_id:T.value}).then((function(t){if(console.log("resp:",t),0!==t.code)return new Error(t);B()})).catch((function(t){console.log("error:",t),l.exports.Message.error(t.msg||"开始考试失败,请重试")})).finally((function(){setTimeout((function(){return j.value=!1}),1e3)}))},handleEndTakeExam:F,handleAnswerQuestion:function(t,e,a){var s={test_record_id:C.value,question_id:e,answer:t,index:a};I.value[s.index].answer_status="loading",HTTP.post("answer_question",s).then((function(t){if(0!==t.code)return new Error(t);I.value[s.index].answer_status="success"})).catch((function(t){I.value[s.index].answer_status="error",l.exports.Message.error("第".concat(s.index,"题提交答案失败,请重新提交"))}))},handleAutoSubmit:function(){b.value.handleInit()},handleExitRest:L,handleConfirmExitRest:function(){v.dispatch("endTakeExam").then((function(){A()}))},handleBack:A,handleFullScreen:function(){return f.value.tagFullScreen()},getRestRecord:H,getTestQuestions:O,handleAbandoningExams:function(){l.exports.MessageBox.confirm("您即将主动放弃本次考试,是否继续?","放弃考试",{type:"warning"}).then((function(){v.dispatch("endTakeExam").then((function(){A()}))}))},handleSubmit:J,hilarity:function(){E.value&&(1===w.value.overtime_type?L():J(1))},LJFlexBox:u,TestQuestions:d,TestQuestionTitle:m,TestQuestionOptions:p,AutoSubmitDialog:g,ExitRestDialog:h,OVERTIME_TYPE:x}}},_=function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e("div",{directives:[{name:"fullscreen",rawName:"v-fullscreen"}],ref:"startTheExamRef",staticClass:"start-the-exam-views"},[a.takingExamIng?t._e():e("div",{directives:[{name:"loading",rawName:"v-loading",value:a.testPaperLoading,expression:"testPaperLoading"}],staticClass:"loading-test-paper",attrs:{"element-loading-text":"正在加载考试试卷中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),function(){}.apply(null,arguments)}}},[a.testPaperLoading?t._e():e("div",{staticClass:"loading-test-paper-main"},[e("div",{staticClass:"table-name"},[t._v(t._s(a.testPaper.name))]),e("div",{staticClass:"table-list",staticStyle:{"border-bottom":"none","border-top":"none"}},[e("div",{staticClass:"table-title"},[t._v("题数")]),e("div",{staticClass:"table-cont"},[t._v(t._s(a.testPaper.total_num)+"道")])]),e("div",{staticClass:"table-list",staticStyle:{"border-bottom":"none"}},[e("div",{staticClass:"table-title"},[t._v("总分")]),e("div",{staticClass:"table-cont"},[t._v(t._s(a.testPaper.total_score)+"分")])]),e("div",{staticClass:"table-list",staticStyle:{"border-bottom":"none"}},[e("div",{staticClass:"table-title"},[t._v("考试时长")]),e("div",{staticClass:"table-cont"},[t._v(t._s(a.testPaper.answer_time)+"分钟")])]),e("div",{staticClass:"table-list",staticStyle:{"border-bottom":"none"}},[e("div",{staticClass:"table-title"},[t._v("考试时间结束")]),e("div",{staticClass:"table-cont"},[t._v(" "+t._s(a.OVERTIME_TYPE[a.testPaper.overtime_type])+" ")])]),e("div",{staticClass:"table-list",staticStyle:{"border-radius":"0 0 8px 8px"}},[e("div",{staticClass:"table-title"},[t._v("考试截止时间")]),e("div",{staticClass:"table-cont"},[t._v(t._s(a.testPaper.end_date))])]),e("div",{staticClass:"but-list"},[e("el-button",{attrs:{type:"primary",plain:""},on:{click:a.handleBack}},[t._v(" 返 回 ")]),e("el-button",{attrs:{type:"primary",loading:a.startLoading},on:{click:a.handleStartTakeExam}},[t._v(" 开始答题 ")])],1)])]),e("div",{staticClass:"start-the-exam-header"},[e("div",{staticClass:"fullscreen-but",on:{click:a.handleFullScreen}},[e("i",{staticClass:"iconfont icon-open-full-screen",attrs:{title:"点击进入全屏考试"}}),e("i",{staticClass:"iconfont icon-close-full-screen",attrs:{title:"点击退出全屏考试"}})]),e("div",{staticClass:"name"},[t._v(" "+t._s(a.testPaper.name)+" ")]),e("div",{staticClass:"exam-bg",staticStyle:{"background-color":"#F9FAFC"}},[e(a.LJFlexBox,{staticClass:"exam-status",attrs:{"justify-content":"space-between"}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e("div",{staticClass:"label",staticStyle:{"margin-left":"30px"}},[e("i",{staticClass:"el-icon-time",staticStyle:{color:"#2256e5"}}),e("span",{staticStyle:{"margin-left":"5px"}},[t._v("考试倒计时")])]),e("div",{staticClass:"time",staticStyle:{"margin-left":"300px"}},[e("el-statistic",{ref:"statistic",attrs:{format:"HH:mm:ss",value:a.deadline,"time-indices":""},on:{finish:a.hilarity}})],1)]),e("div",{staticClass:"progress",staticStyle:{"margin-right":"60px"}},[e("el-slider",{attrs:{max:a.test_questions_list.length,disabled:""},model:{value:a.use_num,callback:function(t){a.use_num=t},expression:"use_num"}}),e(a.LJFlexBox,{attrs:{"justify-content":"space-between","margin-top":"6px"}},[e("div",{staticClass:"use-num"},[t._v("已完成:"+t._s(a.use_num)+" 题")]),e("div",{staticClass:"total-num"},[t._v("共:"+t._s(a.test_questions_list.length)+" 题")])])],1)])],1)]),e("div",{staticClass:"start-the-exam-main"},[e("div",{staticClass:"test-questions-lists"},t._l(a.test_questions_list,(function(s,i){return e(a.TestQuestions,{key:s.id,attrs:{padding:"15px 0",item:i}},[e(a.TestQuestionTitle,{attrs:{type:"examination",score:s.score,index:i},model:{value:s.content,callback:function(e){t.$set(s,"content",e)},expression:"item.content"}}),e(a.TestQuestionOptions,{attrs:{type:"examination",options:s.options,"answer-status":s.answer_status,"show-answer":!1,padding:"5px 2em"},on:{changeAnswer:function(t){return a.handleAnswerQuestion(t,s.id,i)}},model:{value:s.answer,callback:function(e){t.$set(s,"answer",e)},expression:"item.answer"}})],1)})),1),e(a.LJFlexBox,{attrs:{"justify-content":"center","margin-top":"15px"}},[e("el-button",{attrs:{type:"info",plain:""},on:{click:a.handleAbandoningExams}},[t._v("放弃考试 ")]),e("el-button",{attrs:{type:"primary",loading:a.userSubmit},on:{click:function(t){return a.handleSubmit(0)}}},[t._v(" 完成提交 ")])],1)],1),e(a.AutoSubmitDialog,{ref:"autoSubmitDialogRef"}),e(a.ExitRestDialog,{ref:"exitRestDialogRef",on:{confirm:a.handleConfirmExitRest}})],1)};t("default",f(b,_,[],!1,null,"e7e89482",null,null).exports)}}}))}();
|