(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7abe2d4a"],{"0dbd":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"type-setting"},[n("h2",[t._v("教学宝排版")]),n("set-table",{attrs:{tableData:t.tableData,tableOption:t.tableOption}}),n("div",{staticClass:"save-btn"},[n("el-button",{attrs:{id:"saveSetting"},on:{click:t.handleSetting}},[t._v(" 保存设置 ")])],1)],1)},r=[],o=(n("4160"),n("a434"),n("b0c0"),n("159b"),n("2674")),c=n("b063"),l=n("f1ed"),i={name:"TypeSetting",components:{SetTable:o["a"]},data:function(){return{isAccurate:null,tableData:[],TypeSetData:[{title:"共性问题",cellItem:[{text:"显示【共性问题】模式",name:"common",value:!0},{text:"显示共性问题的【错题原题】",name:"common_wrong",value:!0}]},{title:"试卷讲评",cellItem:[{text:"显示【试卷讲评】",name:"paper",value:!0},{text:"显示试卷讲评的【错题原题】",name:"paper_wrong",value:!0}]},{title:"真题速递",cellItem:[{text:"显示【真题速递】",name:"real_topic",value:!0}]},{title:"同学优解",cellItem:[{text:"显示【同学优解】",name:"classmateOptimization",value:!0}]}],tableOption:[{label:"一级栏目",prop:"title"},{label:"二级栏目",prop:"cellItem",class:"show-text"},{label:"设置",class:"switch-block",type:"switch"}],params:{template_id:this.$route.query.template_id,json:""}}},computed:{},created:function(){this.getProduct()},mounted:function(){},methods:{getProduct:function(){var t=this;Object(c["b"])().then((function(e){if(t.isAccurate=e.isPrecise,1==t.isAccurate){var n=t.TypeSetData;n.forEach((function(t,e){"真题速递"===t.title&&n.splice(e,1)})),t.tableData=n}else t.tableData=t.TypeSetData;t.getTemplateSet()}))},getTemplateSet:function(){var t=this,e={template_id:this.params.template_id},n=Object(l["b"])(e);Object(c["j"])(n).then((function(e){var n=JSON.parse(e.data);t.tableData.forEach((function(t){var e=t.cellItem;e.forEach((function(t){for(var e in n)t.name===e&&(t.value=!!n[e])}))}))}))},handleSetting:function(){var t=this,e={common:1,common_wrong:1,paper:1,paper_wrong:1,real_topic:1,classmateOptimization:1};this.tableData.forEach((function(t){var n=t.cellItem;n.forEach((function(t){for(var n in e)t.name===n&&(e[n]=t.value?1:0)}))})),1==this.isAccurate&&(e.real_topic=0),this.params.json=JSON.stringify(e);var n=Object(l["b"])(this.params);Object(c["l"])(n).then((function(e){1===e.status?t.$alert("保存成功","信息",{confirmButtonText:"确定",callback:function(e){t.$router.go(-1)}}):t.$message({type:"error",message:e.msg})}))}}},u=i,s=(n("9041"),n("2877")),p=Object(s["a"])(u,a,r,!1,null,null,null);e["default"]=p.exports},2674:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"set-table"},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","header-cell-style":{background:"#f2f2f2",color:"#606266"}}},[t._l(t.tableOption,(function(e,a){return[e.type?t._e():n("el-table-column",{key:a,attrs:{prop:e.prop,label:e.label,width:e.width},scopedSlots:t._u([{key:"default",fn:function(a){return["string"==typeof a.row[e.prop]?n("div",[t._v(" "+t._s(t._f("dataFormat")(a.row[e.prop],e.formatter))+" ")]):t._l(a.row.cellItem,(function(a,r){return n("div",{key:r,class:e.class},[t._v(" "+t._s(a.text)+" ")])}))]}}],null,!0)}),"switch"===e.type?n("el-table-column",{key:a,attrs:{prop:e.prop,label:e.label,width:e.width},scopedSlots:t._u([{key:"default",fn:function(a){return t._l(a.row.cellItem,(function(a,r){return n("div",{key:r,class:e.class},[n("el-switch",{attrs:{"active-color":"#16ae68","inactive-color":"#ddd"},on:{change:function(e){return t.handleChange(a.name,a.value,r)}},model:{value:a.value,callback:function(e){t.$set(a,"value",e)},expression:"list.value"}})],1)}))}}],null,!0)}):t._e(),"buttons"===e.type?n("el-table-column",{key:a,attrs:{prop:e.prop,label:e.label,width:e.width},scopedSlots:t._u([{key:"default",fn:function(r){return[n("div",{key:a,class:e.class},t._l(e.button,(function(e,a){return n("el-button",{key:a,on:{click:function(n){return t.handleClick(e,r.$index,r.row)}}},[t._v(t._s(e.text))])})),1)]}}],null,!0)}):t._e()]}))],2)],1)},r=[],o={name:"SetTable",props:{tableData:{type:Array},tableOption:{type:Array}},data:function(){return{}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{handleChange:function(t,e,n){this.$emit("handleChange",t,e,n)},handleClick:function(t,e,n){this.$emit("handleClick",t,e,n)}},filters:{}},c=o,l=n("2877"),i=Object(l["a"])(c,a,r,!1,null,null,null);e["a"]=i.exports},"4ba9":function(t,e,n){},9041:function(t,e,n){"use strict";var a=n("4ba9"),r=n.n(a);r.a},a434:function(t,e,n){"use strict";var a=n("23e7"),r=n("23cb"),o=n("a691"),c=n("50c4"),l=n("7b0b"),i=n("65f0"),u=n("8418"),s=n("1dde"),p=n("ae40"),f=s("splice"),d=p("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,m=Math.min,b=9007199254740991,v="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!f||!d},{splice:function(t,e){var n,a,s,p,f,d,g=l(this),_=c(g.length),y=r(t,_),w=arguments.length;if(0===w?n=a=0:1===w?(n=0,a=_-y):(n=w-2,a=m(h(o(e),0),_-y)),_+n-a>b)throw TypeError(v);for(s=i(g,a),p=0;p_-a+n;p--)delete g[p-1]}else if(n>a)for(p=_-a;p>y;p--)f=p+a-1,d=p+n-1,f in g?g[d]=g[f]:delete g[d];for(p=0;p