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 line
21 KiB
1 line
21 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7a6f72e8"],{"0f7c":function(e,t,r){},2373:function(e,t,r){},3793:function(e,t,r){"use strict";r.r(t);var n=r("a34a"),a=r.n(n),i=r("8593"),o=r("56b3"),s=r.n(o);function c(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){c(i,n,a,o,s,"next",e)}function s(e){c(i,n,a,o,s,"throw",e)}o(void 0)}))}}r("0f7c"),r("f9d4");var l={name:"opendir",data:function(){return{code:"",modals:!1,spinShow:!1,loading:!1,tabList:[],columns4:[{title:"文件/文件夹名",slot:"filename",minWidth:150,back:"返回上级"},{title:"文件/文件夹路径",key:"real_path",minWidth:150},{title:"文件/文件夹大小",key:"size",minWidth:100},{title:"是否可写",slot:"isWritable",minWidth:100},{title:"更新时间",key:"mtime",minWidth:150},{title:"Action",slot:"action",minWidth:150}],formItem:{dir:"",superior:0,filedir:""},rows:{},pathname:"",title:""}},mounted:function(){this.editor=s.a.fromTextArea(this.$refs.mycode,{value:"http://www.crmeb.com",mode:"text/javascript",theme:"ambiance",indentUnit:4,smartIndent:!0,tabSize:4,readOnly:!1,showCursorWhenSelecting:!0,lineNumbers:!0})},created:function(){this.getList()},methods:{currentChange:function(e){e.isDir?this.open(e):this.edit(e)},getList:function(){var e=this;this.loading=!0,Object(i.K)(this.formItem).then(function(){var t=u(a.a.mark((function t(r){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.data,e.tabList=n.list,e.dir=n.dir,e.loading=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},goBack:function(){this.formItem={dir:this.dir,superior:1,filedir:""},this.getList()},open:function(e){this.rows=e,this.formItem={dir:e.path,superior:0,filedir:e.filename},this.getList()},edit:function(e){var t=this;this.modals=!0,this.spinShow=!0,this.pathname=e.pathname,this.title=e.filename,Object(i.L)(e.pathname).then(function(){var e=u(a.a.mark((function e(r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.code=n.content,t.editor.setValue(t.code),t.spinShow=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},savefile:function(){var e=this,t={comment:this.editor.getValue(),filepath:this.pathname};Object(i.R)(t).then(function(){var t=u(a.a.mark((function t(r){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg),e.modals=!1;case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},undofile:function(){this.editor.undo()},redofile:function(){this.editor.redo()},refreshfile:function(){this.editor.refresh()}}},f=(r("e9e1"),r("2877")),d=Object(f.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("PageHeader",{staticClass:"product_tabs",attrs:{title:"文件管理","hidden-breadcrumb":""}})],1),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"backs",on:{click:e.goBack}},[r("Icon",{staticClass:"mr5",attrs:{type:"ios-folder-outline"}}),r("span",[e._v("返回上级")])],1),r("Table",{ref:"selection",staticClass:"mt20",attrs:{columns:e.columns4,data:e.tabList,loading:e.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},on:{"on-current-change":e.currentChange},scopedSlots:e._u([{key:"filename",fn:function(t){var n=t.row;return[n.isDir?r("Icon",{staticClass:"mr5",attrs:{type:"ios-folder-outline"}}):r("Icon",{staticClass:"mr5",attrs:{type:"ios-document-outline"}}),r("span",[e._v(e._s(n.filename))])]}},{key:"isWritable",fn:function(t){var n=t.row;return[r("span",{domProps:{textContent:e._s(n.isWritable?"是":"否")}})]}},{ke
|