1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-786eca7c"],{"337f":function(t,e,n){"use strict";var a=n("4fae"),r=n.n(a);r.a},"4fae":function(t,e,n){},"520f":function(t,e,n){"use strict";n.d(e,"g",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"z",(function(){return u})),n.d(e,"m",(function(){return c})),n.d(e,"f",(function(){return i})),n.d(e,"w",(function(){return o})),n.d(e,"u",(function(){return l})),n.d(e,"v",(function(){return d})),n.d(e,"k",(function(){return p})),n.d(e,"t",(function(){return f})),n.d(e,"e",(function(){return m})),n.d(e,"n",(function(){return h})),n.d(e,"p",(function(){return v})),n.d(e,"r",(function(){return _})),n.d(e,"o",(function(){return g})),n.d(e,"i",(function(){return b})),n.d(e,"q",(function(){return y})),n.d(e,"s",(function(){return C})),n.d(e,"c",(function(){return S})),n.d(e,"l",(function(){return j})),n.d(e,"d",(function(){return T})),n.d(e,"a",(function(){return k})),n.d(e,"h",(function(){return O})),n.d(e,"j",(function(){return w})),n.d(e,"A",(function(){return x})),n.d(e,"x",(function(){return D})),n.d(e,"y",(function(){return V}));var a=n("c1fb");function r(t){return a["a"].post("productset/getProductEdition",t)}function s(t){return a["a"].post("/productset/changeSubject",t)}function u(t){return a["a"].post("/productset/switchEdition",t)}function c(t){return a["a"].post("productset/initProductSetting",t)}var i=function(t){return a["a"].post("/productset/copyTemplate",t)},o=function(t){return a["a"].post("/productset/reNameTemplate",t)},l=function(t){return a["a"].post("/productset/beforeDelTemplate",t)},d=function(t){return a["a"].post("/productset/delTemplate",t)},p=function(t){return a["a"].post("/productset/ajaxGetTemplateById",t)},f=function(t){return a["a"].post("/productset/saveTemplate",t)};function m(t){return a["a"].post("/productset/getClassByGrade",t)}function h(t){return a["a"].post("/productset/productClassSet",t)}function v(t){return a["a"].post("/productset/resetClassSet",t)}var _=function(t){return a["a"].post("/productset/saveClassSet",t)};function g(t){return a["a"].post("/productset/productStudentSet",t)}var b=function(t){return a["a"].post("/studentinfo/getStudent",t)};function y(t){return a["a"].post("/productset/resetStudentSet",t)}var C=function(t){return a["a"].post("/productset/saveStudentSet",t)};function S(t){return a["a"].post("/productset/customProductStudentSet",t)}function j(t){return a["a"].post("/productset/getTemplateByType",t)}function T(t){return a["a"].post("/productset/delStudentOptionalCard",t)}function k(t){return a["a"].post("/productset/SaveOptionalCard",t)}function O(){return a["a"].get("/productset/getSemester")}function w(t){return a["a"].get("/productset/getStyleType",t)}function x(t){return a["a"].post("/productset/switchStyle",t)}function D(){return a["a"].post("/subjectProductSetting/index")}function V(t){return a["a"].post("/subjectProductSetting/update",t)}},7275:function(t,e,n){t.exports=n.p+"img/pic_errorTpl.b9560117.jpg"},8455:function(t,e,n){t.exports=n.p+"img/pic_addpoint3.79e6a50e.jpg"},"9cca":function(t,e,n){t.exports=n.p+"img/pic_addpoint.7007fa3c.jpg"},c0f3: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:"class-custom"},[n("div",{staticClass:"custom-header"},[n("div",{staticClass:"custom-info"},[n("h1",[t._v("班级定制")]),n("span",[t._v("当前学年:"+t._s(t.date.school_year))]),n("span",[t._v("当前学期:"+t._s(t.date.semester_name))])]),n("div",{staticClass:"back"},[n("el-link",{attrs:{href:"javascript:history.back(-1);",underline:!1}},[t._v("返回")])],1)]),n("div",{staticClass:"custom-module"},[t._m(0),n("div",{staticClass:"sel-template"},[n("el-radio-group",{on:{change:t.switchTemplate},model:{value:t.query.type,callback:function(e){t.$set(t.query,"type",e)},expression:"query.type"}},[n("el-radio",{attrs:{label:1}},[t._v("错题本模版")]),n("el-radio",{attrs:{label:2}},[t._v(t._s("3"===t.subjectId&&1==t.isAccurate?"精准学习方案模板":"个性化学习方案模板"))]),n("el-radio",{attrs:{label:3}},[t._v(t._s("3"===t.subjectId&&1==t.isAccurate?"精准学习宝模版":"个性化学习宝模板"))])],1),n("div",{staticClass:"template-list"},t._l(t.templateList,(function(e,a){return n("div",{key:e.template_id,staticClass:"template-item",class:[a===t.current?"current":""],attrs:{"data-id":e.template_id},on:{click:function(n){return t.selClass(a,e)}}},[n("div",{staticClass:"pic"},[n("img",{attrs:{src:e.img,alt:""}}),n("span",[t._v("班级模板")])]),n("div",{staticClass:"text"},[n("p",{staticClass:"template-name-output template-name"},[t._v(" "+t._s(e.template_name)+" ")])])])})),0)],1)]),n("div",{staticClass:"custom-module"},[t._m(1),n("div",{staticClass:"filterModule"},[n("el-select",{attrs:{clearable:"",placeholder:"请选择年级",size:"mini"},on:{change:t.handleGradeChange},model:{value:t.gradeValue,callback:function(e){t.gradeValue=e},expression:"gradeValue"}},t._l(t.options,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),n("el-transfer",{attrs:{data:t.classData,props:{key:"class_id",label:"class_name"},titles:["班级","已选班级"]},on:{change:t.handleTransferChange},model:{value:t.tValue,callback:function(e){t.tValue=e},expression:"tValue"}})],1)]),n("div",{staticClass:"saveBtn"},[n("el-button",{attrs:{id:"saveSetting"},on:{click:t.saveSetting}},[t._v(" 保存设置 ")])],1)])},r=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"module-title"},[n("i",[t._v("1")]),n("span",[t._v("选模版")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"module-title"},[n("i",[t._v("2")]),n("span",[t._v("选班级")])])}],s=(n("7db0"),n("4160"),n("159b"),n("520f")),u=n("7660"),c={name:"ClassCustom",components:{},filters:{},props:{},data:function(){return{subjectId:Object(u["d"])(),isAccurate:sessionStorage.getItem("isAccurate"),date:{school_year:"",semester_name:""},current:0,options:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],gradeValue:"",tId:"",pic_arr:{pic_error:n("7275"),pic_addpoint:n("9cca"),pic_addpoint3:n("8455")},query:{type:1,target_type:1,subject_id:Object(u["d"])()},templateList:[],tValue:[],classData:[],selData:[]}},created:function(){this.reSemester(),this.getTemplate()},watch:{templateList:{deep:!0,handler:function(t){this.tId=t[0].template_id}}},methods:{reSemester:function(){var t=this;Object(s["h"])().then((function(e){t.date.school_year=e.data.school_year,t.date.semester_name=e.data.semester_name}))},selClass:function(t,e){this.current=t,this.tId=e.template_id},getTemplate:function(){var t=this,e=this.query,n=Object(u["c"])(e);Object(s["l"])(n).then((function(e){t.templateList=e.data,t.templateList.forEach((function(e){1===t.query.type?e.img=t.pic_arr.pic_error:2===t.query.type?e.img=t.pic_arr.pic_addpoint:e.img=t.pic_arr.pic_addpoint3}))}))},switchTemplate:function(){this.current=0,this.getTemplate()},_getGradeClass:function(t){var e=this,n={grade_id:t};t||(n={}),Object(s["e"])(Object(u["c"])(n)).then((function(t){e.classData=t.result}))},handleGradeChange:function(t){if(!t)return this.classData=[],!1;this._getGradeClass(t)},handleTransferChange:function(){var t,e=this,n=[];this.tValue.forEach((function(a){t=e.classData.find((function(t){return a==t.class_id})),n.push(t)})),this.selData=n},saveSetting:function(){var t=this;if(""==!this.gradeValue&&0==!this.tValue.length){var e="",n={};n.template_id=this.tId,n.template_type=this.query.type;for(var a=0;a<this.selData.length;a++)for(var r in this.selData[a])e="classes["+a+"]["+r+"]",n[e]=this.selData[a][r];n.subject_id=Object(u["d"])(),Object(s["r"])(Object(u["c"])(n)).then((function(e){1===e.status?t.$alert("更新成功!","信息",{confirmButtonText:"确定",callback:function(){t.$router.go(-1)}}):0===e.status&&t.$message(e.msg)}))}else this.$message("请选择班级")}}},i=c,o=(n("337f"),n("2877")),l=Object(o["a"])(i,a,r,!1,null,"2d155458",null);e["default"]=l.exports}}]);
|