"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[547,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},79303:(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-msg[data-v-5f9f5a76]{align-items:center;display:flex}.single-file-msg .ace_editor[data-v-5f9f5a76],.single-file-msg .no-support[data-v-5f9f5a76],.single-file-msg .preview-iframe[data-v-5f9f5a76]{border:0;height:100%;left:0;margin:0;outline:0;padding:0;position:absolute;top:0;width:100%}.single-file-msg .preview-iframe[data-v-5f9f5a76]{background:0 0;float:none;max-width:none}.single-file-msg .no-support[data-v-5f9f5a76],.single-file-msg .view-editor[data-v-5f9f5a76]{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},70547:(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,msgDetail:{}}},mounted:function(){},watch:{$route:{handler:function(){this.getInfo()},immediate:!0}},computed:{title:function(){var e=this.msgDetail.msg;return e&&e.name?e.name:"Loading..."},isCode:function(){return"file"==this.msgDetail.type&&1==this.msgDetail.file_mode},codeContent:function(){return this.isCode?this.msgDetail.content:""},codeExt:function(){return this.isCode?this.msgDetail.msg.ext:"txt"},isOffice:function(){return"file"==this.msgDetail.type&&2==this.msgDetail.file_mode},officeContent:function(){return{id:this.isOffice?this.msgDetail.id:0,type:this.msgDetail.msg.ext,updated_at:this.msgDetail.created_at,name:this.title}},officeCode:function(){return this.isOffice?"msgFile_"+this.msgDetail.id:""},isPreview:function(){return"file"==this.msgDetail.type&&3==this.msgDetail.file_mode},previewUrl:function(){return this.isPreview?$A.apiUrl("../fileview/onlinePreview?url="+encodeURIComponent(this.msgDetail.url)):""}},methods:{getInfo:function(){var e=this,t=$A.runNum(this.$route.params.id);t<=0||(this.loadIng++,this.$store.dispatch("call",{url:"dialog/msg/detail",data:{msg_id:t}}).then((function(t){var i=t.data;e.loadIng--,e.msgDetail=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(79303),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-msg"},[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,"5f9f5a76",null).exports}}]);