chunk-6ff16d4e.b22eb270.js 8.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ff16d4e"],{"520f":function(t,e,n){"use strict";n.d(e,"g",(function(){return a})),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 c})),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 h})),n.d(e,"n",(function(){return m})),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 V})),n.d(e,"a",(function(){return k})),n.d(e,"h",(function(){return T})),n.d(e,"j",(function(){return O})),n.d(e,"A",(function(){return x})),n.d(e,"x",(function(){return w})),n.d(e,"y",(function(){return $}));var s=n("c1fb");function a(t){return s["a"].post("productset/getProductEdition",t)}function r(t){return s["a"].post("/productset/changeSubject",t)}function u(t){return s["a"].post("/productset/switchEdition",t)}function i(t){return s["a"].post("productset/initProductSetting",t)}var c=function(t){return s["a"].post("/productset/copyTemplate",t)},o=function(t){return s["a"].post("/productset/reNameTemplate",t)},l=function(t){return s["a"].post("/productset/beforeDelTemplate",t)},d=function(t){return s["a"].post("/productset/delTemplate",t)},p=function(t){return s["a"].post("/productset/ajaxGetTemplateById",t)},f=function(t){return s["a"].post("/productset/saveTemplate",t)};function h(t){return s["a"].post("/productset/getClassByGrade",t)}function m(t){return s["a"].post("/productset/productClassSet",t)}function v(t){return s["a"].post("/productset/resetClassSet",t)}var _=function(t){return s["a"].post("/productset/saveClassSet",t)};function g(t){return s["a"].post("/productset/productStudentSet",t)}var b=function(t){return s["a"].post("/studentinfo/getStudent",t)};function y(t){return s["a"].post("/productset/resetStudentSet",t)}var C=function(t){return s["a"].post("/productset/saveStudentSet",t)};function S(t){return s["a"].post("/productset/customProductStudentSet",t)}function j(t){return s["a"].post("/productset/getTemplateByType",t)}function V(t){return s["a"].post("/productset/delStudentOptionalCard",t)}function k(t){return s["a"].post("/productset/SaveOptionalCard",t)}function T(){return s["a"].get("/productset/getSemester")}function O(t){return s["a"].get("/productset/getStyleType",t)}function x(t){return s["a"].post("/productset/switchStyle",t)}function w(){return s["a"].post("/subjectProductSetting/index")}function $(t){return s["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"},ad08:function(t,e,n){"use strict";n.r(e);var s=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,s){return n("div",{key:e.template_id,staticClass:"template-item",class:[s===t.current?"current":""],on:{click:function(n){return t.selClass(s,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)])},a=[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("选学生")])])}],r=(n("7db0"),n("4160"),n("159b"),n("520f")),u=n("7660"),i={name:"ClassCustom",data:function(){return{subjectId:Object(u["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(u["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(r["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(r["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(r["e"])(Object(u["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(r["i"])(Object(u["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(s){t=e.students.find((function(t){return s==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 s=0;s<this.sendData.length;s++)for(var a in this.sendData[s]["class_id"]=this.classValue,this.sendData[s]["grade_id"]=this.gradeValue,this.sendData[s])e="students["+s+"]["+a+"]",n[e]=this.sendData[s][a];n.subject_id=Object(u["d"])(),Object(r["s"])(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.gradeValue?this.$message("请选择学生"):""==this.classValue?this.$message("请选择班级"):this.$message("请选择学生")}}},c=i,o=(n("beeb"),n("2877")),l=Object(o["a"])(c,s,a,!1,null,"58ed222a",null);e["default"]=l.exports},beeb:function(t,e,n){"use strict";var s=n("e45c"),a=n.n(s);a.a},e45c:function(t,e,n){}}]);