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.
2 lines
257 KiB
2 lines
257 KiB
6 years ago
|
webpackJsonp([7],{1001:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(984),i=n.n(r);for(var o in r)"default"!==o&&function(e){n.d(t,e,function(){return r[e]})}(o);var a=n(1004);var s=function(e){n(1002)},l=n(27)(i.a,a.a,!1,s,null,null);t.default=l.exports},1002:function(e,t,n){var r=n(1003);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(35)("3cf3e1ac",r,!0,{})},1003:function(e,t,n){(e.exports=n(34)(!1)).push([e.i,".no-type-model{text-align:center;padding-top:160px}.no-type-model>p{padding-top:10px;color:#666}",""])},1004:function(e,t,n){"use strict";var r={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"no-type-model"},[t("img",{attrs:{src:n(1005),alt:""}}),this._v(" "),t("p",[this._v(this._s(this.$t("不支持在线查看类型")))])])},staticRenderFns:[]};t.a=r},1005:function(e,t,n){e.exports=n.p+"images/down_error.png?4339cb288e29d420babb7d7c848b9093"},1049:function(e,t,n){"use strict";t.__esModule=!0;var r=g(n(28)),i=n(123),o=g(n(1001)),a=n(807),s=g(n(682)),l=n(983),c=n(701),u=n(735),d=g(n(646)),f=g(n(226)),h=g(n(663)),p=g(n(654)),m=g(n(650));function g(e){return e&&e.__esModule?e:{default:e}}var v=void 0;t.default={name:"file-details",data:function(){return{name:"",isNoType:!0,isLoading:!1,filtTypeArr:a.filtTypeArr,loadingIndex:0,mode:"python",isData:!0,size:null,msg:""}},props:{},methods:Object.assign({},(0,i.mapActions)("resource",["getViewResources","updateContent"]),{_go:function(){this.$router.push({name:"file"})},_downloadFile:function(){(0,c.downloadFile)("/escheduler/resources/download",{id:this.$route.params.id})},_getViewResources:function(){var e=this;this.isLoading=!0,this.isData=!0,this.msg="",this.getViewResources(this._rtParam).then(function(t){e.name=t.data.alias.split(".")[0],t.data?(e.isData=!0,e._handlerEditor().setValue(t.data.content),v.lineCount()<1e3&&(e.isData=!1),setTimeout(function(){$(".code-mirror-model").scrollTop(12).scrollLeft(0)},200)):e.isData=!1,e.isLoading=!1}).catch(function(t){e.msg=t.msg||"error",e.$message.error(t.msg||""),e.isLoading=!1})},_onUp:r.default.debounce(function(){this.loadingIndex=this.loadingIndex-2,this._editorOff(),this._getViewResources()},1e3,{leading:!1,trailing:!0}),_onDown:r.default.debounce(function(){this.loadingIndex=this.loadingIndex+2,this._editorOff(),this._getViewResources()},1e3,{leading:!1,trailing:!0}),_editorOff:function(){v=null,$(".CodeMirror").remove()},_handlerEditor:function(){var e=this,t=$(".home-main").height()-160;return(v=(0,s.default)("code-details-mirror",{mode:this.mode})).display.wrapper.style.height=t+"px",this.scroll=function(n){var r=n.doc,i=r.scrollTop,o=r.height;i+t>o&&e.isData&&e._onDown(),i<2&&e.loadingIndex>0&&e._onUp()},v.on("scroll",this.scroll),v}}),watch:{},created:function(){var e=r.default.split(f.default.getItem("file"),"|",2),t=e[0],n=e[1],i=t.lastIndexOf("."),o=t.substring(i,t.length);this.mode=l.handlerSuffix[o],this.size=(0,u.bytesToSize)(parseInt(n)),this.isNoType=r.default.includes(this.filtTypeArr,r.default.trimStart(o,"."))},mounted:function(){this.isNoType&&this._getViewResources()},destroyed:function(){v&&(v.toTextArea(),v.off($(".code-details-mirror"),"scroll",this.scroll))},computed:{_rtParam:function(){return{id:this.$route.params.id,skipLineNum:parseInt(""+(this.loadingIndex?this.loadingIndex+"000":0)),limit:parseInt((this.loadingIndex?this.loadingIndex+2:2)+"000")}}},components:{mListConstruction:m.default,mNoType:o.default,mSpin:d.default,mSecondaryMenu:p.default,mNoData:h.default}}},1162:function(e,t,n){var r=n(1163);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(35)("3225b9bd",r,!0,{})},1163:function(e,t,n){(e.exports=n(34)(!1)).push([e.i,".file-details-content{width:100%;background:#fff;padding-bottom:20px}.file-details-content>h2{line-height:60px;text-align:center;padding-bottom:6px;position:relative}.file-details-content>h2 .down{position:absolute;right:0;top:0}.file-details-content>h2 .down>i{font-size:20px;color:#2d8cf0;cursor:pointer;vertical-align:middle}.file-detai
|
||
|
//# sourceMappingURL=7.2cb1790.js.map
|