(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1068de0c"],{"082c":function(e,t,n){},"129f":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},"294d":function(e,t,n){"use strict";var a=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"line-height":"1.8"}},[1==e.qType||2==e.qType?t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.qLoading,expression:"qLoading"}]},[t("div",{staticClass:"q-title",domProps:{innerHTML:e._s(e.question.title)}}),t("div",{staticClass:"q-content"},e._l(e.question.items,(function(n){return t("span",{key:n.id,staticClass:"q-item-contain"},[t("span",{staticClass:"q-item-prefix"},[e._v(e._s(n.prefix))]),t("span",{staticClass:"q-item-content",domProps:{innerHTML:e._s(n.content)}})])})),0)]):3==e.qType?t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.qLoading,expression:"qLoading"}]},[t("div",{staticClass:"q-title",staticStyle:{display:"inline","margin-right":"10px"},domProps:{innerHTML:e._s(e.question.title)}}),t("span",[e._v("(")]),e._l(e.question.items,(function(n){return t("span",{key:n.id},[t("span",{staticClass:"q-item-content",domProps:{innerHTML:e._s(n.content)}})])})),t("span",[e._v(")")])],2):4==e.qType||5==e.qType?t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.qLoading,expression:"qLoading"}]},[t("div",{staticClass:"q-title",domProps:{innerHTML:e._s(e.question.title)}})]):t("div")])},i=[],r=(n("a9e3"),{name:"QuestionShow",props:{question:{type:Object,default:function(){return{}}},qLoading:{type:Boolean,default:!1},qType:{type:Number,default:0}},methods:{}}),o=r,s=n("2877"),l=Object(s["a"])(o,a,i,!1,null,null,null);t["a"]=l.exports},"2ac8":function(e,t,n){"use strict";var a=n("b775");t["a"]={pageList:function(e){return Object(a["a"])("/api/admin/question/page",e)},edit:function(e){return Object(a["a"])("/api/admin/question/edit",e)},select:function(e){return Object(a["a"])("/api/admin/question/select/"+e)},deleteQuestion:function(e){return Object(a["a"])("/api/admin/question/delete/"+e)}}},"333d":function(e,t,n){"use strict";var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[t("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},i=[];n("a9e3");Math.easeInOutQuad=function(e,t,n,a){return e/=a/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(e,t,n){var a=s(),i=e-a,l=20,u=0;t="undefined"===typeof t?500:t;var c=function e(){u+=l;var s=Math.easeInOutQuad(u,a,i,t);o(s),u0,expression:"questionPage.total>0"}],attrs:{total:e.questionPage.total,page:e.questionPage.queryParam.pageIndex,limit:e.questionPage.queryParam.pageSize},on:{"update:page":function(t){return e.$set(e.questionPage.queryParam,"pageIndex",t)},"update:limit":function(t){return e.$set(e.questionPage.queryParam,"pageSize",t)},pagination:e.search}}),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.questionPage.showDialog=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.confirmQuestionSelect}},[e._v("确定")])],1)],1)],1)},i=[],r=n("5530"),o=(n("14d9"),n("d3b7"),n("159b"),n("4de4"),n("2f62")),s=n("333d"),l=n("294d"),u=n("4a0c"),c=n("2ac8"),m={components:{Pagination:s["a"],QuestionShow:l["a"]},data:function(){return{form:{id:null,level:null,subjectId:null,paperType:1,limitDateTime:[],name:"",suggestTime:null,titleItems:[]},subjectFilter:null,formLoading:!1,rules:{level:[{required:!0,message:"请选择年级",trigger:"change"}],subjectId:[{required:!0,message:"请选择学科",trigger:"change"}],paperType:[{required:!0,message:"请选择试卷类型",trigger:"change"}],name:[{required:!0,message:"请输入试卷名称",trigger:"blur"}],suggestTime:[{required:!0,message:"请输入建议时长",trigger:"blur"}]},questionPage:{multipleSelection:[],showDialog:!1,queryParam:{id:null,questionType:null,subjectId:1,pageIndex:1,pageSize:5},listLoading:!0,tableData:[],total:0},currentTitleItem:null}},created:function(){var e=this.$route.query.id,t=this;this.initSubject((function(){t.subjectFilter=t.subjects})),e&&0!==parseInt(e)&&(t.formLoading=!0,u["a"].select(e).then((function(e){t.form=e.response,t.formLoading=!1})))},methods:Object(r["a"])(Object(r["a"])({submitForm:function(){var e=this,t=this;this.$refs.form.validate((function(n){if(!n)return!1;e.formLoading=!0,u["a"].edit(e.form).then((function(n){1===n.code?(t.$message.success(n.message),t.delCurrentView(t).then((function(){t.$router.push("/exam/paper/list")}))):(t.$message.error(n.message),e.formLoading=!1)})).catch((function(t){e.formLoading=!1}))}))},addTitle:function(){this.form.titleItems.push({name:"",questionItems:[]})},addQuestion:function(e){this.currentTitleItem=e,this.questionPage.showDialog=!0,this.search()},removeTitleItem:function(e){this.form.titleItems.remove(e)},removeQuestion:function(e,t){e.questionItems.remove(t)},queryForm:function(){this.questionPage.queryParam.pageIndex=1,this.search()},confirmQuestionSelect:function(){var e=this;this.questionPage.multipleSelection.forEach((function(t){c["a"].select(t.id).then((function(t){e.currentTitleItem.questionItems.push(t.response)}))})),this.questionPage.showDialog=!1},levelChange:function(){var e=this;this.form.subjectId=null,this.subjectFilter=this.subjects.filter((function(t){return t.level===e.form.level}))},search:function(){var e=this;this.questionPage.queryParam.subjectId=this.form.subjectId,this.questionPage.listLoading=!0,c["a"].pageList(this.questionPage.queryParam).then((function(t){var n=t.response;e.questionPage.tableData=n.list,e.questionPage.total=n.total,e.questionPage.queryParam.pageIndex=n.pageNum,e.questionPage.listLoading=!1}))},handleSelectionChange:function(e){this.questionPage.multipleSelection=e},questionTypeFormatter:function(e,t,n,a){return this.enumFormat(this.questionTypeEnum,n)},subjectFormatter:function(e,t,n,a){return this.subjectEnumFormat(n)},resetForm:function(){var e=this.form.id;this.$refs["form"].resetFields(),this.form={id:null,level:null,subjectId:null,paperType:1,limitDateTime:[],name:"",suggestTime:null,titleItems:[]},this.form.id=e}},Object(o["b"])("exam",{initSubject:"initSubject"})),Object(o["b"])("tagsView",{delCurrentView:"delCurrentView"})),computed:Object(r["a"])(Object(r["a"])(Object(r["a"])({},Object(o["c"])("enumItem",["enumFormat"])),Object(o["e"])("enumItem",{questionTypeEnum:function(e){return e.exam.question.typeEnum},paperTypeEnum:function(e){return e.exam.examPaper.paperTypeEnum},levelEnum:function(e){return e.user.levelEnum}})),Object(o["e"])("exam",{subjects:function(e){return e.subjects}}))},p=m,d=(n("f5e8"),n("2877")),f=Object(d["a"])(p,a,i,!1,null,null,null);t["default"]=f.exports},d05f:function(e,t,n){"use strict";n("082c")},f5e8:function(e,t,n){"use strict";n("adeb")}}]);