1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0bed2034"],{"3ef0":function(t,e,a){t.exports=a.p+"img/template-cover.39014e72.png"},b063:function(t,e,a){"use strict";a.d(e,"b",(function(){return c})),a.d(e,"d",(function(){return i})),a.d(e,"k",(function(){return l})),a.d(e,"h",(function(){return r})),a.d(e,"i",(function(){return u})),a.d(e,"g",(function(){return o})),a.d(e,"j",(function(){return d})),a.d(e,"l",(function(){return p})),a.d(e,"a",(function(){return f})),a.d(e,"c",(function(){return m})),a.d(e,"e",(function(){return h})),a.d(e,"f",(function(){return v}));var n=a("1e04"),s="";function c(t){return n["a"].post("productset/getProductEdition".concat(s),t)}function i(t){return n["a"].post("/productset/teachingList".concat(s),t)}function l(t){return n["a"].post("/productset/teachingTemplateList".concat(s),t)}function r(t){return n["a"].post("/productset/teachingTemplateCopy".concat(s),t)}function u(t){return n["a"].post("/productset/teachingTemplateDel".concat(s),t)}function o(t){return n["a"].post("/productset/teachingTemplateChangeName".concat(s),t)}function d(t){return n["a"].post("/productset/teachingTemplateDetail".concat(s),t)}function p(t){return n["a"].post("/productset/teachingTemplateSave".concat(s),t)}function f(t){return n["a"].post("/productset/getClassByGrade".concat(s),t)}function m(t){return n["a"].post("/productset/teachingEdit".concat(s),t)}function h(t){return n["a"].post("/productset/teachingRestoreClass".concat(s),t)}function v(){return n["a"].post("/productset/teachingSearchTeacher".concat(s))}s=""},b7d9:function(t,e,a){"use strict";var n=a("c311"),s=a.n(n);s.a},c311:function(t,e,a){},c4c4: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:"class_id",label:"class_name"},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("3ef0"),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("b063")),i=a("7660"),l={name:"ClassCustom",data:function(){return{current:0,options:[{value:1,label:"高一"},{value:2,label:"高二"},{value:3,label:"高三"}],gradeValue:"",classes:[],classValue:"",params:{template_id:"",class_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:{reSemester:function(){var t=this;getSemester().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.params.template_id=e.template_id},getTemplate:function(){var t=this;Object(c["k"])().then((function(e){t.templateList=e.data}))},getGradeClass:function(t){var e=this,a={grade_id:t};t||(a={}),Object(c["a"])(Object(i["c"])(a)).then((function(t){e.transData=t.result}))},handleGradeChange:function(t){if(!t)return this.transData=[],!1;this.getGradeClass(t)},handleClassChange:function(t){},handleTransferChange:function(){var t,e=this,a=[];this.tValue.forEach((function(n){t=e.transData.find((function(t){return n==t.class_id})),a.push(t)})),this.selData=a},saveSetting:function(){var t=this;if(""==!this.gradeValue&&0==!this.tValue.length){for(var e=0;e<this.selData.length;e++)this.params.class_id.push(this.selData[e].class_id);var a={template_id:this.params.template_id,class_id:this.params.class_id};Object(c["c"])(Object(i["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.$message("请选择班级")}}},r=l,u=(a("b7d9"),a("2877")),o=Object(u["a"])(r,n,s,!1,null,"2ea4c4ae",null);e["default"]=o.exports}}]);
|