"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[492,911,588],{78828:(e,t,i)=>{i.d(t,{Z:()=>r});var n=i(1519),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".component-only-office[data-v-145e3511]{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.component-only-office .placeholder[data-v-145e3511]{flex:1;height:100%;width:100%}.component-only-office .office-loading[data-v-145e3511]{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:2}",""]);const r=o},8915:(e,t,i)=>{i.d(t,{Z:()=>r});var n=i(1519),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".single-file-task[data-v-59b6c661]{align-items:center;display:flex}.single-file-task .ace_editor[data-v-59b6c661],.single-file-task .no-support[data-v-59b6c661],.single-file-task .preview-iframe[data-v-59b6c661]{border:0;height:100%;left:0;margin:0;outline:0;padding:0;position:absolute;top:0;width:100%}.single-file-task .preview-iframe[data-v-59b6c661]{background:0 0;float:none;max-width:none}.single-file-task .no-support[data-v-59b6c661],.single-file-task .view-editor[data-v-59b6c661]{align-items:center;display:flex;justify-content:center}",""]);const r=o},3911:(e,t,i)=>{i.r(t),i.d(t,{default:()=>u});var n=i(20629);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function s(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i{i.r(t),i.d(t,{default:()=>f});var n=i(20629);function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t0?i("div",{staticClass:"office-loading"},[i("Loading")],1):e._e()])}),[],!1,null,"145e3511",null).exports},96492:(e,t,i)=>{i.r(t),i.d(t,{default:()=>c});var n=i(3911);const o={components:{OnlyOffice:i(35588).default,AceEditor:n.default},data:function(){return{loadIng:0,fileDetail:{}}},mounted:function(){},watch:{$route:{handler:function(){this.getInfo()},immediate:!0}},computed:{title:function(){var e=this.fileDetail.name;return e||"Loading..."},isCode:function(){return 1==this.fileDetail.file_mode},codeContent:function(){return this.isCode?this.fileDetail.content:""},codeExt:function(){return this.isCode?this.fileDetail.ext:"txt"},isOffice:function(){return 2==this.fileDetail.file_mode},officeContent:function(){return{id:this.isOffice?this.fileDetail.id:0,type:this.fileDetail.ext,updated_at:this.fileDetail.created_at,name:this.title}},officeCode:function(){return this.isOffice?"taskFile_"+this.fileDetail.id:""},isPreview:function(){return 3==this.fileDetail.file_mode},previewUrl:function(){return this.isPreview?$A.apiUrl("../fileview/onlinePreview?url="+encodeURIComponent(this.fileDetail.url)):""}},methods:{getInfo:function(){var e=this,t=$A.runNum(this.$route.params.id);t<=0||(this.loadIng++,this.$store.dispatch("call",{url:"project/task/filedetail",data:{file_id:t}}).then((function(t){var i=t.data;e.loadIng--,e.fileDetail=i})).catch((function(t){var i=t.msg;e.loadIng--,$A.modalError({content:i,onOk:function(){e.$Electron&&window.close()}})})))}}};var r=i(93379),s=i.n(r),a=i(8915),l={insert:"head",singleton:!1};s()(a.Z,l);a.Z.locals;const c=(0,i(51900).Z)(o,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"single-file-task"},[i("PageTitle",{attrs:{title:e.title}}),e._v(" "),e.loadIng>0?i("Loading"):[e.isCode?i("AceEditor",{staticClass:"view-editor",attrs:{ext:e.codeExt,readOnly:""},model:{value:e.codeContent,callback:function(t){e.codeContent=t},expression:"codeContent"}}):e.isOffice?i("OnlyOffice",{attrs:{code:e.officeCode,readOnly:""},model:{value:e.officeContent,callback:function(t){e.officeContent=t},expression:"officeContent"}}):e.isPreview?i("iframe",{staticClass:"preview-iframe",attrs:{src:e.previewUrl}}):i("div",{staticClass:"no-support"},[e._v(e._s(e.$L("不支持单独查看此消息")))])]],2)}),[],!1,null,"59b6c661",null).exports}}]);