(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0144733c"],{1107:function(t,s,i){"use strict";i.d(s,"c",(function(){return n})),i.d(s,"a",(function(){return a})),i.d(s,"b",(function(){return r}));var e=i("b775");function n(t){return Object(e["a"])({url:"/app/train/queryTrainPlanPage",method:"get",params:t})}function a(t){return Object(e["a"])({url:"/app/train/queryCourseByTrainingPlanId",method:"get",params:t})}function r(t){return Object(e["a"])({url:"/app/train/queryQuestionBankByTrainingPlanId",method:"get",params:t})}},"8b22":function(t,s,i){"use strict";var e=i("a33e"),n=i.n(e);n.a},a33e:function(t,s,i){},f3f2:function(t,s,i){"use strict";i.r(s);var e=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"container"},[i("Header",{attrs:{title:"试题"}}),i("ul",{staticClass:"ul_box"},[t.questionListSingle.length>0?i("li",{staticClass:"question_box"},[i("h2",{staticStyle:{"text-align":"left","margin-top":"20px"}},[t._v("单选题")]),t._l(t.questionListSingle,(function(s,e){return i("div",{key:e,staticClass:"questionList_box"},[i("div",{staticClass:"title_box"},[t._v(" "+t._s(e+1)+". "+t._s(s.questionTitle)+" ( "+t._s(s.questionScore)+"分 ) ")]),i("div",{staticClass:"list_box"},[i("van-radio-group",{staticStyle:{"margin-top":"8px"},attrs:{direction:"horizontal"},model:{value:s.submitAnswers,callback:function(i){t.$set(s,"submitAnswers",i)},expression:"item.submitAnswers"}},t._l(s.questionOptions,(function(s,e){return i("van-radio",{key:e,attrs:{name:s.split("+++")[0].split(".")[0]}},[t._v(t._s(s.split("+++")[1]))])})),1)],1)])}))],2):t._e(),t.questionListMore.length>0?i("li",{staticClass:"question_box"},[i("h2",{staticStyle:{"text-align":"left","margin-top":"20px"}},[t._v("多选题")]),t._l(t.questionListMore,(function(s,e){return i("div",{key:e,staticClass:"questionList_box"},[i("div",{staticClass:"title_box"},[t._v(" "+t._s(e+1)+". "+t._s(s.questionTitle)+" ( "+t._s(s.questionScore)+"分 ) ")]),i("div",{staticClass:"list_box"},[i("van-checkbox-group",{staticStyle:{"margin-left":"10px"},model:{value:s.submitAnswers,callback:function(i){t.$set(s,"submitAnswers",i)},expression:"item.submitAnswers"}},t._l(s.questionOptions,(function(s,e){return i("van-checkbox",{key:e,staticStyle:{"margin-top":"8px"},attrs:{name:s.split("+++")[0].split(".")[0],shape:"square"}},[t._v(" "+t._s(s.split("+++")[1])+" ")])})),1)],1)])}))],2):t._e(),t.questionListJudge.length>0?i("li",{staticClass:"question_box"},[i("h2",{staticStyle:{"text-align":"left","margin-top":"20px"}},[t._v("判断题")]),t._l(t.questionListJudge,(function(s,e){return i("div",{key:e,staticClass:"questionList_box"},[i("div",{staticClass:"title_box"},[t._v(" "+t._s(e+1)+". "+t._s(s.questionTitle)+" ( "+t._s(s.questionScore)+"分 ) ")]),i("div",{staticClass:"list_box"},[i("van-radio-group",{attrs:{direction:"horizontal"},model:{value:s.submitAnswers,callback:function(i){t.$set(s,"submitAnswers",i)},expression:"item.submitAnswers"}},t._l(s.questionOptions,(function(s,e){return i("van-radio",{key:e,staticStyle:{"margin-top":"8px"},attrs:{name:s.split("+++")[0].split(".")[0].split(".")[0]}},[t._v(t._s(s.split("+++")[1]))])})),1)],1)])}))],2):t._e()]),i("div",{staticClass:"btn_box",on:{click:t.submit}},[t._v("提 交")])],1)},n=[],a=(i("4160"),i("ac1f"),i("1276"),i("159b"),i("9a83"),i("f564")),r=(i("96cf"),i("1da1")),o=i("1107"),u={name:"TrainList",data:function(){return{isLoading:!1,list:[],questionListSingle:[],questionListMore:[],questionListJudge:[]}},mounted:function(){this.initList()},methods:{initList:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function s(){var i,e;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,Object(o["b"])({trainingPlanId:t.$route.query.id});case 2:if(i=s.sent,e=i.data,200===e.code){s.next=6;break}return s.abrupt("return",Object(a["a"])({type:"danger",message:e.msg}));case 6:t.list=e.data,t.list.forEach((function(s){"1"===s.questionTypes?t.questionListSingle.push(s):"2"===s.questionTypes?t.questionListMore.push(s):"3"===s.questionTypes&&t.questionListJudge.push(s)}));case 8:case"end":return s.stop()}}),s)})))()},onRefresh:function(){this.initList(),this.isLoading=!1},submit:function(){this.list.forEach((function(t){Array.isArray(t.submitAnswers)||(t.submitAnswers=t.submitAnswers.split("."))})),console.log(this.list)}}},l=u,c=(i("8b22"),i("2877")),p=Object(c["a"])(l,e,n,!1,null,"52fa80a5",null);s["default"]=p.exports}}]);