(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[23],{ /***/ "./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?!./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/template-manager/type-setting/TypeSetting.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/template-manager/type-setting/TypeSetting.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_for_each__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.splice */ "./node_modules/core-js/modules/es.array.splice.js"); /* harmony import */ var core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.function.name */ "./node_modules/core-js/modules/es.function.name.js"); /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_3__ = __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_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _components_set_table_SetTable__WEBPACK_IMPORTED_MODULE_4__ = __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_5__ = __webpack_require__(/*! ../../../../api/teach/teach-set */ "./src/api/teach/teach-set.js"); /* harmony import */ var _lib_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../lib/util */ "./src/lib/util.js"); // // // // // // // // // // // /* harmony default export */ __webpack_exports__["default"] = ({ name: "TypeSetting", components: { SetTable: _components_set_table_SetTable__WEBPACK_IMPORTED_MODULE_4__["default"] }, data: function data() { return { isAccurate: null, tableData: [], TypeSetData: [{ title: "共性问题", cellItem: [{ text: "显示【共性问题】模式", name: "common", value: true }, { text: "显示共性问题的【错题原题】", name: "common_wrong", value: true }] }, { title: "试卷讲评", cellItem: [{ text: "显示【试卷讲评】", name: "paper", value: true }, { text: "显示试卷讲评的【错题原题】", name: "paper_wrong", value: true }] }, { title: "真题速递", cellItem: [{ text: "显示【真题速递】", name: "real_topic", value: true }] }, { title: "同学优解", cellItem: [{ text: "显示【同学优解】", name: "classmateOptimization", value: true }] }], tableOption: [{ label: "一级栏目", prop: "title" }, { label: "二级栏目", prop: "cellItem", class: "show-text" }, { label: "设置", class: "switch-block", type: "switch" }], // Form Data params: { template_id: this.$route.query.template_id, json: "" } }; }, computed: {}, created: function created() { this.getProduct(); // this.getTemplateSet(); }, mounted: function mounted() {}, methods: { // 获取产品类型 getProduct: function getProduct() { var _this = this; Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_5__["getProductType"])().then(function (res) { _this.isAccurate = res.isPrecise; if (_this.isAccurate == 1) { var accurateData = _this.TypeSetData; accurateData.forEach(function (item, index) { if (item.title === "真题速递") { accurateData.splice(index, 1); } }); _this.tableData = accurateData; } else { _this.tableData = _this.TypeSetData; } _this.getTemplateSet(); }); }, // 获取模板设置 getTemplateSet: function getTemplateSet() { var _this2 = this; var params = { template_id: this.params.template_id }; var tId = Object(_lib_util__WEBPACK_IMPORTED_MODULE_6__["getFormData"])(params); var that = this; Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_5__["teachingTemplateDetail"])(tId).then(function (res) { var jsonObj = JSON.parse(res.data); _this2.tableData.forEach(function (item) { var option = item.cellItem; option.forEach(function (list) { for (var i in jsonObj) { if (list.name === i) { list.value = jsonObj[i] ? true : false; } } }); }); }); }, // 设置选项 // setSwitch(name, value, index) { // console.log(name, value, index); // }, //保存模板设置 handleSetting: function handleSetting() { var _this3 = this; var jsonStr = { common: 1, common_wrong: 1, paper: 1, paper_wrong: 1, real_topic: 1, classmateOptimization: 1 }; this.tableData.forEach(function (item) { var option = item.cellItem; option.forEach(function (list) { for (var i in jsonStr) { if (list.name === i) { jsonStr[i] = list.value ? 1 : 0; } } }); }); if (this.isAccurate == 1) { jsonStr.real_topic = 0; } this.params.json = JSON.stringify(jsonStr); var params = Object(_lib_util__WEBPACK_IMPORTED_MODULE_6__["getFormData"])(this.params); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_5__["teachingTemplateSave"])(params).then(function (res) { if (res.status === 1) { _this3.$alert("保存成功", "信息", { confirmButtonText: "确定", callback: function callback(action) { _this3.$router.go(-1); } }); // this.getTemplateSet(); } else { _this3.$message({ type: "error", message: res.msg }); } }); } } }); /***/ }), /***/ "./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/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/template-manager/type-setting/TypeSetting.vue?vue&type=template&id=a0db492c&": /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./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/template-manager/type-setting/TypeSetting.vue?vue&type=template&id=a0db492c& ***! \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! 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: "type-setting" }, [ _c("h2", [_vm._v("教学宝排版")]), _c("set-table", { attrs: { tableData: _vm.tableData, tableOption: _vm.tableOption } }), _c( "div", { staticClass: "save-btn" }, [ _c( "el-button", { attrs: { id: "saveSetting" }, on: { click: _vm.handleSetting } }, [_vm._v(" 保存设置 ")] ) ], 1 ) ], 1 ) } var staticRenderFns = [] render._withStripped = true /***/ }), /***/ "./node_modules/core-js/modules/es.array.splice.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/modules/es.array.splice.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js"); var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js"); var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js"); var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js"); var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js"); var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "./node_modules/core-js/internals/array-method-uses-to-length.js"); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); var USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 }); var max = Math.max; var min = Math.min; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method // https://tc39.github.io/ecma262/#sec-array.prototype.splice // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { splice: function splice(start, deleteCount /* , ...items */) { var O = toObject(this); var len = toLength(O.length); var actualStart = toAbsoluteIndex(start, len); var argumentsLength = arguments.length; var insertCount, actualDeleteCount, A, k, from, to; if (argumentsLength === 0) { insertCount = actualDeleteCount = 0; } else if (argumentsLength === 1) { insertCount = 0; actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); } A = arraySpeciesCreate(O, actualDeleteCount); for (k = 0; k < actualDeleteCount; k++) { from = actualStart + k; if (from in O) createProperty(A, k, O[from]); } A.length = actualDeleteCount; if (insertCount < actualDeleteCount) { for (k = actualStart; k < len - actualDeleteCount; k++) { from = k + actualDeleteCount; to = k + insertCount; if (from in O) O[to] = O[from]; else delete O[to]; } for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; } else if (insertCount > actualDeleteCount) { for (k = len - actualDeleteCount; k > actualStart; k--) { from = k + actualDeleteCount - 1; to = k + insertCount - 1; if (from in O) O[to] = O[from]; else delete O[to]; } } for (k = 0; k < insertCount; k++) { O[k + actualStart] = arguments[k + 2]; } O.length = len - actualDeleteCount + insertCount; return A; } }); /***/ }), /***/ "./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/template-manager/type-setting/TypeSetting.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/template-manager/type-setting/TypeSetting.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, ".type-setting h2 {\n font-size: 18px;\n margin-bottom: 20px;\n}\n.type-setting .set-table .show-text {\n margin: 5px 0;\n}\n.type-setting .set-table .switch-block {\n margin: 5px 0;\n}\n.type-setting .save-btn {\n margin-top: 20px;\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/template-manager/type-setting/TypeSetting.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/template-manager/type-setting/TypeSetting.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