1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-449e0bee"],{"1d97":function(t,e,a){t.exports=a.p+"img/template-cover.120e30de.png"},6593:function(t,e,a){"use strict";a.d(e,"e",(function(){return c})),a.d(e,"b",(function(){return r})),a.d(e,"o",(function(){return l})),a.d(e,"m",(function(){return i})),a.d(e,"n",(function(){return u})),a.d(e,"d",(function(){return o})),a.d(e,"l",(function(){return d})),a.d(e,"a",(function(){return p})),a.d(e,"f",(function(){return f})),a.d(e,"h",(function(){return h})),a.d(e,"j",(function(){return m})),a.d(e,"g",(function(){return v})),a.d(e,"i",(function(){return _})),a.d(e,"c",(function(){return g})),a.d(e,"k",(function(){return b}));var n=a("1e04"),s="";function c(t){return n["a"].post("/productMethod/getTemplateByType".concat(s),t)}s="";var r=function(t){return n["a"].post("/productMethod/copyTemplate".concat(s),t)},l=function(t){return n["a"].post("/productMethod/reNameTemplate".concat(s),t)},i=function(t){return n["a"].post("/productMethod/beforeDelTemplate".concat(s),t)},u=function(t){return n["a"].post("/productMethod/delTemplate".concat(s),t)},o=function(t){return n["a"].post("/productMethod/ajaxGetTemplateById".concat(s),t)},d=function(t){return n["a"].post("/productMethod/saveTemplate".concat(s),t)};function p(t){return n["a"].post("/productMethod/getClassByGrade".concat(s),t)}function f(t){return n["a"].post("/productMethod/productClassSet".concat(s),t)}function h(t){return n["a"].post("/productMethod/resetClassSet".concat(s),t)}var m=function(t){return n["a"].post("/productMethod/saveClassSet".concat(s),t)};function v(t){return n["a"].post("/productMethod/productStudentSet".concat(s),t)}function _(t){return n["a"].post("/productMethod/resetStudentSet".concat(s),t)}var g=function(t){return n["a"].post("/studentinfo/getStudent".concat(s),t)},b=function(t){return n["a"].post("/productMethod/saveStudentSet".concat(s),t)}},"82ff":function(t,e,a){"use strict";var n=a("eff1"),s=a.n(n);s.a},b0a7:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"student-custom"},[a("div",{staticClass:"custom-header"},[t._m(0),a("div",{staticClass:"back"},[a("el-link",{attrs:{href:"javascript:history.back(-1);",underline:!1}},[t._v("返回")])],1)]),a("div",{staticClass:"custom-module"},[t._m(1),a("div",{staticClass:"sel-template"},[a("div",{staticClass:"template-list"},t._l(t.templateList,(function(e,n){return a("div",{key:e.template_id,staticClass:"template-item",class:[n===t.current?"current":""],attrs:{"data-id":e.template_id},on:{click:function(a){return t.selClass(n,e)}}},[t._m(2,!0),a("div",{staticClass:"text"},[a("p",{staticClass:"template-name-output template-name"},[t._v(" "+t._s(e.template_name)+" ")])])])})),0)])]),a("div",{staticClass:"custom-module"},[t._m(3),a("div",{staticClass:"filterModule"},[a("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 a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),a("el-select",{attrs:{clearable:"",placeholder:"请选择班级",size:"mini"},on:{change:t.handleClassChange},model:{value:t.classValue,callback:function(e){t.classValue=e},expression:"classValue"}},t._l(t.classes,(function(t){return a("el-option",{key:t.class_id,attrs:{label:t.class_name,value:t.class_id}})})),1),a("el-transfer",{attrs:{data:t.transData,props:{key:"student_id",label:"realname"},titles:["学生","已选学生"]},on:{change:t.handleTransferChange},model:{value:t.tValue,callback:function(e){t.tValue=e},expression:"tValue"}})],1)]),a("div",{staticClass:"saveBtn"},[a("el-button",{attrs:{id:"saveSetting"},on:{click:t.saveSetting}},[t._v(" 保存设置 ")])],1)])},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"custom-info"},[a("h1",[t._v("学生定制")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"module-title"},[a("i",[t._v("1")]),a("span",[t._v("选模版")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pic"},[n("img",{attrs:{src:a("1d97"),alt:""}}),n("span",[t._v("学生模板")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"module-title"},[a("i",[t._v("2")]),a("span",[t._v("选学生")])])}],c=(a("7db0"),a("4160"),a("159b"),a("6593")),r=a("7660"),l={name:"ClassCustom",data:function(){return{current:0,options:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],gradeValue:"",classes:[],classValue:"",params:{target_type:2,template_id:""},templateList:[],tValue:[],transData:[],selData:[]}},created:function(){this.getTemplate()},watch:{templateList:{deep:!0,handler:function(t){this.params.template_id=t[0].template_id}}},methods:{selClass:function(t,e){this.current=t,this.params.template_id=e.template_id},getTemplate:function(){var t=this,e={};e.target_type=this.params.target_type;var a=Object(r["c"])(e);Object(c["e"])(a).then((function(e){t.templateList=e.data}))},handleGradeChange:function(t){var e=this,a={grade_id:t};t?Object(c["a"])(Object(r["c"])(a)).then((function(t){1===t.status&&(e.classes=t.result)})):this.classes=[],this.classValue="",this.transData=[]},handleClassChange:function(t){var e=this,a={cid:t};Object(c["c"])(Object(r["c"])(a)).then((function(t){!0===t.flag&&(e.transData=t.resArray)})),this.transData=[]},handleTransferChange:function(){var t,e=this,a=[];this.tValue.forEach((function(n){t=e.transData.find((function(t){return n==t.student_id})),a.push(t)})),this.selData=a},saveSetting:function(){var t=this;if(""==!this.gradeValue&&0==!this.tValue.length){var e="",a={};a.template_id=this.params.template_id;for(var n=0;n<this.selData.length;n++)for(var s in this.selData[n]["class_id"]=this.classValue,this.selData[n]["grade_id"]=this.gradeValue,this.selData[n])e="students["+n+"]["+s+"]",a[e]=this.selData[n][s];Object(c["k"])(Object(r["c"])(a)).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=l,u=(a("82ff"),a("2877")),o=Object(u["a"])(i,n,s,!1,null,"39f5f526",null);e["default"]=o.exports},eff1:function(t,e,a){}}]);
|