chunk-305c2538.bea4fa1f.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-305c2538"],{1886:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"waikan-separate set-page"},[a("div",{staticClass:"page-title"},[a("h1",[e._v(e._s(e.productName[e.formWaiKan.product_type-1])+"生成")]),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,i){return a("el-radio",{key:i,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,i){return a("el-radio",{key:i,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,i){return a("el-checkbox",{key:i,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,i){return a("el-checkbox",{key:i,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,i){return a("el-checkbox",{key:i,attrs:{label:t.class_id,disabled:1==t.status}},[e._v(e._s(t.class_name))])})),1)],1)]),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,i){return a("el-radio",{key:i,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: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 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.product_type&&2==e.formWaiKan.type,expression:"formWaiKan.product_type != 1 && formWaiKan.type == 2"}],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,i){return a("el-radio",{key:i,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)},n=[],o=(a("a434"),a("a9e3"),a("cd37")),s={name:"WaiKanGenerate",components:{},filters:{},props:{},data:function(){return{weekName:"2022年7月第二周",productName:["基础宝","外刊宝","热点宝"],basicShrink:!0,hotspotShrink:!0,waikanData:{textbooks:[],modules:[],units:[],contexts:[],grades:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],classes:[],basicTopics:[],hotTopics:[]},productType:"periodicals",formWaiKan:{category:2,select_set_type:1,textbookId:0,moduleId:0,unitId:[],selectedItemIds:[],grade:1,selectClassIds:[],recommend_mode:1,product_type:1,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.selectProduct(this.$route.query.product_type),this.getTextbook(),this.selectGrade(1)},mounted:function(){},methods:{getTextbook:function(){var e=this;Object(o["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(o["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(o["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,category:2,pt:this.formWaiKan.product_type};Object(o["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){},getBasicTopic:function(e){var t=this,a={grade:e};Object(o["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(o["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(o["h"])().then((function(t){e.waikanData.contexts=t.data.subject_context,e.formWaiKan.selectedItemIds.push(t.data.subject_context[0].tag_extend_id)}))},selectProduct:function(e){this.formWaiKan.product_type=Number(e),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,i,n;a=this.formWaiKan.topic_number[this.productType].reading,i=this.formWaiKan.topic_number[this.productType].gestalt,n=this.formWaiKan.topic_number[this.productType].seven_selected_five;var o=a+i+n;o==e?(this.maxA=a,this.maxB=i,this.maxC=n):(this.maxA=e,this.maxB=2,this.maxC=2),o==t?(this.minA=a,this.minB=i,this.minC=n):(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}switch(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,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,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(o["k"])(t).then((function(t){a.close(),1==t.status?e.$alert("生成成功!",{confirmButtonText:"确定",callback:function(){e.back()}}):e.$message.error("设置数据错误!")}))}},back:function(){var e=this.formWaiKan.product_type;switch(e){case 1:location.href="/print/english_reading/pt/1/cg/2";break;case 2:location.href="/print/english_reading/pt/2/cg/2";break;case 3:location.href="/print/english_reading/pt/3/cg/2";break}}}},r=s,c=(a("b4e6"),a("2877")),l=Object(c["a"])(r,i,n,!1,null,null,null);t["default"]=l.exports},"6a50":function(e,t,a){},a434:function(e,t,a){"use strict";var i=a("23e7"),n=a("23cb"),o=a("a691"),s=a("50c4"),r=a("7b0b"),c=a("65f0"),l=a("8418"),d=a("1dde"),u=a("ae40"),m=d("splice"),p=u("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,_=Math.min,b=9007199254740991,h="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!m||!p},{splice:function(e,t){var a,i,d,u,m,p,v=r(this),k=s(v.length),K=n(e,k),W=arguments.length;if(0===W?a=i=0:1===W?(a=0,i=k-K):(a=W-2,i=_(f(o(t),0),k-K)),k+a-i>b)throw TypeError(h);for(d=c(v,i),u=0;u<i;u++)m=K+u,m in v&&l(d,u,v[m]);if(d.length=i,a<i){for(u=K;u<k-i;u++)m=u+i,p=u+a,m in v?v[p]=v[m]:delete v[p];for(u=k;u>k-i+a;u--)delete v[u-1]}else if(a>i)for(u=k-i;u>K;u--)m=u+i-1,p=u+a-1,m in v?v[p]=v[m]:delete v[p];for(u=0;u<a;u++)v[u+K]=arguments[u+2];return v.length=k-i+a,d}})},b4e6:function(e,t,a){"use strict";var i=a("6a50"),n=a.n(i);n.a},cd37:function(e,t,a){"use strict";a.d(t,"i",(function(){return o})),a.d(t,"f",(function(){return s})),a.d(t,"j",(function(){return r})),a.d(t,"d",(function(){return c})),a.d(t,"c",(function(){return l})),a.d(t,"e",(function(){return d})),a.d(t,"h",(function(){return u})),a.d(t,"k",(function(){return m})),a.d(t,"g",(function(){return p})),a.d(t,"b",(function(){return f})),a.d(t,"a",(function(){return _})),a.d(t,"l",(function(){return b}));var i=a("1e04"),n="";function o(){return i["a"].post("print/ajaxReadingTextbookModuleUnit".concat(n))}function s(e){return i["a"].post("print/ajaxNewGetModuleAndUnit".concat(n),e)}function r(e){return i["a"].post("print/ajaxNewGetUnitByModuleId".concat(n),e)}function c(e){return i["a"].post("print/ajaxReadingClasses".concat(n),e)}function l(e){return i["a"].post("print/ajaxReadingBasicTopics".concat(n),e)}function d(e){return i["a"].post("print/ajaxReadingHotTopics".concat(n),e)}function u(){return i["a"].post("print/ajaxReadingSubjectContext".concat(n))}function m(e){return i["a"].post("print/ajaxNewSaveEnglishReading".concat(n),e)}function p(e){return i["a"].post("print/ajaxSmartTypeStudents".concat(n),e)}function f(e){return i["a"].post("print/ajaxEnglishReadingSetInit".concat(n),e)}function _(e){return i["a"].post("print/ajaxEnglishReadingStudentSettingSave".concat(n),e)}function b(e){return i["a"].post("print/englishReadingStudentImport".concat(n),e)}n=""}}]);