(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[28],{ /***/ "./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/product-set/set-page/class-setting/class-custom/ClassCustom.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/product-set/set-page/class-setting/class-custom/ClassCustom.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_array_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.find */ "./node_modules/core-js/modules/es.array.find.js"); /* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "./node_modules/core-js/modules/es.array.for-each.js"); /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "./node_modules/core-js/modules/web.dom-collections.for-each.js"); /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _api_product_product_set__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../api/product/product-set */ "./src/api/product/product-set.js"); /* harmony import */ var _lib_productset_many__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../lib/productset/many */ "./src/lib/productset/many.js"); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["default"] = ({ name: "ClassCustom", components: {}, filters: {}, props: {}, data: function data() { return { subjectId: Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getSubjectId"])(), isAccurate: sessionStorage.getItem("isAccurate"), date: { school_year: "", semester_name: "" }, current: 0, // 下拉框 options: [{ value: 1, label: "高一" }, { value: 2, label: "高二" }, { value: 3, label: "高三" }], gradeValue: "", tId: "", // 图片 pic_arr: { pic_error: __webpack_require__(/*! ../../../../../assets/img/product/pic_errorTpl.jpg */ "./src/assets/img/product/pic_errorTpl.jpg"), pic_addpoint: __webpack_require__(/*! ../../../../../assets/img/product/pic_addpoint.jpg */ "./src/assets/img/product/pic_addpoint.jpg"), pic_addpoint3: __webpack_require__(/*! ../../../../../assets/img/product/pic_addpoint3.jpg */ "./src/assets/img/product/pic_addpoint3.jpg") }, // 默认参数 query: { type: 1, target_type: 1, subject_id: Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getSubjectId"])() }, templateList: [], // 穿梭框数据 tValue: [], classData: [], selData: [] }; }, created: function created() { this.reSemester(); this.getTemplate(); // this._getGradeClass(); }, watch: { templateList: { deep: true, handler: function handler(val) { this.tId = val[0].template_id; } } }, methods: { reSemester: function reSemester() { var _this = this; Object(_api_product_product_set__WEBPACK_IMPORTED_MODULE_3__["getSemester"])().then(function (res) { _this.date.school_year = res.data.school_year; _this.date.semester_name = res.data.semester_name; }); }, selClass: function selClass(index, list) { this.current = index; this.tId = list.template_id; }, getTemplate: function getTemplate() { var _this2 = this; var obj = this.query; var type_data = Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(obj); Object(_api_product_product_set__WEBPACK_IMPORTED_MODULE_3__["getTemplateByType"])(type_data).then(function (res) { _this2.templateList = res.data; // 切换图片 _this2.templateList.forEach(function (item) { if (_this2.query.type === 1) { item.img = _this2.pic_arr.pic_error; } else if (_this2.query.type === 2) { item.img = _this2.pic_arr.pic_addpoint; } else { item.img = _this2.pic_arr.pic_addpoint3; } }); }); }, // 选择模板 switchTemplate: function switchTemplate() { this.current = 0; this.getTemplate(); }, // 获取年级班级数据 _getGradeClass: function _getGradeClass(val) { var _this3 = this; var req = { grade_id: val }; if (!val) { req = {}; } Object(_api_product_product_set__WEBPACK_IMPORTED_MODULE_3__["getClassByGrade"])(Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(req)).then(function (res) { _this3.classData = res.result; }); }, handleGradeChange: function handleGradeChange(val) { if (!val) { this.classData = []; return false; } this._getGradeClass(val); }, handleTransferChange: function handleTransferChange() { var _this4 = this; var changeData = []; var _data; this.tValue.forEach(function (item) { _data = _this4.classData.find(function (list) { return item == list.class_id; }); changeData.push(_data); }); this.selData = changeData; }, // 保存设置 saveSetting: function saveSetting() { var _this5 = this; if (!this.gradeValue == "" && !this.tValue.length == 0) { var str = ""; var obj = {}; obj.template_id = this.tId; obj.template_type = this.query.type; for (var index = 0; index < this.selData.length; index++) { for (var k in this.selData[index]) { str = "classes" + "[" + index + "]" + "[" + k + "]"; obj[str] = this.selData[index][k]; } } obj.subject_id = Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getSubjectId"])(); Object(_api_product_product_set__WEBPACK_IMPORTED_MODULE_3__["saveClassSet"])(Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(obj)).then(function (res) { if (res.status === 1) { _this5.$alert("更新成功!", "信息", { confirmButtonText: "确定", callback: function callback() { _this5.$router.go(-1); } }); } else if (res.status === 0) { _this5.$message(res.msg); } }); } else { this.$message("请选择班级"); } } } }); /***/ }), /***/ "./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/product-set/set-page/class-setting/class-custom/ClassCustom.vue?vue&type=template&id=546b9a34&scoped=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??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/product-set/set-page/class-setting/class-custom/ClassCustom.vue?vue&type=template&id=546b9a34&scoped=true& ***! \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! 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-custom" }, [ _c("div", { staticClass: "custom-header" }, [ _c("div", { staticClass: "custom-info" }, [ _c("h1", [_vm._v("班级定制")]), _c("span", [_vm._v("当前学年:" + _vm._s(_vm.date.school_year))]), _c("span", [_vm._v("当前学期:" + _vm._s(_vm.date.semester_name))]) ]), _c( "div", { staticClass: "back" }, [ _c( "el-link", { attrs: { href: "javascript:history.back(-1);", underline: false } }, [_vm._v("返回")] ) ], 1 ) ]), _c("div", { staticClass: "custom-module" }, [ _vm._m(0), _c( "div", { staticClass: "sel-template" }, [ _c( "el-radio-group", { on: { change: _vm.switchTemplate }, model: { value: _vm.query.type, callback: function($$v) { _vm.$set(_vm.query, "type", $$v) }, expression: "query.type" } }, [ _c("el-radio", { attrs: { label: 1 } }, [_vm._v("错题本模版")]), _c("el-radio", { attrs: { label: 2 } }, [ _vm._v( _vm._s( _vm.subjectId === "3" && _vm.isAccurate == 1 ? "精准学习方案模板" : "个性化学习方案模板" ) ) ]), _c("el-radio", { attrs: { label: 3 } }, [ _vm._v( _vm._s( _vm.subjectId === "3" && _vm.isAccurate == 1 ? "精准学习宝模版" : "个性化学习宝模板" ) ) ]) ], 1 ), _c( "div", { staticClass: "template-list" }, _vm._l(_vm.templateList, function(list, index) { return _c( "div", { key: list.template_id, staticClass: "template-item", class: [index === _vm.current ? "current" : ""], attrs: { "data-id": list.template_id }, on: { click: function($event) { return _vm.selClass(index, list) } } }, [ _c("div", { staticClass: "pic" }, [ _c("img", { attrs: { src: list.img, alt: "" } }), _c("span", [_vm._v("班级模板")]) ]), _c("div", { staticClass: "text" }, [ _c( "p", { staticClass: "template-name-output template-name" }, [_vm._v(" " + _vm._s(list.template_name) + " ")] ) ]) ] ) }), 0 ) ], 1 ) ]), _c("div", { staticClass: "custom-module" }, [ _vm._m(1), _c( "div", { staticClass: "filterModule" }, [ _c( "el-select", { attrs: { clearable: "", placeholder: "请选择年级", size: "mini" }, on: { change: _vm.handleGradeChange }, model: { value: _vm.gradeValue, callback: function($$v) { _vm.gradeValue = $$v }, expression: "gradeValue" } }, _vm._l(_vm.options, function(item) { return _c("el-option", { key: item.value, attrs: { label: item.label, value: item.value } }) }), 1 ), _c("el-transfer", { attrs: { data: _vm.classData, props: { key: "class_id", label: "class_name" }, titles: ["班级", "已选班级"] }, on: { change: _vm.handleTransferChange }, model: { value: _vm.tValue, callback: function($$v) { _vm.tValue = $$v }, expression: "tValue" } }) ], 1 ) ]), _c( "div", { staticClass: "saveBtn" }, [ _c( "el-button", { attrs: { id: "saveSetting" }, on: { click: _vm.saveSetting } }, [_vm._v(" 保存设置 ")] ) ], 1 ) ]) } var staticRenderFns = [ function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("div", { staticClass: "module-title" }, [ _c("i", [_vm._v("1")]), _c("span", [_vm._v("选模版")]) ]) }, function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("div", { staticClass: "module-title" }, [ _c("i", [_vm._v("2")]), _c("span", [_vm._v("选班级")]) ]) } ] 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/product-set/set-page/class-setting/class-custom/ClassCustom.vue?vue&type=style&index=0&id=546b9a34&lang=less&scoped=true&": /*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/product-set/set-page/class-setting/class-custom/ClassCustom.vue?vue&type=style&index=0&id=546b9a34&lang=less&scoped=true& ***! \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! 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-custom[data-v-546b9a34] {\n min-width: 1100px;\n}\n.class-custom .custom-header[data-v-546b9a34] {\n display: flex;\n height: 60px;\n line-height: 60px;\n margin-bottom: 20px;\n border-bottom: 1px solid #ccc;\n justify-content: space-between;\n align-items: center;\n}\n.class-custom .custom-header .custom-info[data-v-546b9a34] {\n display: flex;\n align-items: center;\n}\n.class-custom .custom-header .custom-info h1[data-v-546b9a34] {\n font-size: 36px;\n}\n.class-custom .custom-header .custom-info span[data-v-546b9a34] {\n margin-left: 20px;\n}\n.class-custom .custom-module[data-v-546b9a34] {\n margin-bottom: 20px;\n}\n.class-custom .custom-module .module-title[data-v-546b9a34] {\n display: flex;\n margin-bottom: 10px;\n align-items: center;\n font-size: 16px;\n margin-bottom: 20px;\n}\n.class-custom .custom-module .module-title i[data-v-546b9a34] {\n width: 30px;\n height: 30px;\n text-align: center;\n line-height: 30px;\n border-radius: 50%;\n background: #16ae68;\n color: #fff;\n}\n.class-custom .custom-module .module-title span[data-v-546b9a34] {\n margin-left: 15px;\n}\n.class-custom .custom-module .sel-template .template-list[data-v-546b9a34] {\n display: flex;\n flex-wrap: wrap;\n}\n.class-custom .custom-module .sel-template .template-list .template-item[data-v-546b9a34] {\n position: relative;\n width: 120px;\n padding: 10px;\n margin-right: 20px;\n margin-bottom: 20px;\n border: 2px solid #ccc;\n cursor: pointer;\n}\n.class-custom .custom-module .sel-template .template-list .template-item .pic[data-v-546b9a34] {\n position: relative;\n width: 95px;\n height: 75px;\n}\n.class-custom .custom-module .sel-template .template-list .template-item .pic img[data-v-546b9a34] {\n display: block;\n width: 95px;\n height: 75px;\n}\n.class-custom .custom-module .sel-template .template-list .template-item .pic span[data-v-546b9a34] {\n position: absolute;\n width: 100%;\n height: 25px;\n text-align: center;\n line-height: 25px;\n color: #fff;\n background: rgba(0, 0, 0, 0.3);\n bottom: 0;\n left: 0;\n z-index: 10;\n font-size: 12px;\n}\n.class-custom .custom-module .sel-template .template-list .template-item .text[data-v-546b9a34] {\n font-size: 14px;\n text-align: center;\n text-overflow: -o-ellipsis-lastline;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n.class-custom .custom-module .sel-template .template-list .template-item .text .template-name[data-v-546b9a34] {\n width: 100%;\n resize: none;\n}\n.class-custom .custom-module .sel-template .template-list .template-item .text .template-name.template-name-output[data-v-546b9a34] {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n margin-top: 3px;\n}\n.class-custom .custom-module .sel-template .template-list .template-item.current[data-v-546b9a34] {\n border-color: #16ae68;\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/product-set/set-page/class-setting/class-custom/ClassCustom.vue?vue&type=style&index=0&id=546b9a34&lang=less&scoped=true&": /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/product-set/set-page/class-setting/class-custom/ClassCustom.vue?vue&type=style&index=0&id=546b9a34&lang=less&scoped=true& ***! \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a