mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 19:36:47 +08:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-exam-answer"],{"00f9":function(t,e,r){var n=r("4423");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("4f06").default;a("40c02b46",n,!0,{sourceMap:!1,shadowMode:!1})},"151d":function(t,e,r){"use strict";r.r(e);var n=r("4a04"),a=r("4c1f");for(var s in a)"default"!==s&&function(t){r.d(e,t,(function(){return a[t]}))}(s);r("3dd3");var i,o=r("f0c5"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"016fdffa",null,!1,n["a"],i);e["default"]=u.exports},"1a7c":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={props:{backUrl:{type:String,default:""},showBack:{type:Boolean,default:!1}},data:function(){return{}},methods:{toBack:function(){if(""!=this.backUrl)"/pages/my/index"==this.backUrl?uni.switchTab({url:this.backUrl}):uni.navigateTo({url:this.backUrl});else{var t=getCurrentPages(),e=t[t.length-2];e?uni.navigateBack():uni.switchTab({url:"/pages/index/index"})}}}};e.default=n},"2dc1":function(t,e,r){"use strict";var n=r("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(r("014a")),s=function(t){return a.default.get("/xboe/m/exam/alone/test-info?examId="+t)},i=function(t){return a.default.post("/xboe/m/exam/alone/test-start",t)},o=function(t){return a.default.post("/xboe/m/exam/alone/answer/pagelist",t)},u=function(t){return a.default.post("/xboe/m/exam/alone/user/answers",{testId:t})},c=function(t){return a.default.post("/xboe/m/exam/alone/answer/detail?id="+t)},f=function(t){return a.default.postJson("/xboe/m/exam/alone/start",t)},d=function(t){return a.default.post("/xboe/m/exam/alone/update-answer",t)},l=function(t){return a.default.post("/xboe/m/exam/alone/submit",t)},p={getTestInfo:s,getTestStart:i,start:f,updateAnswer:d,submit:l,findAnswers:o,myTestAnswers:u,getAnswerDetail:c};e.default=p},"3dd3":function(t,e,r){"use strict";var n=r("5e2d"),a=r.n(n);a.a},4423:function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.epage[data-v-6f86ac28]{background-color:#fff}.sta-can[data-v-6f86ac28]{text-align:center;color:red;margin-top:20px}.info-row[data-v-6f86ac28]{padding:10px 0}.pager-title[data-v-6f86ac28]{height:40px;display:flex;justify-content:space-between;line-height:40px;padding:0 %?20?%}.pager-title .title-name[data-v-6f86ac28]{margin-left:%?20?%;font-weight:700}.pager-title .titlt-btn[data-v-6f86ac28]{display:flex}.pager-title .titlt-btn .sub[data-v-6f86ac28]{height:20px;border-radius:40px;margin-top:10px;margin-left:%?20?%}.score-box[data-v-6f86ac28]{height:40px;text-align:center;margin:20px}.sta-btn[data-v-6f86ac28]{margin:%?20?% %?50?%}.redText[data-v-6f86ac28]{color:red}.footer[data-v-6f86ac28]{position:fixed;bottom:0;width:100%;height:%?80?%;line-height:%?80?%;border-top:1px solid #d9d9d9;background-color:#fff}.column[data-v-6f86ac28]{color:#838383;font-size:%?40?%;padding:10px 20px}.qitem[data-v-6f86ac28]{padding:10px 20px}.qitem .qitem-info[data-v-6f86ac28]{font-size:1.2em;padding:10px 0}.qitem .qitem-opts[data-v-6f86ac28]{padding:5px 0}.qitem .qitem-opts .qitem-opt[data-v-6f86ac28]{display:flex;margin-bottom:10px;padding:20px 15px;background-color:#fff;border-radius:6px}.qitem .qitem-opts .check[data-v-6f86ac28]{color:#0a0}.bottom-fixed[data-v-6f86ac28]{position:fixed;width:100%;padding:10px 0;bottom:0}.bottom-fixed .bottom-btns[data-v-6f86ac28]{display:flex;justify-content:center}.bottom-fixed .bottom-btns .next[data-v-6f86ac28]{width:45%;border-radius:40px}',""]),t.exports=e},"45ed":function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return s})),r.d(e,"a",(function(){return n}));var n={uToast:r("9421").default,pageTitle:r("151d").default,uIcon:r("fabd").default,uButton:r("27ee").default},a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-view",{},[r("u-toast",{ref:"messager"}),r("page-title",{attrs:{showBack:!0}},[t._v("答卷信息")]),r("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between",padding:"20upx"}},[r("v-uni-view",{staticStyle:{"padding-top":"10upx",color:"#757575"}},[t._v("第"+t._s(t.curIndex+1)+"题 / 共"+t._s(t.total)+"题")]),r("v-uni-view",{staticStyle:{color:"#000000"}},[r("v-uni-text",{staticStyle:{"font-size":"40upx"}},[t._v(t._s(t.toScoreTow(t.score))+"分")])],1)],1),r("v-uni-view",{staticClass:"qitem"},[r("v-uni-view",{staticClass:"qitem-info"},[t._v("["+t._s(t.getQuestionType(t.curItem.type))+"]"+t._s(t.curItem.title))]),3==t.curItem.type?r("v-uni-view",[r("v-uni-view",{staticClass:"qitem-opts"},[r("v-uni-view",{staticClass:"qitem-opt",class:{check:t.curItem.answer&&t.curItem.userAnswer}},[t._v(t._s(t.toLetter(1))+".正确"),t.curItem.answer&&t.curItem.userAnswer?r("u-icon",{attrs:{name:"checkbox-mark",color:"#00aa00"}}):t._e()],1),r("v-uni-view",{staticClass:"qitem-opt",class:{check:!t.curItem.answer&&!t.curItem.userAnswer}},[t._v(t._s(t.toLetter(2))+".错误"),t.curItem.answer||t.curItem.userAnswer?t._e():r("u-icon",{attrs:{name:"checkbox-mark",color:"#00aa00"}})],1)],1)],1):t._l(t.curItem.optionList,(function(e,n){return r("v-uni-view",{key:n},[r("v-uni-view",{staticClass:"qitem-opts"},[r("v-uni-view",{staticClass:"qitem-opt",class:{check:t.userOptIdxs.indexOf(n)>-1}},[t._v(t._s(t.toLetter(n+1))+"."+t._s(e.content)),t.userOptIdxs.indexOf(n)>-1?r("u-icon",{attrs:{name:"checkbox-mark",color:"#00aa00"}}):t._e()],1)],1)],1)})),r("v-uni-view",{staticClass:"info-row"},[t._v("回答结果:"),t.curResult?r("v-uni-text",{staticStyle:{color:"#00aa00"}},[t._v("正确")]):t._e(),t.curResult?t._e():r("v-uni-text",{staticStyle:{color:"#ff0000"}},[t._v("错误")])],1),3==t.curItem.type&&t.showAnswer?r("v-uni-view",{staticClass:"info-row"},[t._v("正确答案:"+t._s(t.curItem&&t.curItem.answer?"正确":"错误"))]):t._e(),3!==t.curItem.type&&t.showAnswer?r("v-uni-view",{staticClass:"info-row"},[t._v("正确答案:"),t._l(t.curItem.optionList,(function(e,n){return r("v-uni-text",{key:n},[t._v(t._s(e.isAnswer?t.toLetter(n+1):""))])}))],2):t._e(),t.curItem.analysis?r("v-uni-view",{staticClass:"info-row"},[t._v("解析:"+t._s(t.curItem.analysis))]):t._e()],2),r("v-uni-view",{staticStyle:{height:"50px"}}),r("v-uni-view",{staticClass:"bottom-fixed"},[r("v-uni-view",{staticClass:"bottom-btns"},[t.curIndex>0?r("u-button",{staticClass:"next",attrs:{type:"info",text:"上一题"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.prevSub.apply(void 0,arguments)}}}):t._e(),t.curIndex<t.total-1?r("u-button",{staticClass:"next",attrs:{type:"primary",text:"下一题"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.nextSub.apply(void 0,arguments)}}}):t._e()],1)],1)],1)},s=[]},"4a04":function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return s})),r.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-view",{staticClass:"top"},[r("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:t.showBack,expression:"showBack"}],staticClass:"back",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toBack()}}},[r("v-uni-text",{staticClass:"arrow"})],1),r("v-uni-view",{staticClass:"title"},[t._t("default")],2)],1)},s=[]},"4c1f":function(t,e,r){"use strict";r.r(e);var n=r("1a7c"),a=r.n(n);for(var s in n)"default"!==s&&function(t){r.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},5227:function(t,e,r){"use strict";var n=r("4ea4");r("4160"),r("c975"),r("d3b7"),r("ac1f"),r("25f0"),r("1276"),r("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(r("2dc1")),s=r("8229"),i=(r("fc78"),r("26cb"),{data:function(){return{toScoreTow:s.toScoreTow,answerId:"",viewShowData:[],showAnswer:!1,showAnalysis:!1,paperDetailData:[],getQuestionType:s.examType,toLetter:s.numberToLetter,total:0,score:0,curItem:{},curIndex:0,curResult:!1,correctOptIdxs:[],userOptIdxs:[]}},computed:{},onLoad:function(t){this.answerId=t.id,t.showAnswer&&(this.showAnswer="true"==t.showAnswer),t.showAnalysis&&(this.showAnalysis="true"==t.showAnalysis),this.answerId&&this.loadData()},methods:{loadData:function(){var t=this;a.default.getAnswerDetail(this.answerId).then((function(e){if(200===e.status){t.score=e.result.score;var r=JSON.parse(e.result.answerJson),n=JSON.parse(e.result.paperJson),a=[];n.forEach((function(t,e){if(t.type<900){var n=r[t.id];3==t.type&&(t.answer="true"==t.answer),n&&(1==t.type?t.userAnswer=n:2==t.type?t.userAnswer=n.split(","):3==t.type&&(t.userAnswer="true"==n)),a.push(t)}})),t.total=a.length,t.paperDetailData=a,t.curItem=t.paperDetailData[t.curIndex],t.judgeAnswer()}else t.$refs.messager.show({message:e.message,type:"error"})}))},judgeAnswer:function(){this.correctOptIdxs=[],this.userOptIdxs=[];var t=this,e=this.curItem;3!=e.type?(e.optionList.forEach((function(r,n){r.isAnswer&&t.correctOptIdxs.push(n),1==e.type?r.id==e.userAnswer&&t.userOptIdxs.push(n):2==e.type&&e.userAnswer.indexOf(r.id)>-1&&t.userOptIdxs.push(n)})),this.correctOptIdxs.toString()==this.userOptIdxs.toString()?this.curResult=!0:this.curResult=!1):e.answer==e.userAnswer?this.curResult=!0:this.curResult=!1},prevSub:function(){0!=this.curIndex&&(this.curIndex--,this.curIndex>-1&&(this.curItem=this.paperDetailData[this.curIndex],this.judgeAnswer()))},nextSub:function(){this.curIndex>=this.total-1||(this.curIndex++,this.curItem=this.paperDetailData[this.curIndex],this.judgeAnswer())}}});e.default=i},"535f":function(t,e,r){"use strict";r.r(e);var n=r("45ed"),a=r("dbd4");for(var s in a)"default"!==s&&function(t){r.d(e,t,(function(){return a[t]}))}(s);r("68e8");var i,o=r("f0c5"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"6f86ac28",null,!1,n["a"],i);e["default"]=u.exports},"5e2d":function(t,e,r){var n=r("68f6");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("4f06").default;a("bd7b12c2",n,!0,{sourceMap:!1,shadowMode:!1})},"68e8":function(t,e,r){"use strict";var n=r("00f9"),a=r.n(n);a.a},"68f6":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.top[data-v-016fdffa]{height:40px;background:linear-gradient(180deg,#6ba0fc,#6297fd)}.top .back[data-v-016fdffa]{float:left;color:#fff;padding-top:8px;padding-left:15px}.top .title[data-v-016fdffa]{text-align:center;font-size:16px;color:#f9fdff;height:40px;text-align:center;width:80%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:40px}.arrow[data-v-016fdffa]:before{content:" ";display:inline-block;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);height:.5rem;width:.5rem;border-width:0 0 2px 2px;border-color:#fff;border-style:solid;position:relative;top:0}',""]),t.exports=e},8229:function(t,e,r){"use strict";r("4160"),r("c975"),r("a9e3"),r("e25e"),r("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.getContentType=a,e.getCourseType=s,e.getUrlPre=i,e.formatDate=o,e.toScore=u,e.toScoreTow=c,e.numberToLetter=f,e.getQuestionType=d,e.examType=l,e.correctJudgment=p,e.userAvatarText=v;var n={10:"视频",20:"音频",30:"图片",40:"文档",41:"图文",50:"scrom包",52:"外部连接",60:"作业",61:"考试",62:"评估",90:"其它"};function a(t){var e=n[t];return e}function s(t){var e={10:"录播课",21:"直播课",20:"录播课",30:"面授课",40:"混合式"};return e[t]}function i(t){var e="https:"==document.location.prototype,r="https";return r=e?"https":"http",r}function o(t){if(null!=t&&""!=t){var e=new Date(Number(t)).getFullYear(),r=new Date(Number(t)).getMonth()+1,n=new Date(Number(t)).getDate(),a=new Date(Number(t)).getHours(),s=new Date(Number(t)).getMinutes(),i=new Date(Number(t)).getSeconds();r<10&&(r="0"+r),n<10&&(n="0"+n),a<10&&(a="0"+a),s<10&&(s="0"+s),i<10&&(i="0"+i);var o=e+"-"+r+"-"+n+" "+a+":"+s+":"+i;return o}}function u(t){return t&&0!=t?(""+t).indexOf(".")>-1?t.toFixed(1):t+".0":"未评"}function c(t){return t?(""+t).indexOf(".")>-1?t.toFixed(2):t+".00":"0"}function f(t){var e="";while(t>0){var r=t%26;r=0===r?r=26:r,e=String.fromCharCode(96+parseInt(r))+e,t=(t-r)/26}return e.toUpperCase()}function d(t){var e="";switch(t){case 101:e="单选";break;case 102:e="多选";break;case 103:e="判断";break}return e}function l(t){var e="";switch(t){case 1:e="单选";break;case 2:e="多选";break;case 3:e="判断";break}return e}function p(t){var e=!1;return 101==t.type||103==t.type?t.options.forEach((function(r){r.answer&&(e=r.id==t.userAnswer)})):t.options.forEach((function(t){e=t.answer==t.isCheck})),e}function v(t){if(t){var e=t.length;e>2&&(t=t.substring(e-2))}return t}},dbd4:function(t,e,r){"use strict";r.r(e);var n=r("5227"),a=r.n(n);for(var s in n)"default"!==s&&function(t){r.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},fc78:function(t,e,r){"use strict";function n(t){if(null==t||""==t)return"";var e=new Date(t),r=e.getFullYear(),n=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,a=e.getDate()<10?"0"+e.getDate():e.getDate(),s=e.getHours()<10?"0"+e.getHours():e.getHours(),i=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),o=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();return r+"-"+n+"-"+a+" "+s+":"+i+":"+o}function a(t){var e=parseInt(t),r=Math.floor(e/3600)<10?"0"+Math.floor(e/3600):Math.floor(e/3600),n=Math.floor(e/60%60)<10?"0"+Math.floor(e/60%60):Math.floor(e/60%60),a=Math.floor(e%60)<10?"0"+Math.floor(e%60):Math.floor(e%60),s="";return"00"!==r&&(s+="".concat(r,"小时")),"00"===n&&"00"===r||(s+="".concat(n,"分")),s+="".concat(a,"秒"),s}r("e25e"),Object.defineProperty(e,"__esModule",{value:!0}),e.formatDate=n,e.formatSeconds=a}}]); |