(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[22],{ /***/ "./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/template-item/index.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/template-item/index.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: "TemplateItem", props: { templateList: { type: Array, default: function _default() { return []; } } }, methods: { sendCopy: function sendCopy(val, type) { this.$emit("copy", val, type); }, sendReName: function sendReName(val, idx, type) { this.$emit("reName", val, idx, type); }, sendDel: function sendDel(val, type) { this.$emit("deLeTe", val, type); }, sendToPath: function sendToPath(val) { // this.$router.push(val.toPath); this.$emit("toPath", 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/teach-set/template-manager/TemplateManager.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/TemplateManager.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 _components_template_item_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/template-item/index */ "./src/views/teach-set/components/template-item/index.vue"); /* 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 _api_teach_teach_set__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/teach/teach-set */ "./src/api/teach/teach-set.js"); /* harmony import */ var _lib_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/util */ "./src/lib/util.js"); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["default"] = ({ name: "TemplateManager", components: { TemplateItem: _components_template_item_index__WEBPACK_IMPORTED_MODULE_0__["default"], DiaLog: _components_dialog_index__WEBPACK_IMPORTED_MODULE_1__["default"] }, data: function data() { return { templateList: [], dialogVisble: false, dialogWidth: "", delText: "", // delStatus: "", handleType: "", // Form Data params: { template_id: "", template_name: "" } }; }, created: function created() { this.getTemplate(); }, mounted: function mounted() {}, methods: { back: function back() { this.$router.go(-1); }, getTemplate: function getTemplate() { var _this = this; Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_2__["teachingTemplateList"])().then(function (res) { _this.templateList = res.data; }); }, // 复制 handleCopyClick: function handleCopyClick(val) { var _this2 = this; if (this.templateList.length > 11) { this.$message({ type: "error", message: "模板数量已达上限" }); return false; } var params = { template_id: val.template_id }; var tId = Object(_lib_util__WEBPACK_IMPORTED_MODULE_3__["getFormData"])(params); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_2__["teachingTemplateCopy"])(tId).then(function (res) { if (res.status === 1) { _this2.$message({ type: "success", message: "复制成功" }); _this2.getTemplate(); } else { _this2.$message({ type: "error", message: res.msg }); } }); }, // 删除 handleDelClick: function handleDelClick(val) { this.handleType = "提示"; this.dialogWidth = "30%"; if (val.is_default == 1) { // // this.params.template_id = val.template_id; // this.dialogVisble = true; // this.delText = "默认模板不可删除!"; // this.delStatus = val.is_default; this.$message({ type: "error", message: "默认模板不可删除!" }); } else { this.dialogVisble = true; this.params.template_id = val.template_id; this.delText = "确认删除该模版吗?"; this.delStatus = val.is_default; } }, // 改名 handReNameClick: function handReNameClick(val) { this.handleType = "编辑名称"; this.dialogWidth = "20%"; this.dialogVisble = true; this.params.template_name = val.template_name; this.params.template_id = val.template_id; }, // 编辑名称 changeName: function changeName(val) { this.params.template_name = val; }, // 提交确认 handleSubTemplate: function handleSubTemplate(type) { var _this3 = this; this.dialogVisble = false; if (type === "编辑名称") { var params = { template_id: this.params.template_id, template_name: this.params.template_name }; var tId = Object(_lib_util__WEBPACK_IMPORTED_MODULE_3__["getFormData"])(params); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_2__["teachingTemplateChangeName"])(tId).then(function (res) { if (res.status == 1) { _this3.$message({ type: "success", message: "操作成功" }); _this3.getTemplate(); } else { _this3.$message({ type: "error", message: res.msg }); } }); } else { var _params = { template_id: this.params.template_id }; var _tId = Object(_lib_util__WEBPACK_IMPORTED_MODULE_3__["getFormData"])(_params); Object(_api_teach_teach_set__WEBPACK_IMPORTED_MODULE_2__["teachingTemplateDel"])(_tId).then(function (res) { if (res.status === 1) { _this3.$message({ type: "success", message: "删除成功" }); _this3.getTemplate(); } else { _this3.$message({ type: "error", message: res.msg }); } }); } }, handleDiaClose: function handleDiaClose() { this.dialogVisble = false; }, // 设置 toSet: function toSet(val) { this.$router.push({ path: "/TeachSet/TypeSetting?template_id=".concat(val.template_id) }); } } }); /***/ }), /***/ "./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/template-item/index.vue?vue&type=template&id=56d774cf&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/teach-set/components/template-item/index.vue?vue&type=template&id=56d774cf&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", [ _c("div", { staticClass: "template-content" }, [ _c( "div", { staticClass: "template-list" }, _vm._l(_vm.templateList, function(item, index) { return _c( "div", { key: item.template_id, staticClass: "template-item" }, [ _c("div", { staticClass: "item-block" }, [ _vm._m(0, true), _c("div", { staticClass: "text" }, [ _c( "p", { staticClass: "template-name-output template-name" }, [_vm._v(" " + _vm._s(item.template_name) + " ")] ) ]) ]), _c("div", { staticClass: "set-block" }, [ _c( "span", { staticClass: "set-text", attrs: { id: "copy" }, on: { click: function($event) { return _vm.sendCopy(item) } } }, [_vm._v("复制")] ), _c( "span", { staticClass: "set-text", attrs: { id: "change" }, on: { click: function($event) { return _vm.sendReName(item, index) } } }, [_vm._v("改名")] ), _c( "span", { staticClass: "set-text", attrs: { id: "del" }, on: { click: function($event) { return _vm.sendDel(item) } } }, [_vm._v("删除")] ), _c( "span", { staticClass: "set-text", attrs: { id: "set" }, on: { click: function($event) { return _vm.sendToPath(item) } } }, [_vm._v("设置")] ) ]) ] ) }), 0 ) ]) ]) } var staticRenderFns = [ function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("div", { staticClass: "pic" }, [ _c("img", { attrs: { src: __webpack_require__(/*! ../../../../assets/img/teach/pic_teaching.png */ "./src/assets/img/teach/pic_teaching.png"), alt: "" } }) ]) } ] 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/TemplateManager.vue?vue&type=template&id=1e766d7d&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/teach-set/template-manager/TemplateManager.vue?vue&type=template&id=1e766d7d&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: "template-manager" }, [ _c( "div", { staticClass: "template-manager-header" }, [ _c("h2", [_vm._v("教学宝模板")]), _c( "el-button", { attrs: { id: "back", size: "mini" }, on: { click: _vm.back } }, [_vm._v(" 返回 ")] ) ], 1 ), _c( "div", { staticClass: "template-type" }, [ _c("TemplateItem", { attrs: { templateList: _vm.templateList }, on: { copy: _vm.handleCopyClick, deLeTe: _vm.handleDelClick, reName: _vm.handReNameClick, toPath: _vm.toSet } }) ], 1 ), _c("DiaLog", { attrs: { dialogVisble: _vm.dialogVisble, dialogWidth: _vm.dialogWidth, delText: _vm.delText, handleType: _vm.handleType, templateName: _vm.params.template_name }, on: { inputEvent: _vm.changeName, close: _vm.handleDiaClose, submit: _vm.handleSubTemplate } }) ], 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/components/template-item/index.vue?vue&type=style&index=0&id=56d774cf&scoped=true&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/components/template-item/index.vue?vue&type=style&index=0&id=56d774cf&scoped=true&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, ".module-title[data-v-56d774cf] {\n font-size: 16px;\n border-bottom: 1px solid #ccc;\n margin-bottom: 10px;\n padding-bottom: 2px;\n}\n.template-content[data-v-56d774cf] {\n margin-bottom: 40px;\n}\n.template-content .template-list[data-v-56d774cf] {\n display: flex;\n flex-wrap: wrap;\n}\n.template-content .template-list .template-item[data-v-56d774cf] {\n position: relative;\n width: 120px;\n padding: 10px;\n margin-right: 10px;\n margin-bottom: 20px;\n border: 1px solid #ccc;\n cursor: pointer;\n}\n.template-content .template-list .template-item .pic[data-v-56d774cf] {\n position: relative;\n width: 95px;\n height: 75px;\n}\n.template-content .template-list .template-item .pic img[data-v-56d774cf] {\n display: block;\n width: 95px;\n height: 75px;\n}\n.template-content .template-list .template-item .pic span[data-v-56d774cf] {\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.template-content .template-list .template-item .text[data-v-56d774cf] {\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.template-content .template-list .template-item .text .template-name[data-v-56d774cf] {\n width: 100%;\n resize: none;\n}\n.template-content .template-list .template-item .text .template-name.template-name-output[data-v-56d774cf] {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n margin-top: 4px;\n}\n.template-content .template-list .template-item .text .template-name.template-name-input[data-v-56d774cf] {\n width: 90px;\n height: 30px;\n}\n.template-content .template-list .template-item .set-block[data-v-56d774cf] {\n position: absolute;\n width: 80px;\n height: 102%;\n display: flex;\n flex-direction: column;\n -ms-flex-pack: distribute;\n -webkit-justify-content: space-around;\n -moz-box-pack: space-around;\n -webkit--moz-box-pack: space-around;\n box-pack: space-around;\n justify-content: space-around;\n align-items: center;\n right: -81px;\n top: -1px;\n border: 1px solid #ccc;\n background: #fff;\n display: none;\n z-index: 999;\n}\n.template-content .template-list .template-item .set-block .set-text[data-v-56d774cf] {\n width: 100%;\n height: 25%;\n text-align: center;\n cursor: pointer;\n color: #16ae68;\n display: flex;\n align-items: center;\n -webkit-justify-content: center;\n -moz-box-pack: center;\n -webkit--moz-box-pack: center;\n box-pack: center;\n justify-content: center;\n}\n.template-content .template-list .template-item .set-block .set-text[data-v-56d774cf]:hover {\n background-color: #16ae68;\n color: #fff;\n}\n.template-content .template-list .template-item:hover .set-block[data-v-56d774cf] {\n display: flex;\n}\n", ""]); // Exports module.exports = exports; /***/ }), /***/ "./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/TemplateManager.vue?vue&type=style&index=0&id=1e766d7d&scoped=true&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/TemplateManager.vue?vue&type=style&index=0&id=1e766d7d&scoped=true&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, ".template-manager .template-manager-header[data-v-1e766d7d] {\n display: flex;\n -webkit-justify-content: space-between;\n -moz-box-pack: space-between;\n -webkit--moz-box-pack: space-between;\n box-pack: space-between;\n justify-content: space-between;\n box-align: center;\n align-items: center;\n margin-bottom: 20px;\n}\n.template-manager .template-manager-header h2[data-v-1e766d7d] {\n font-size: 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/components/template-item/index.vue?vue&type=style&index=0&id=56d774cf&scoped=true&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/components/template-item/index.vue?vue&type=style&index=0&id=56d774cf&scoped=true&lang=less& ***! \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a