(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[26],{ /***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/teach-set/class-list/ClassList.vue?vue&type=script&lang=js&": /*!**********************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/teach-set/class-list/ClassList.vue?vue&type=script&lang=js& ***! \**********************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.number.constructor */ "./node_modules/core-js/modules/es.number.constructor.js"); /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _components_dialog_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/dialog/index */ "./src/views/teach-set/components/dialog/index.vue"); /* harmony import */ var _components_set_table_SetTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/set-table/SetTable */ "./src/views/teach-set/components/set-table/SetTable.vue"); /* harmony import */ var _api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../api/teach/teach-set */ "./src/api/teach/teach-set.js"); /* harmony import */ var _lib_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../lib/util */ "./src/lib/util.js"); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["default"] = ({ name: "ClassList", components: { SetTable: _components_set_table_SetTable__WEBPACK_IMPORTED_MODULE_2__["default"], DiaLog: _components_dialog_index__WEBPACK_IMPORTED_MODULE_1__["default"] }, filters: {}, props: {}, data: function data() { return { dialogVisble: false, dialogWidth: "40%", handleType: "", delText: "", templateList: [], gradeData: [{ value: 1, label: "高一" }, { value: 2, label: "高二" }, { value: 3, label: "高三" }], classData: [], teacherData: [], tableData: [], tableOption: [{ prop: "grade", label: "年级", formatter: "gradeFilter" }, { prop: "class_name", label: "班级" }, { prop: "teacher_name", label: "学科老师" }, { prop: "template_name", label: "教学宝模板" }, { label: "操作", class: "option-block", type: "buttons", button: [{ text: "编辑", function: "edit" }, { text: "恢复默认", function: "recovery" }] }], total: 0, pageSize: 15, currentPage: 0, // Form Data obj: { teacher_id: "", grade: "", class_id: "", limit: "", page: 1 }, classId: "", // template_id: "", templateId: "" }; }, computed: {}, watch: { // 监听获取默认模板 templateList: { deep: true, handler: function handler(val) { this.templateId = val[0].template_id; } } }, created: function created() { this.getClassData(); this.getTeacher(); this.getTemplateList(); }, mounted: function mounted() {}, methods: { // 获取班级列表数据 getClassData: function getClassData() { var _this = this; var from_data = Object(_lib_util__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(this.obj); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__["teachingList"])(from_data).then(function (res) { _this.tableData = res.data.list; // 判断页码数; var total = Number(res.data.count); _this.total = total; _this.currentPage = res.data.current_page; }); }, // 获取年级班级数据 getGradeClass: function getGradeClass(gradeId) { var _this2 = this; Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__["getClassByGrade"])(gradeId).then(function (res) { _this2.classData = res.result; }); }, // 获取教师数据 getTeacher: function getTeacher() { var _this3 = this; Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__["teachingSearchTeacher"])().then(function (res) { _this3.teacherData = res.data; }); }, // 获取模板数据 getTemplateList: function getTemplateList() { var _this4 = this; Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__["teachingTemplateList"])().then(function (res) { _this4.templateList = res.data; }); }, // 选择年级 selGrade: function selGrade(val) { this.obj.class_id = ""; if (!val) { this.classData = []; return false; } var obj = { grade_id: val }; var gradeId = Object(_lib_util__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(obj); this.getGradeClass(gradeId); }, // 分页 handleCurrentChange: function handleCurrentChange(val) { this.obj.page = val; var pageNum = Object(_lib_util__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(this.obj); this.getClassData(pageNum); }, // 搜索 search: function search() { // if (this.obj.grade === "" && this.obj.teacher_id === "") { // return false; // } this.obj.page = 1; this.currentPage = 1; var search_data = Object(_lib_util__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(this.obj); this.getClassData(search_data); }, // 模板管理 toManage: function toManage() { this.$router.push({ path: "/TeachSet/TemplateManager" }); }, // 批量设置 toBatchSet: function toBatchSet() { this.$router.push({ path: "/TeachSet/BatchSetting" }); }, // 操作 handle: function handle(btn, index, val) { if (btn.function === "edit") { this.edit(index, val); } else if (btn.function === "recovery") { this.recovery(index, val); } }, // 编辑 edit: function edit(index, val) { this.dialogVisble = true; this.handleType = "编辑"; this.delText = "选择模板"; this.classId = val.class_id; this.templateId = val.template_id; }, // 恢复默认 recovery: function recovery(index, val) { var _this5 = this; this.$confirm("将所选班级的模版恢复为默认模版,确认要恢复默认吗?", "信息", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(function () { var obj = { class_id: val.class_id }; var rec_data = Object(_lib_util__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(obj); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__["teachingRestoreClass"])(rec_data).then(function (res) { if (res.status == 1) { _this5.$message({ type: "success", message: "操作成功" }); _this5.getClassData(); } else { _this5.$message({ type: "error", message: res.msg }); } }); }).catch(function () { _this5.$message({ type: "info", message: "已取消操作" }); }); }, // 关闭弹出框 handleDiaClose: function handleDiaClose() { this.dialogVisble = false; }, // 选择模板 selTemplate: function selTemplate(val, index) { this.templateId = val.template_id; }, // 保存班级模板编辑 handleSubTemplate: function handleSubTemplate() { var _this6 = this; this.dialogVisble = false; var params = { class_id: this.classId, template_id: this.templateId }; var data = Object(_lib_util__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(params); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_3__["teachingEdit"])(data).then(function (res) { if (res.status == 1) { _this6.$message({ type: "success", message: "操作成功" }); _this6.getClassData(); } else { _this6.$message({ type: "error", message: res.msg }); } }); } } }); /***/ }), /***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/teach-set/components/set-table/SetTable.vue?vue&type=script&lang=js&": /*!*******************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/teach-set/components/set-table/SetTable.vue?vue&type=script&lang=js& ***! \*******************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["default"] = ({ name: "SetTable", props: { tableData: { type: Array }, tableOption: { type: Array } }, data: function data() { return {}; }, computed: {}, watch: {}, created: function created() {}, mounted: function mounted() {}, methods: { handleChange: function handleChange(name, value, index) { this.$emit("handleChange", name, value, index); }, handleClick: function handleClick(list, row, index) { this.$emit("handleClick", list, row, index); } }, filters: {} }); /***/ }), /***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"305c61fc-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/teach-set/class-list/ClassList.vue?vue&type=template&id=23e83dd9&": /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"305c61fc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/teach-set/class-list/ClassList.vue?vue&type=template&id=23e83dd9& ***! \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", { staticClass: "class-list" }, [ _c("div", { staticClass: "option-modular" }, [ _c("div", { staticClass: "class-option" }, [ _c( "div", { staticClass: "drop-down-menu" }, [ _c("span", { staticClass: "c-name" }, [_vm._v(" 年级: ")]), _c( "el-select", { attrs: { clearable: "", placeholder: "请选择年级", size: "mini" }, on: { change: function($event) { return _vm.selGrade($event) } }, model: { value: _vm.obj.grade, callback: function($$v) { _vm.$set(_vm.obj, "grade", $$v) }, expression: "obj.grade" } }, _vm._l(_vm.gradeData, function(item) { return _c("el-option", { key: item.value, attrs: { label: item.label, value: item.value } }) }), 1 ) ], 1 ), _c( "div", { staticClass: "drop-down-menu" }, [ _c("span", { staticClass: "c-name" }, [_vm._v(" 班级: ")]), _c( "el-select", { attrs: { clearable: "", placeholder: "请选择班级", size: "mini" }, model: { value: _vm.obj.class_id, callback: function($$v) { _vm.$set(_vm.obj, "class_id", $$v) }, expression: "obj.class_id" } }, _vm._l(_vm.classData, function(item) { return _c("el-option", { key: item.class_id, attrs: { label: item.class_name, value: item.class_id } }) }), 1 ) ], 1 ), _c( "div", { staticClass: "drop-down-menu" }, [ _c("span", { staticClass: "c-name" }, [_vm._v(" 教师: ")]), _c( "el-select", { attrs: { clearable: "", placeholder: "请选择教师", size: "mini" }, model: { value: _vm.obj.teacher_id, callback: function($$v) { _vm.$set(_vm.obj, "teacher_id", $$v) }, expression: "obj.teacher_id" } }, _vm._l(_vm.teacherData, function(item) { return _c("el-option", { key: item.teacher_id, attrs: { label: item.teacher_name, value: item.teacher_id } }) }), 1 ) ], 1 ), _c( "div", { staticClass: "search-block" }, [ _c( "el-button", { attrs: { id: "searchBtn", size: "mini" }, on: { click: function($event) { return _vm.search() } } }, [_vm._v(" 搜索 ")] ) ], 1 ) ]), _c("div", { staticClass: "custom" }, [ _c("div", { staticClass: "notice" }, [ _vm._v("班级定制:以班级为单位,设置各班级的产品模版") ]), _c( "div", { staticClass: "btn-block" }, [ _c( "el-row", [ _c( "el-button", { attrs: { id: "toCustomPage", size: "mini" }, on: { click: _vm.toManage } }, [_vm._v(" 模板管理 ")] ), _c( "el-button", { attrs: { id: "resetDefault", size: "mini" }, on: { click: _vm.toBatchSet } }, [_vm._v("批量设置")] ) ], 1 ) ], 1 ) ]) ]), _c("set-table", { attrs: { tableData: _vm.tableData, tableOption: _vm.tableOption }, on: { handleClick: _vm.handle } }), _c("el-pagination", { attrs: { background: "", layout: "pager, total", total: _vm.total, "page-size": _vm.pageSize, "current-page": _vm.currentPage }, on: { "current-change": function($event) { return _vm.handleCurrentChange($event) } } }), _c("DiaLog", { attrs: { dialogVisble: _vm.dialogVisble, dialogWidth: _vm.dialogWidth, handleType: _vm.handleType, delText: _vm.delText, dataList: _vm.templateList, currentId: _vm.templateId }, on: { close: _vm.handleDiaClose, submit: _vm.handleSubTemplate, handleClick: _vm.selTemplate } }) ], 1 ) } var staticRenderFns = [] render._withStripped = true /***/ }), /***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"305c61fc-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/teach-set/components/set-table/SetTable.vue?vue&type=template&id=b692927c&": /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"305c61fc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/teach-set/components/set-table/SetTable.vue?vue&type=template&id=b692927c& ***! \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", { staticClass: "set-table" }, [ _c( "el-table", { staticStyle: { width: "100%" }, attrs: { data: _vm.tableData, border: "", "header-cell-style": { background: "#f2f2f2", color: "#606266" } } }, [ _vm._l(_vm.tableOption, function(item, index) { return [ !item.type ? _c("el-table-column", { key: index, attrs: { prop: item.prop, label: item.label, width: item.width }, scopedSlots: _vm._u( [ { key: "default", fn: function(scope) { return [ typeof scope.row[item.prop] == "string" ? _c("div", [ _vm._v( " " + _vm._s( _vm._f("dataFormat")( scope.row[item.prop], item.formatter ) ) + " " ) ]) : _vm._l(scope.row.cellItem, function( list, index ) { return _c( "div", { key: index, class: item.class }, [_vm._v(" " + _vm._s(list.text) + " ")] ) }) ] } } ], null, true ) }) : _vm._e(), item.type === "switch" ? _c("el-table-column", { key: index, attrs: { prop: item.prop, label: item.label, width: item.width }, scopedSlots: _vm._u( [ { key: "default", fn: function(scope) { return _vm._l(scope.row.cellItem, function( list, index ) { return _c( "div", { key: index, class: item.class }, [ _c("el-switch", { attrs: { "active-color": "#16ae68", "inactive-color": "#ddd" }, on: { change: function($event) { return _vm.handleChange( list.name, list.value, index ) } }, model: { value: list.value, callback: function($$v) { _vm.$set(list, "value", $$v) }, expression: "list.value" } }) ], 1 ) }) } } ], null, true ) }) : _vm._e(), item.type === "buttons" ? _c("el-table-column", { key: index, attrs: { prop: item.prop, label: item.label, width: item.width }, scopedSlots: _vm._u( [ { key: "default", fn: function(scope) { return [ _c( "div", { key: index, class: item.class }, _vm._l(item.button, function(btn, index) { return _c( "el-button", { key: index, on: { click: function($event) { return _vm.handleClick( btn, scope.$index, scope.row ) } } }, [_vm._v(_vm._s(btn.text))] ) }), 1 ) ] } } ], null, true ) }) : _vm._e() ] }) ], 2 ) ], 1 ) } var staticRenderFns = [] render._withStripped = true /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/teach-set/class-list/ClassList.vue?vue&type=style&index=0&lang=less&": /*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/teach-set/class-list/ClassList.vue?vue&type=style&index=0&lang=less& ***! \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); exports = ___CSS_LOADER_API_IMPORT___(false); // Module exports.push([module.i, ".class-list .option-modular {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 20px;\n}\n.class-list .option-modular .class-option {\n display: flex;\n}\n.class-list .option-modular .drop-down-menu {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-right: 10px;\n}\n.class-list .option-modular .drop-down-menu .c-name {\n margin-right: 10px;\n}\n.class-list .option-modular .search-block {\n display: flex;\n align-items: center;\n}\n.class-list .option-modular .custom {\n display: flex;\n}\n.class-list .option-modular .custom .notice {\n color: #f25643;\n margin-right: 10px;\n line-height: 28px;\n}\n.class-list .option-modular .custom .btn-block {\n display: flex;\n}\n.class-list .option-block {\n text-align: center;\n}\n.class-list .dialog-text {\n color: #333;\n}\n.class-list .template-list-block {\n margin-top: 16px;\n width: 100%;\n}\n.class-list .template-list-block ul {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n}\n.class-list .template-list-block ul li {\n width: 135px;\n font-size: 14px;\n border: 1px solid;\n border-radius: 16px;\n padding: 8px 0px;\n box-sizing: border-box;\n margin: 0 auto;\n margin-bottom: 8px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n cursor: pointer;\n}\n.class-list .template-list-block ul li.current {\n background: #16ae68;\n border: 1px solid #16ae68;\n color: #fff;\n}\n", ""]); // Exports module.exports = exports; /***/ }), /***/ "./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/teach-set/class-list/ClassList.vue?vue&type=style&index=0&lang=less&": /*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/vue-style-loader??ref--10-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/teach-set/class-list/ClassList.vue?vue&type=style&index=0&lang=less& ***! \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a