(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[24],{ /***/ "./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/method-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/product-set/method-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: { handle: function handle(btn, row, index) { // if (typeof btn.function === "string") { // this.$emit(btn.function, row, index); // } else { this.$emit("handle", btn, row, index); // } } }, filters: {// dataFormat(val, type) { // if (type === "gradeFilter") { // switch (val) { // case "1": // return "高一"; // case "2": // return "高二"; // case "3": // return "高三"; // } // } else if (type === "levelFilter") { // switch (val) { // case "1": // return "A"; // case "2": // return "B"; // case "3": // return "C"; // } // } else { // return val; // } // }, } }); /***/ }), /***/ "./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/method-set/page/class-setting/ClassSetting.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/method-set/page/class-setting/ClassSetting.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 core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.keys */ "./node_modules/core-js/modules/es.object.keys.js"); /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_set_table_SetTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/set-table/SetTable */ "./src/views/product-set/method-set/components/set-table/SetTable.vue"); /* harmony import */ var _api_product_method_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../api/product/method.api */ "./src/api/product/method.api.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: "ClassSetting", components: { SetTable: _components_set_table_SetTable__WEBPACK_IMPORTED_MODULE_2__["default"] }, filters: {}, props: {}, data: function data() { return { gradeData: [{ value: 1, label: "高一" }, { value: 2, label: "高二" }, { value: 3, label: "高三" }], classData: [], tableData: [], tableOption: [{ prop: "grade", label: "年级", // width: "300", formatter: "gradeFilter" }, { prop: "class_name", label: "班级" // width: "300", }, { prop: "level", label: "班级层次", // width: "300", formatter: "levelFilter" }, { prop: "template_name", label: "方法宝模板" }], total: 0, // Form Data obj: { page: 1, class_id: "", grade_id: "" } }; }, computed: {}, watch: {}, created: function created() { this.getClassData(); this.getGradeClass(); }, mounted: function mounted() {}, methods: { // 获取班级定制数据 getClassData: function getClassData() { var _this = this; var from_data = Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(this.obj); Object(_api_product_method_api__WEBPACK_IMPORTED_MODULE_3__["productClassSet"])(from_data).then(function (res) { _this.tableData = res.data.list; // 判断页码数 var total = 0; if (Object.keys(res.data.pages).length) { total = Number(res.data.pages.total); } else { total = res.data.list.length; } _this.total = total; }); }, // 获取年级班级数据 getGradeClass: function getGradeClass(gradeId) { var _this2 = this; Object(_api_product_method_api__WEBPACK_IMPORTED_MODULE_3__["getClassByGrade"])(gradeId).then(function (res) { _this2.classData = res.result; }); }, // 选择年级 selGrade: function selGrade(val) { this.obj.class_id = ""; var obj = { grade_id: val }; var gradeId = Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(obj); this.getGradeClass(gradeId); }, // 分页 handleCurrentChange: function handleCurrentChange(val) { this.obj.page = val; var pageNum = Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(this.obj); this.getClassData(pageNum); }, // 搜索 search: function search() { this.obj.page = 1; var search_data = Object(_lib_productset_many__WEBPACK_IMPORTED_MODULE_4__["getFormData"])(this.obj); this.getClassData(search_data); }, toCustom: function toCustom() { this.$router.push({ path: "ClassCustom" }); }, // 恢复默认 recovery: function recovery() { var _this3 = this; this.$confirm("将所有班级的模版全部恢复为默认模版,确认要恢复默认吗?", "信息", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(function () { Object(_api_product_method_api__WEBPACK_IMPORTED_MODULE_3__["resetClassSet"])().then(function (res) { if (res.status == 1) { _this3.$message({ type: "success", message: res.msg }); _this3.getClassData(); } else { _this3.$message({ type: "error", message: res.msg }); } }); }).catch(function () { _this3.$message({ type: "info", 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/method-set/components/set-table/SetTable.vue?vue&type=template&id=9eaaafc6&": /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/method-set/components/set-table/SetTable.vue?vue&type=template&id=9eaaafc6& ***! \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! 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 [ _vm._v( " " + _vm._s( _vm._f("dataFormat")( scope.row[item.prop], item.formatter ) ) + " " ) ] } } ], 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", { class: item.class }, _vm._l(item.button, function(btn, index) { return _c( "el-button", { key: index, on: { click: function($event) { return _vm.handle( 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/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/method-set/page/class-setting/ClassSetting.vue?vue&type=template&id=3bfeab58&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/method-set/page/class-setting/ClassSetting.vue?vue&type=template&id=3bfeab58&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-setting" }, [ _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_id, callback: function($$v) { _vm.$set(_vm.obj, "grade_id", $$v) }, expression: "obj.grade_id" } }, _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: "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.toCustom } }, [_vm._v(" 班级定制 ")] ), _c( "el-button", { attrs: { id: "resetDefault", size: "mini" }, on: { click: _vm.recovery } }, [_vm._v("恢复默认")] ) ], 1 ) ], 1 ) ]) ]), _c("set-table", { attrs: { tableData: _vm.tableData, tableOption: _vm.tableOption } }), _c("el-pagination", { attrs: { background: "", layout: "pager, total", total: _vm.total }, on: { "current-change": function($event) { return _vm.handleCurrentChange($event) } } }) ], 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/product-set/method-set/page/class-setting/ClassSetting.vue?vue&type=style&index=0&id=3bfeab58&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/method-set/page/class-setting/ClassSetting.vue?vue&type=style&index=0&id=3bfeab58&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-setting[data-v-3bfeab58] {\n min-width: 1100px;\n}\n.class-setting .option-modular[data-v-3bfeab58] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.class-setting .option-modular .class-option[data-v-3bfeab58] {\n display: flex;\n}\n.class-setting .option-modular .drop-down-menu[data-v-3bfeab58] {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-right: 10px;\n}\n.class-setting .option-modular .drop-down-menu .c-name[data-v-3bfeab58] {\n margin-right: 10px;\n}\n.class-setting .option-modular .search-block[data-v-3bfeab58] {\n display: flex;\n align-items: center;\n}\n.class-setting .option-modular .custom[data-v-3bfeab58] {\n display: flex;\n}\n.class-setting .option-modular .custom .notice[data-v-3bfeab58] {\n color: #f25643;\n margin-right: 10px;\n line-height: 28px;\n}\n.class-setting .option-modular .custom .btn-block[data-v-3bfeab58] {\n display: flex;\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/method-set/page/class-setting/ClassSetting.vue?vue&type=style&index=0&id=3bfeab58&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/method-set/page/class-setting/ClassSetting.vue?vue&type=style&index=0&id=3bfeab58&lang=less&scoped=true& ***! \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a