mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
2 lines
1.6 KiB
JavaScript
Vendored
2 lines
1.6 KiB
JavaScript
Vendored
import n from"./FileContent.03a22ace.js";import l from"./FilePreview.af93edd1.js";import{n as s}from"./app.256678e2.js";import"./IFrame.c83aa3a9.js";var a=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"single-file"},[t("PageTitle",{attrs:{title:e.pageName}}),e.loadIng>0?t("Loading"):e.fileInfo?[e.isPreview?t("FilePreview",{attrs:{code:e.code,file:e.fileInfo,historyId:e.historyId,headerShow:!e.$isEEUiApp}}):t("FileContent",{attrs:{file:e.fileInfo},model:{value:e.fileShow,callback:function(r){e.fileShow=r},expression:"fileShow"}})]:e._e()],2)},f=[];const u={components:{FilePreview:l,FileContent:n},data(){return{loadIng:0,code:null,fileShow:!0,fileInfo:null}},mounted(){},computed:{historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},isPreview(){return this.windowSmall||this.code||this.historyId>0||this.fileInfo&&this.fileInfo.permission===0},pageName(){let e=this.fileInfo?this.fileInfo.name:"";return this.$route.query&&this.$route.query.history_at&&(e+=` [${this.$route.query.history_at}]`),e}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){let{codeOrFileId:e}=this.$route.params,i={id:e};if(/^\d+$/.test(e))this.code=null;else if(e)this.code=e;else return;setTimeout(t=>{this.loadIng++},600),this.$store.dispatch("call",{url:"file/one",data:i}).then(({data:t})=>{this.fileInfo=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{window.close()}})}).finally(t=>{this.loadIng--})}}},o={};var h=s(u,a,f,!1,d,"fab0e29c",null,null);function d(e){for(let i in o)this[i]=o[i]}var I=function(){return h.exports}();export{I as default};
|