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 n})),a.d(e,"d",(function(){return i})),a.d(e,"k",(function(){return l})),a.d(e,"h",(function(){return c})),a.d(e,"i",(function(){return r})),a.d(e,"g",(function(){return u})),a.d(e,"j",(function(){return o})),a.d(e,"l",(function(){return d})),a.d(e,"a",(function(){return p})),a.d(e,"c",(function(){return f})),a.d(e,"e",(function(){return m})),a.d(e,"f",(function(){return h}));var s=a("c1fb");function n(t){return s["a"].post("productset/getProductEdition",t)}function i(t){return s["a"].post("/productset/teachingList",t)}function l(t){return s["a"].post("/productset/teachingTemplateList",t)}function c(t){return s["a"].post("/productset/teachingTemplateCopy",t)}function r(t){return s["a"].post("/productset/teachingTemplateDel",t)}function u(t){return s["a"].post("/productset/teachingTemplateChangeName",t)}function o(t){return s["a"].post("/productset/teachingTemplateDetail",t)}function d(t){return s["a"].post("/productset/teachingTemplateSave",t)}function p(t){return s["a"].post("/productset/getClassByGrade",t)}function f(t){return s["a"].post("/productset/teachingEdit",t)}function m(t){return s["a"].post("/productset/teachingRestoreClass",t)}function h(){return s["a"].post("/productset/teachingSearchTeacher")}},b7d9:function(t,e,a){"use strict";var s=a("c311"),n=a.n(s);n.a},c311:function(t,e,a){},c4c4:function(t,e,a){"use strict";a.r(e);var s=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,s){return a("div",{key:e.template_id,staticClass:"template-item",class:[s===t.current?"current":""],attrs:{"data-id":e.template_id},on:{click:function(a){return t.selClass(s,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)])},n=[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,s=t._self._c||e;return s("div",{staticClass:"pic"},[s("img",{attrs:{src:a("3ef0"),alt:""}}),s("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("选学生")])])}],i=(a("7db0"),a("4160"),a("159b"),a("b063")),l=a("7660"),c={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(i["k"])().then((function(e){t.templateList=e.data}))},getGradeClass:function(t){var e=this,a={grade_id:t};t||(a={}),Object(i["a"])(Object(l["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(s){t=e.transData.find((function(t){return s==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(i["c"])(Object(l["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=c,u=(a("b7d9"),a("2877")),o=Object(u["a"])(r,s,n,!1,null,"2ea4c4ae",null);e["default"]=o.exports}}]);
|