(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1cc794ff"],{"67ec":function(e,t,a){},8688:function(e,t,a){"use strict";var n=a("67ec"),i=a.n(n);i.a},9654:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"waikan-generate set-page"},[a("div",{staticClass:"page-title"},[a("h1",[e._v("外刊宝生成")]),a("div",{staticClass:"back-btn btn",on:{click:e.back}},[e._v("返回")])]),a("p",{staticClass:"tips"},[e._v(" 提示:每个班级每周允许生成一次 ")]),a("div",{staticClass:"mode-select clearfix"},[a("div",{staticClass:"current-time fl"},[e._v("当前时间:"+e._s(e.weekName))]),a("div",{staticClass:"fr"},[a("div",{staticClass:"tab-btn mode-btn",class:[1==e.formWaiKan.select_set_type?"select":""],on:{click:function(t){return e.selectMode(1)}}},[e._v(" 按照教材单元设置 ")]),a("div",{staticClass:"tab-btn mode-btn",class:[2==e.formWaiKan.select_set_type?"select":""],on:{click:function(t){return e.selectMode(2)}}},[e._v(" 主题语境设置 ")]),a("div",{staticClass:"tab-btn mode-btn",class:[3==e.formWaiKan.select_set_type?"select":""],on:{click:function(t){return e.selectMode(3)}}},[e._v(" 时文阅读 ")])])]),a("el-form",{ref:"form",attrs:{model:e.formWaiKan}},[a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.select_set_type,expression:"formWaiKan.select_set_type == 1"}],attrs:{label:"版本:"}},[a("div",{staticClass:"set-item-cont no-radio multiline"},[a("el-radio-group",{on:{change:e.selectTextbook},model:{value:e.formWaiKan.textbookId,callback:function(t){e.$set(e.formWaiKan,"textbookId",t)},expression:"formWaiKan.textbookId"}},e._l(e.waikanData.textbooks,(function(t,n){return a("el-radio",{key:n,attrs:{label:t.textbook_id}},[e._v(e._s(t.textbook_name))])})),1)],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.select_set_type,expression:"formWaiKan.select_set_type == 1"}],attrs:{label:"模块:"}},[a("div",{staticClass:"set-item-cont no-radio multiline"},[a("el-radio-group",{on:{change:e.selectModule},model:{value:e.formWaiKan.moduleId,callback:function(t){e.$set(e.formWaiKan,"moduleId",t)},expression:"formWaiKan.moduleId"}},e._l(e.waikanData.modules,(function(t,n){return a("el-radio",{key:n,attrs:{label:t.textbook_id}},[e._v(e._s(t.textbook_name))])})),1)],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.select_set_type,expression:"formWaiKan.select_set_type == 1"}],attrs:{label:"单元:"}},[a("div",{staticClass:"set-item-cont no-check multiline"},[a("el-checkbox-group",{attrs:{max:3},on:{change:e.selectUnit},model:{value:e.formWaiKan.unitId,callback:function(t){e.$set(e.formWaiKan,"unitId",t)},expression:"formWaiKan.unitId"}},e._l(e.waikanData.units,(function(t,n){return a("el-checkbox",{key:n,attrs:{label:t.textbook_id}},[e._v(e._s(t.textbook_name))])})),1)],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2==e.formWaiKan.select_set_type,expression:"formWaiKan.select_set_type == 2"}],attrs:{label:"主题语境:"}},[a("div",{staticClass:"set-item-cont context-item no-check multiline"},[a("el-checkbox-group",{model:{value:e.formWaiKan.selectedItemIds,callback:function(t){e.$set(e.formWaiKan,"selectedItemIds",t)},expression:"formWaiKan.selectedItemIds"}},e._l(e.waikanData.contexts,(function(t,n){return a("el-checkbox",{key:n,attrs:{label:t.tag_extend_id}},[e._v(e._s(t.tag_extend_name))])})),1)],1)]),a("el-form-item",{attrs:{label:"班级:"}},[a("div",{staticClass:"set-item-cont class-item"},[a("el-select",{attrs:{size:"mini"},on:{change:e.selectGrade},model:{value:e.formWaiKan.grade,callback:function(t){e.$set(e.formWaiKan,"grade",t)},expression:"formWaiKan.grade"}},e._l(e.waikanData.grades,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-checkbox-group",{on:{change:e.selectClass},model:{value:e.formWaiKan.selectClassIds,callback:function(t){e.$set(e.formWaiKan,"selectClassIds",t)},expression:"formWaiKan.selectClassIds"}},e._l(e.waikanData.classes,(function(t,n){return a("el-checkbox",{key:n,attrs:{label:t.class_id,disabled:1==t.status}},[e._v(e._s(t.class_name))])})),1)],1)]),a("el-form-item",{attrs:{label:"推荐模式:"}},[a("div",{staticClass:"set-item-cont recommend-item"},[a("el-radio-group",{on:{change:e.selectRecommend},model:{value:e.formWaiKan.recommend_mode,callback:function(t){e.$set(e.formWaiKan,"recommend_mode",t)},expression:"formWaiKan.recommend_mode"}},[a("el-radio",{attrs:{label:1}},[e._v("经典模式")]),a("el-radio",{attrs:{label:2}},[e._v("智能推荐模式")])],1),a("span",{staticClass:"tips"},[e._v("(new,此模式下,根据学生既往成绩进行推荐不同的产品,若学生无档次数据,默认为档次二!)")]),a("router-link",{staticClass:"student-set-btn",attrs:{to:"/WaiKanSet/StudentSet",tag:"span"}},[e._v("学生设置")])],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.recommend_mode,expression:"formWaiKan.recommend_mode == 1"}],attrs:{label:"产品类型:"}},[a("div",{staticClass:"set-item-cont"},[a("el-radio-group",{on:{change:e.selectProduct},model:{value:e.formWaiKan.product_type,callback:function(t){e.$set(e.formWaiKan,"product_type",t)},expression:"formWaiKan.product_type"}},[a("el-radio",{attrs:{label:1}},[e._v("基础宝")]),a("el-radio",{attrs:{label:2}},[e._v("外刊宝")]),a("el-radio",{attrs:{label:3}},[e._v("热点宝")])],1)],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2==e.formWaiKan.recommend_mode,expression:"formWaiKan.recommend_mode == 2"}],attrs:{label:""}},[a("div",{staticClass:"set-item-cont product-tab"},[a("div",{staticClass:"tab-btn",class:[1==e.formWaiKan.product_type?"select":""],on:{click:function(t){return e.selectProduct(1)}}},[e._v(" 基础宝 ")]),a("div",{staticClass:"tab-btn",class:[2==e.formWaiKan.product_type?"select":""],on:{click:function(t){return e.selectProduct(2)}}},[e._v(" 外刊宝 ")]),a("div",{staticClass:"tab-btn",class:[3==e.formWaiKan.product_type?"select":""],on:{click:function(t){return e.selectProduct(3)}}},[e._v(" 热点宝 ")])])]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2==e.formWaiKan.recommend_mode,expression:"formWaiKan.recommend_mode == 2"}],attrs:{label:"学生:"}},[a("div",{staticClass:"set-item-cont student-item multiline"},e._l(e.waikanData.students,(function(t){return a("div",{key:t.class_id,staticClass:"class-list"},[a("span",[e._v(e._s(t.class_name)+":")]),a("ul",e._l(t.students,(function(t){return a("li",{key:t.student_id},[e._v(" "+e._s(t.realname)+" ")])})),0)])})),0)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.product_type,expression:"formWaiKan.product_type == 1"}],attrs:{label:"基础选题:"}},[a("div",{staticClass:"set-item-cont choice-topic multiline",class:[e.basicShrink?"shrink":""]},[a("el-radio-group",{model:{value:e.formWaiKan.basic_topic,callback:function(t){e.$set(e.formWaiKan,"basic_topic",t)},expression:"formWaiKan.basic_topic"}},e._l(e.waikanData.basicTopics,(function(t,n){return a("el-radio",{key:n,attrs:{label:t.lib_element_id}},[e._v(e._s(t.rich_text))])})),1),a("div",{staticClass:"open-btn",on:{click:function(t){return e.open("basic")}}},[e.basicShrink?a("span",[e._v("展开")]):a("span",[e._v("收缩")])])],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.recommend_mode&&(2==e.formWaiKan.product_type||3==e.formWaiKan.product_type),expression:"\n formWaiKan.recommend_mode == 1 &&\n (formWaiKan.product_type == 2 || formWaiKan.product_type == 3)\n "}],attrs:{label:"外刊类型:"}},[a("div",{staticClass:"set-item-cont alone"},[a("el-radio-group",{on:{change:e.selectWaiKanType},model:{value:e.formWaiKan.type,callback:function(t){e.$set(e.formWaiKan,"type",t)},expression:"formWaiKan.type"}},[a("el-radio",{attrs:{label:2}},[e._v("共性外刊"),a("span",{staticClass:"tips"},[e._v("(班级同学语篇完全相同,老师可讲解)")])]),a("el-radio",{attrs:{label:1}},[e._v("个性外刊"),a("span",{staticClass:"tips"},[e._v("(班级同学语篇不完全相同,根据学生水平个性化)")])])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:2==e.formWaiKan.type,expression:"formWaiKan.type == 2"}],staticClass:"class-content"},[a("span",{staticClass:"txt"},[e._v("班级间内容:")]),a("el-radio",{attrs:{label:0},model:{value:e.formWaiKan.class_between_content,callback:function(t){e.$set(e.formWaiKan,"class_between_content",t)},expression:"formWaiKan.class_between_content"}},[e._v("相同")]),a("el-radio",{attrs:{label:1},model:{value:e.formWaiKan.class_between_content,callback:function(t){e.$set(e.formWaiKan,"class_between_content",t)},expression:"formWaiKan.class_between_content"}},[e._v("不同")])],1)],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.formWaiKan.recommend_mode&&1!=e.formWaiKan.product_type&&2==e.formWaiKan.type,expression:"\n formWaiKan.recommend_mode == 1 &&\n formWaiKan.product_type != 1 &&\n formWaiKan.type == 2\n "}],attrs:{label:"外刊分级:"}},[a("div",{staticClass:"set-item-cont alone"},[a("el-radio-group",{model:{value:e.formWaiKan.level,callback:function(t){e.$set(e.formWaiKan,"level",t)},expression:"formWaiKan.level"}},[a("el-radio",{attrs:{label:1}},[e._v("尖子班(优秀生)")]),a("el-radio",{attrs:{label:2}},[e._v("培优班(中等生)")]),a("el-radio",{attrs:{label:3}},[e._v("提高班(学困生)")])],1)],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3==e.formWaiKan.product_type,expression:"formWaiKan.product_type == 3"}],attrs:{label:"热点选题:"}},[a("div",{staticClass:"set-item-cont choice-topic multiline",class:[e.hotspotShrink?"shrink":""]},[a("el-radio-group",{model:{value:e.formWaiKan.hot_topic,callback:function(t){e.$set(e.formWaiKan,"hot_topic",t)},expression:"formWaiKan.hot_topic"}},e._l(e.waikanData.hotTopics,(function(t,n){return a("el-radio",{key:n,attrs:{label:t.lib_element_id}},[e._v(e._s(t.rich_text))])})),1),a("div",{staticClass:"open-btn",on:{click:function(t){return e.open("hotspot")}}},[e.hotspotShrink?a("span",[e._v("展开")]):a("span",[e._v("收缩")])])],1)]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2==e.formWaiKan.product_type||3==e.formWaiKan.product_type,expression:"formWaiKan.product_type == 2 || formWaiKan.product_type == 3"}],attrs:{label:"题目数量:"}},[a("div",{staticClass:"set-item-cont topic-number"},[a("span",[e._v("外刊阅读")]),a("el-input-number",{attrs:{size:"small","controls-position":"right",min:e.minA,max:e.maxA},on:{change:e.changeNumber},model:{value:e.formWaiKan.topic_number[e.productType].reading,callback:function(t){e.$set(e.formWaiKan.topic_number[e.productType],"reading",t)},expression:"formWaiKan.topic_number[productType].reading"}}),a("span",[e._v("外刊七选五")]),a("el-input-number",{attrs:{size:"small","controls-position":"right",min:e.minC,max:e.maxC},on:{change:e.changeNumber},model:{value:e.formWaiKan.topic_number[e.productType].seven_selected_five,callback:function(t){e.$set(e.formWaiKan.topic_number[e.productType],"seven_selected_five",t)},expression:"formWaiKan.topic_number[productType].seven_selected_five"}}),a("span",[e._v("外刊完形(新高考)")]),a("el-input-number",{attrs:{size:"small","controls-position":"right",min:e.minB,max:e.maxB},on:{change:e.changeNumber},model:{value:e.formWaiKan.topic_number[e.productType].gestalt,callback:function(t){e.$set(e.formWaiKan.topic_number[e.productType],"gestalt",t)},expression:"formWaiKan.topic_number[productType].gestalt"}})],1)]),a("el-form-item",{attrs:{label:"下载方式:"}},[a("div",{staticClass:"set-item-cont"},[a("el-radio-group",{model:{value:e.formWaiKan.isAnswerSeparate,callback:function(t){e.$set(e.formWaiKan,"isAnswerSeparate",t)},expression:"formWaiKan.isAnswerSeparate"}},[a("el-radio",{attrs:{label:0}},[e._v("合并题目和答案")]),a("el-radio",{attrs:{label:1}},[e._v("分离题目和答案")])],1)],1)]),a("el-form-item",{attrs:{label:""}},[a("div",{staticClass:"set-item-cont generate"},[a("div",{staticClass:"generate-btn btn",class:[e.formWaiKan.selectClassIds.length?"":"disabled"],on:{click:function(t){return e.generate()}}},[e._v(" 开始生成 ")])])])],1)],1)},i=[],s=(a("a434"),a("cd37")),o={name:"WaiKanGenerate",components:{},filters:{},props:{},data:function(){return{weekName:"2022年7月第二周",basicShrink:!0,hotspotShrink:!0,waikanData:{textbooks:[],modules:[],units:[],contexts:[],grades:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],classes:[],basicTopics:[],hotTopics:[],studentList:[],students:[]},productType:"periodicals",formWaiKan:{select_set_type:1,textbookId:0,moduleId:0,unitId:[],selectedItemIds:[],grade:1,selectClassIds:[],recommend_mode:1,product_type:2,basic_topic:1,type:2,class_between_content:0,level:2,hot_topic:1,topic_number:{periodicals:{reading:4,gestalt:0,seven_selected_five:1},hot:{reading:3,gestalt:0,seven_selected_five:1}},isAnswerSeparate:0},maxA:7,maxB:2,maxC:2,minA:0,minB:0,minC:0}},computed:{},watch:{},created:function(){this.popUp(),this.getTextbook(),this.selectGrade(1)},mounted:function(){},methods:{popUp:function(){var e=this;localStorage.getItem("_POPUP")||(this.$confirm("若学生无外刊宝档次数据,可在学生设置页面设置
注意:对于未设置外刊宝档次数据学生,在生成个性版产品与智能推荐模式时,默认该学生为档次二!","操作提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"立刻前往",cancelButtonText:"取消",type:"warning"}).then((function(){e.$router.push({name:"StudentSet"})})).catch((function(){})),localStorage.setItem("_POPUP",!0))},getTextbook:function(){var e=this;Object(s["i"])().then((function(t){e.weekName=t.data.week_name,e.waikanData.textbooks=t.data.textbooks,e.formWaiKan.textbookId=t.data.textbooks[0].textbook_id,e.waikanData.modules=t.data.modules,e.formWaiKan.moduleId=t.data.modules[0].textbook_id,e.waikanData.units=t.data.units,e.formWaiKan.unitId.push(t.data.units[0].textbook_id)}))},selectTextbook:function(e){var t=this,a={version_id:e};Object(s["f"])(a).then((function(e){t.waikanData.modules=e.data.modules,t.formWaiKan.moduleId=e.data.modules[0].textbook_id,t.waikanData.units=e.data.units,t.formWaiKan.unitId.splice(0,1,e.data.units[0].textbook_id)}))},selectModule:function(e){var t=this,a={module_id:e};Object(s["j"])(a).then((function(e){t.waikanData.units=e.data.units,t.formWaiKan.unitId.splice(0,1,e.data.units[0].textbook_id)}))},selectUnit:function(){},selectGrade:function(e){var t=this,a={grade:e};Object(s["d"])(a).then((function(e){t.waikanData.classes=e.data.class})),this.getBasicTopic(e),this.getHotTopic(e),this.formWaiKan.selectClassIds=[],this.waikanData.students=[]},selectClass:function(e){2==this.formWaiKan.recommend_mode&&this.getStudent(e)},getBasicTopic:function(e){var t=this,a={grade:e};Object(s["c"])(a).then((function(e){t.waikanData.basicTopics=e.data.basic_topics,t.formWaiKan.basic_topic=e.data.basic_topics[0].lib_element_id}))},getHotTopic:function(e){var t=this,a={grade:e};Object(s["e"])(a).then((function(e){t.waikanData.hotTopics=e.data.hot_topics,t.formWaiKan.hot_topic=e.data.hot_topics[0].lib_element_id}))},selectMode:function(e){this.formWaiKan.select_set_type=e,2==e&&this.getContext()},getContext:function(){var e=this;Object(s["h"])().then((function(t){e.waikanData.contexts=t.data.subject_context,e.formWaiKan.selectedItemIds.push(t.data.subject_context[0].tag_extend_id)}))},selectRecommend:function(e){1==e?this.selectProduct(2):(this.selectProduct(1),this.formWaiKan.selectClassIds.length&&this.getStudent(this.formWaiKan.selectClassIds)),this.formWaiKan.topic_number.periodicals.reading=4,this.formWaiKan.topic_number.periodicals.gestalt=0,this.formWaiKan.topic_number.periodicals.seven_selected_five=1,this.formWaiKan.topic_number.hot.reading=3,this.formWaiKan.topic_number.hot.gestalt=0,this.formWaiKan.topic_number.hot.seven_selected_five=1},getStudent:function(e){var t=this;if(e.length){var a={selectClassIds:e};Object(s["g"])(a).then((function(e){t.studentList=e.data.lists;var a=t.formWaiKan.product_type;t.waikanData.students=e.data.lists[a-1].class_info}))}else this.waikanData.students=[]},selectProduct:function(e){if(this.formWaiKan.class_between_content=0,this.formWaiKan.product_type=e,2==this.formWaiKan.recommend_mode&&this.waikanData.students.length){var t=this.formWaiKan.product_type;this.waikanData.students=this.studentList[t-1].class_info}2==e?this.productType="periodicals":3==e&&(this.productType="hot"),this.changeNumber()},selectWaiKanType:function(){this.formWaiKan.class_between_content=0},open:function(e){"basic"===e?this.basicShrink=!this.basicShrink:this.hotspotShrink=!this.hotspotShrink},changeNumber:function(){2==this.formWaiKan.product_type?this.limitNum(7,2):this.limitNum(6,1)},limitNum:function(e,t){var a,n,i;a=this.formWaiKan.topic_number[this.productType].reading,n=this.formWaiKan.topic_number[this.productType].gestalt,i=this.formWaiKan.topic_number[this.productType].seven_selected_five;var s=a+n+i;s==e?(this.maxA=a,this.maxB=n,this.maxC=i):(this.maxA=e,this.maxB=2,this.maxC=2),s==t?(this.minA=a,this.minB=n,this.minC=i):(this.minA=0,this.minB=0,this.minC=0)},generate:function(){var e=this;if(this.formWaiKan.selectClassIds.length){var t=JSON.parse(JSON.stringify(this.formWaiKan));if(1==this.formWaiKan.select_set_type){if(!this.formWaiKan.unitId.length)return void this.$message.error("请选择单元");delete t.selectedItemIds}if(2==this.formWaiKan.select_set_type){if(!this.formWaiKan.selectedItemIds.length)return void this.$message.error("请选择主题语境");delete t.textbookId,delete t.moduleId,delete t.unitId}if(3==this.formWaiKan.select_set_type&&(delete t.textbookId,delete t.moduleId,delete t.unitId,delete t.selectedItemIds),1!=this.formWaiKan.product_type&&1!=this.formWaiKan.type||delete t.class_between_content,1==t.recommend_mode){switch(t.product_type){case 1:delete t.type,delete t.level,delete t.topic_number,delete t.hot_topic;break;case 2:delete t.basic_topic,delete t.hot_topic,delete t.topic_number.hot;break;case 3:delete t.basic_topic,delete t.topic_number.periodicals;break}1==t.type&&delete t.level}2==t.recommend_mode&&(delete t.type,delete t.level),console.log(t);var a=this.$loading({lock:!0,text:"开始生成......",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.5)",customClass:"waikan-loading"});Object(s["k"])(t).then((function(t){a.close(),1==t.status?e.$alert("生成成功!",{confirmButtonText:"确定",callback:function(){e.back()}}):e.$message.error("设置数据错误!")}))}},back:function(){location.href="/print/english_reading"}}},r=o,c=(a("8688"),a("2877")),l=Object(c["a"])(r,n,i,!1,null,null,null);t["default"]=l.exports},a434:function(e,t,a){"use strict";var n=a("23e7"),i=a("23cb"),s=a("a691"),o=a("50c4"),r=a("7b0b"),c=a("65f0"),l=a("8418"),d=a("1dde"),m=a("ae40"),u=d("splice"),p=m("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,_=Math.min,h=9007199254740991,b="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!u||!p},{splice:function(e,t){var a,n,d,m,u,p,v=r(this),K=o(v.length),W=i(e,K),k=arguments.length;if(0===k?a=n=0:1===k?(a=0,n=K-W):(a=k-2,n=_(f(s(t),0),K-W)),K+a-n>h)throw TypeError(b);for(d=c(v,n),m=0;mK-n+a;m--)delete v[m-1]}else if(a>n)for(m=K-n;m>W;m--)u=m+n-1,p=m+a-1,u in v?v[p]=v[u]:delete v[p];for(m=0;m