You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.5 KiB
1 lines
2.5 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4985a962"],{"3e6a":function(t,e,a){},"5c98":function(t,e,a){},7081:function(t,e,a){"use strict";a("3e6a")},"8ca8":function(t,e,a){"use strict";a("5c98")},e3e0:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("BackBtn"),a("BaseTable",{ref:"baseTable",staticStyle:{"margin-top":"16px"},attrs:{request:t.request,params:t.params,"is-request":!1},on:{"update:params":function(e){t.params=e}}},[a("el-table-column",{attrs:{label:"ID",prop:"id",width:"80px"}}),a("el-table-column",{attrs:{label:t.$t("名称"),prop:"name"}}),a("el-table-column",{attrs:{label:t.$t("文件路径"),prop:"file"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.file)+" ")]}}])}),a("el-table-column",{attrs:{fixed:"right",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{on:{click:function(a){return t.goEdit(e.row)}}},[t._v(t._s(t.$t("编辑")))])]}}])})],1),a("OnlineEditor",{attrs:{"dialog-show":t.dialogShow,"editor-content":t.tempForm.content,"editor-type":t.fileType,"curr-path":t.currEditorPath,width:80},on:{"update:dialogShow":function(e){t.dialogShow=e},"update:dialog-show":function(e){t.dialogShow=e}}})],1)},n=[],o=a("5530"),r=a("12de"),s={data:function(){return{request:r["a"].tmpFile,params:{},fileType:"html",currEditorPath:"",dialogShow:!1,tempForm:{content:"",path:""},tempRules:{content:[{required:"true",message:"内容不能为空",tigger:"blur"}]},num:0}},mounted:function(){this.params={website_id:this.$route.query.id,theme:this.$route.query.tname,theme_id:this.$route.query.tid,lang:this.$route.query.lang},this.getList()},methods:{getList:function(){this.$refs.baseTable.getList("search")},goEdit:function(t){var e=this;this.tempForm.path=t.real_path,this.fileType=this.getFileExt(t.real_path),this.currEditorPath=this.tempForm.path,r["a"].fileRead({path:this.tempForm.path}).then((function(t){e.tempForm.content=t.data,e.dialogShow=!0}))},getFileExt:function(t){return t.substr(t.lastIndexOf(".")+1)},goRefresh:function(t){var e=this;this.tempForm.path=t.real_path,r["a"].singleUpdate({path:this.tempForm.path}).then((function(t){0==t.code&&e.$message.success(t.msg)}))},submit:function(){var t=this;r["a"].fileUpdate(Object(o["a"])({},this.tempForm)).then((function(e){0==e.code&&(t.$message.success(e.msg),t.dialogShow=!1)}))}}},u=s,l=(a("7081"),a("8ca8"),a("2877")),c=Object(l["a"])(u,i,n,!1,null,"33622cdc",null);e["default"]=c.exports}}]);
|