(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1f585cfa"],{"029d":function(t,e,a){},5625:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-card",{staticClass:"box-card"},[a("el-button",{on:{click:t.close}},[t._v("关 闭")]),a("el-button",{attrs:{id:"btn_save",type:"primary"},on:{click:function(e){return t.save()}}},[t._v("保 存")]),a("span",{staticStyle:{"margin-left":"20px","font-size":"14px",color:"#525252"}},[t._v("模版名称："+t._s(t.templateName))]),a("span",{staticStyle:{"margin-left":"20px","font-size":"14px",color:"#525252"}},[t._v("模版位置："+t._s(t.path))])],1),a("br"),a("codemirror",{ref:"mycode",staticClass:"code code-editor",attrs:{options:t.cmOptions},model:{value:t.curCode,callback:function(e){t.curCode=e},expression:"curCode"}})],1)},i=[],o=(a("14d9"),a("e33c")),s=a("8f94");a("fade");a("d69f");var r={name:"templateEdit",components:{codemirror:s["codemirror"]},data:function(){return{dataList:[],path:"/",templateName:"",dialogVisible:!1,dialogVisible2:!1,curCode:"",cmOptions:{viewportMargin:1/0,indentUnit:2,smartIndent:!0,matchBrackets:!0,lineNumbers:!0,mode:"htmlmixed",gutters:["CodeMirror-lint-markers"],theme:"panda-syntax",lint:!0},saveFileContent:{path:null,content:null}}},created:function(){this.path=this.$route.params.path,this.templateName=this.$route.params.templateName,this.templateEdit()},methods:{save:function(){var t=this;this.saveFileContent.content=this.curCode,Object(o["e"])(this.saveFileContent).then((function(e){t.$modal.msgSuccess("保存成功")}))},close:function(){this.$store.dispatch("tagsView/delView",this.$route),this.$router.push({name:"template",params:{path:this.path}})},templateEdit:function(){var t=this;Object(o["c"])(this.path+this.templateName).then((function(e){t.curCode=e.data,t.saveFileContent.path=t.path+t.templateName}))}}},c=r,l=(a("a594"),a("2877")),u=Object(l["a"])(c,n,i,!1,null,null,null);e["default"]=u.exports},a594:function(t,e,a){"use strict";a("029d")},e33c:function(t,e,a){"use strict";a.d(e,"d",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"e",(function(){return s})),a.d(e,"f",(function(){return r})),a.d(e,"b",(function(){return c})),a.d(e,"a",(function(){return l}));var n=a("b775");function i(t){return Object(n["a"])({url:"/system/template/list",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/system/template/getFile",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/system/template/saveFile",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/system/template/uploadFile",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/system/template/delFile",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/system/template/createFileAndFolder",method:"post",data:t})}}}]);