webpackJsonp([4],{QzL1:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s("zVNV"),a={name:"PaperAnalysis",components:{AnalysisItem:s("oEry").a},data(){return{loaded:!1,windowHeight:window.innerHeight,swiperOption:{slidesPerView:1,spaceBetween:0,autoHeight:!0},answerId:this.$route.query.answerid,anliysisList:[],paper_title:this.$route.query.title}},activated(){document.title=this.$route.query.title||"自己评分",this.anliysisList=[];let e={answerid:this.answerId,paperid:this.$route.query.paperid};this.$showLoading(),Object(i.q)(e).then(e=>{if(e.result){let t=[];e.data.map(e=>{6==e.tktype&&e.tkinfo.childtk.map(e=>{e.showAnswerStatus=!0,e.changeAnswer=!1}),e.showAnswerStatus=!0,e.changeAnswer=!1,t.push(e)}),this.anliysisList=t}else this.$toast(e.msg).then(()=>{this.$router.back()});this.loaded=!0,this.$hideLoading()})},methods:{JudgeScore(e){Number(e.new_score)>Number(e.score)&&(this.$toast("分值不能超过题目总分"),e.new_score=e.score)},save(){let e=[];this.anliysisList.map(t=>{let s=[];6==t.tktype?t.tkinfo.childtk.map((e,t)=>{e.new_score&&(e.userscore=e.new_score),s.push({tkid:t,userscore:e.userscore})}):(t.new_score&&(t.userscore=t.new_score),s.push(t.userscore)),e.push({tkid:t.tkid,userscore:s})});let t={paperid:this.$route.query.paperid,answerid:this.answerId,scorelist:e};this.$showLoading("正在提交"),Object(i.v)(t).then(e=>{this.$hideLoading(),e.result?this.$toast("提交成功","success").then(()=>{this.$router.push({path:"/exam/result",query:{id:this.answerId,type:this.$route.query.type,paperid:this.$route.query.paperid,categoryid:this.$route.query.categoryid,title:this.paper_title}})}):this.$toast(e.msg)})},onClickLeft(){this.$router.go(-1)}}},r={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.loaded?s("div",{staticClass:"analysis-contianer",style:{minHeight:e.windowHeight+"px"}},[s("div",{staticClass:"analysis-contianer-inner"},[s("div",{staticClass:"collectBank-box__head"},[s("van-nav-bar",{staticClass:"van-nav-new",attrs:{title:e.paper_title,"left-arrow":""},on:{"click-left":function(t){return e.onClickLeft()}}})],1),e._v(" "),e.anliysisList.length?s("swiper",{attrs:{options:e.swiperOption}},e._l(e.anliysisList,function(t,i){return s("swiper-slide",{key:i},[s("analysis-item",{attrs:{item:t,level:1}}),e._v(" "),6!=t.tktype?s("div",{staticClass:"score-input"},[e._v("\n          自己评分"),s("van-field",{staticClass:"score-box",attrs:{placeholder:"请输入分数"},on:{input:function(s){return e.JudgeScore(t)}},model:{value:t.new_score,callback:function(s){e.$set(t,"new_score",s)},expression:"item.new_score"}})],1):e._e(),e._v(" "),6==t.tktype?s("div",e._l(t.tkinfo.childtk,function(i,a){return s("div",{key:a},[s("analysis-item",{class:a<t.tkinfo.childtk.length-1&&"ktj-line",attrs:{item:i,number:a+1+")"}}),e._v(" "),s("div",{staticClass:"score-input"},[e._v("\n              自己评分"),s("van-field",{staticClass:"score-box",attrs:{placeholder:"请输入分数"},on:{input:function(t){return e.JudgeScore(i)}},model:{value:i.new_score,callback:function(t){e.$set(i,"new_score",t)},expression:"child.new_score"}})],1)],1)}),0):e._e()],1)}),1):s("Nodata")],1),e._v(" "),s("div",{staticClass:"save-btn"},[s("div",{staticClass:"paper-header-sumbit",on:{click:e.save}},[e._v("提交")])])]):e._e()},staticRenderFns:[]};var n=s("C7Lr")(a,r,!1,function(e){s("s91v")},"data-v-4e029a94",null);t.default=n.exports},oEry:function(e,t,s){"use strict";var i=s("VQKa"),a=s("Q09X"),r={name:"AnalysisItem",components:{MultipleChoice:s("EC01").a,QuestionTitle:a.a,AnalysisInfo:i.a},props:{item:Object,number:String,iscorrect:{type:[String,Number],default:"0"},level:Number,parenttkid:0}},n={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"analysis-item"},[1===e.level?s("question-title",{attrs:{title:e.item.title,"type-name":e.item.tktype_name}}):s("div",{staticClass:"analysis-item__title"},[e._v(e._s(e.number)+"、"),s("font",{domProps:{innerHTML:e._s(e.item.title)}})],1),e._v(" "),6!=e.item.tktype?s("div",{staticClass:"analysis-item__body"},[1==e.item.tktype?s("div",{staticClass:"analysis-subjective"},[e._v(e._s(e.item.useranswer.toString()))]):2==e.item.tktype||3==e.item.tktype||4==e.item.tktype?s("multiple-choice",{attrs:{item:e.item,"user-answer":e.item.useranswer}}):e._e(),e._v(" "),2!=e.$route.query.type&&"OwnScore"!=e.$route.name?s("div",{staticClass:"analysis-score"},[e._v("\n      得分：\n      "),"0"!==e.iscorrect.toString()||1!=e.item.tktype&&5!=e.item.tktype?s("span",{staticClass:"uncorrected"},[e._v(e._s(e.item.userscore))]):s("span",{staticClass:"uncorrected"},[e._v("待批阅")])]):2!=e.$route.query.type?s("div",{staticClass:"analysis-score"},[e._v("\n      得分：\n      "),s("span",{staticClass:"uncorrected"},[e._v(e._s(e.item.userscore))])]):e._e(),e._v(" "),s("analysis-info",{attrs:{item:e.item,parenttkid:e.parenttkid}})],1):e._e()],1)},staticRenderFns:[]};var o=s("C7Lr")(r,n,!1,function(e){s("wcmD")},"data-v-433a0ddb",null);t.a=o.exports},s91v:function(e,t){},wcmD:function(e,t){}});