1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ff16d4e"],{"520f":function(t,e,n){"use strict";n.d(e,"g",(function(){return c})),n.d(e,"b",(function(){return r})),n.d(e,"z",(function(){return u})),n.d(e,"m",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"w",(function(){return l})),n.d(e,"u",(function(){return d})),n.d(e,"v",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"t",(function(){return h})),n.d(e,"e",(function(){return m})),n.d(e,"n",(function(){return v})),n.d(e,"p",(function(){return _})),n.d(e,"r",(function(){return g})),n.d(e,"o",(function(){return b})),n.d(e,"i",(function(){return y})),n.d(e,"q",(function(){return C})),n.d(e,"s",(function(){return S})),n.d(e,"c",(function(){return j})),n.d(e,"l",(function(){return V})),n.d(e,"d",(function(){return k})),n.d(e,"a",(function(){return T})),n.d(e,"h",(function(){return O})),n.d(e,"j",(function(){return x})),n.d(e,"A",(function(){return w})),n.d(e,"x",(function(){return $})),n.d(e,"y",(function(){return q}));var a=n("1e04"),s="";function c(t){return a["a"].post("productset/getProductEdition".concat(s),t)}function r(t){return a["a"].post("/productset/changeSubject".concat(s),t)}function u(t){return a["a"].post("/productset/switchEdition".concat(s),t)}function i(t){return a["a"].post("productset/initProductSetting".concat(s),t)}s="";var o=function(t){return a["a"].post("/productset/copyTemplate".concat(s),t)},l=function(t){return a["a"].post("/productset/reNameTemplate".concat(s),t)},d=function(t){return a["a"].post("/productset/beforeDelTemplate".concat(s),t)},p=function(t){return a["a"].post("/productset/delTemplate".concat(s),t)},f=function(t){return a["a"].post("/productset/ajaxGetTemplateById".concat(s),t)},h=function(t){return a["a"].post("/productset/saveTemplate".concat(s),t)};function m(t){return a["a"].post("/productset/getClassByGrade".concat(s),t)}function v(t){return a["a"].post("/productset/productClassSet".concat(s),t)}function _(t){return a["a"].post("/productset/resetClassSet".concat(s),t)}var g=function(t){return a["a"].post("/productset/saveClassSet".concat(s),t)};function b(t){return a["a"].post("/productset/productStudentSet".concat(s),t)}var y=function(t){return a["a"].post("/studentinfo/getStudent".concat(s),t)};function C(t){return a["a"].post("/productset/resetStudentSet".concat(s),t)}var S=function(t){return a["a"].post("/productset/saveStudentSet".concat(s),t)};function j(t){return a["a"].post("/productset/customProductStudentSet".concat(s),t)}function V(t){return a["a"].post("/productset/getTemplateByType".concat(s),t)}function k(t){return a["a"].post("/productset/delStudentOptionalCard".concat(s),t)}function T(t){return a["a"].post("/productset/SaveOptionalCard".concat(s),t)}function O(){return a["a"].get("/productset/getSemester".concat(s))}function x(t){return a["a"].get("/productset/getStyleType".concat(s),t)}function w(t){return a["a"].post("/productset/switchStyle".concat(s),t)}function $(){return a["a"].post("/subjectProductSetting/index".concat(s))}function q(t){return a["a"].post("/subjectProductSetting/update".concat(s),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"},ad08: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":""],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.handleClassChange},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-select",{attrs:{clearable:"",placeholder:"请选择班级",size:"mini"},on:{change:t.handleStudentChange},model:{value:t.classValue,callback:function(e){t.classValue=e},expression:"classValue"}},t._l(t.classes,(function(t){return n("el-option",{key:t.class_id,attrs:{label:t.class_name,value:t.class_id}})})),1),n("el-transfer",{attrs:{data:t.students,props:{key:"student_id",label:"realname"},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)])},s=[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("选学生")])])}],c=(n("7db0"),n("4160"),n("159b"),n("520f")),r=n("7660"),u={name:"ClassCustom",data:function(){return{subjectId:Object(r["d"])(),isAccurate:sessionStorage.getItem("isAccurate"),date:{school_year:"",semester_name:""},radio:1,options:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],gradeValue:"",classes:[],classValue:"",current:0,query:{type:1,target_type:2,subject_id:Object(r["d"])()},templateList:[],pic_arr:{pic_error:n("7275"),pic_addpoint:n("9cca"),pic_addpoint3:n("8455")},students:[],tValue:[],sendData:[],tId:""}},created:function(){this.reSemester(),this.getTemplate(),this.handleClassChange()},watch:{templateList:{deep:!0,handler:function(t){this.tId=t[0].template_id}}},methods:{reSemester:function(){var t=this;Object(c["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(r["c"])(e);Object(c["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()},handleClassChange:function(t){var e=this,n={grade_id:t};t||(n={}),Object(c["e"])(Object(r["c"])(n)).then((function(t){1===t.status&&(e.classes=t.result)})),this.classValue="",this.students=[]},handleStudentChange:function(t){var e=this,n={cid:t};Object(c["i"])(Object(r["c"])(n)).then((function(t){!0===t.flag&&(e.students=t.resArray)})),this.students=[]},handleTransferChange:function(){var t,e=this,n=[];this.tValue.forEach((function(a){t=e.students.find((function(t){return a==t.student_id})),n.push(t)})),this.sendData=n},saveSetting:function(){var t=this;if(""==!this.gradeValue&&0==!this.tValue.length){var e="",n={};n.template_type=this.query.type,n.template_id=this.tId;for(var a=0;a<this.sendData.length;a++)for(var s in this.sendData[a]["class_id"]=this.classValue,this.sendData[a]["grade_id"]=this.gradeValue,this.sendData[a])e="students["+a+"]["+s+"]",n[e]=this.sendData[a][s];n.subject_id=Object(r["d"])(),Object(c["s"])(Object(r["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.gradeValue?this.$message("请选择学生"):""==this.classValue?this.$message("请选择班级"):this.$message("请选择学生")}}},i=u,o=(n("beeb"),n("2877")),l=Object(o["a"])(i,a,s,!1,null,"58ed222a",null);e["default"]=l.exports},beeb:function(t,e,n){"use strict";var a=n("e45c"),s=n.n(a);s.a},e45c:function(t,e,n){}}]);
|