"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[309],{38176:(e,t,i)=>{i.d(t,{Z:()=>r});var o=i(1519),n=i.n(o)()((function(e){return e[1]}));n.push([e.id,".component-only-office[data-v-117dc0fe]{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.component-only-office .placeholder[data-v-117dc0fe]{flex:1;height:100%;width:100%}.component-only-office .office-loading[data-v-117dc0fe]{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:2}",""]);const r=n},81249:(e,t,i)=>{i.d(t,{Z:()=>r});var o=i(1519),n=i.n(o)()((function(e){return e[1]}));n.push([e.id,".component-only-office .load-error{align-items:center;display:flex;left:50%;padding:8px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.component-only-office .load-error .ivu-alert-icon{margin-left:4px;margin-right:8px;position:static}",""]);const r=n},2309:(e,t,i)=>{i.r(t),i.d(t,{default:()=>p});var o=i(20629);function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function r(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";null!==this.docEditor&&(this.docEditor.destroyEditor(),this.docEditor=null);var i="zh";switch(this.getLanguage()){case"CN":case"TC":i="zh";break;default:i="en"}var o=this.code||this.value.id,n=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,r="".concat(this.fileType,"-").concat(t||o);this.historyId>0&&(r+="-".concat(this.historyId));var a={document:{fileType:this.fileType,title:n,key:r,url:"http://nginx/api/".concat(this.fileUrl)},editorConfig:{mode:"edit",lang:i,user:{id:String(this.userInfo.userid),name:this.userInfo.nickname},customization:{uiTheme:this.themeIsDark?"theme-dark":"theme-classic-light",forcesave:!0,help:!1},callbackUrl:"http://nginx/api/file/content/office?id=".concat(o,"&token=").concat(this.userToken)},events:{onDocumentReady:this.onDocumentReady}};if(/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(a.document.title=" "),(this.readOnly||this.historyId>0)&&(a.editorConfig.mode="view",a.editorConfig.callbackUrl=null,!a.editorConfig.user.id)){var s=$A.getStorageInt("viewer");s||(s=$A.randNum(1e3,99999),$A.setStorage("viewer",s)),a.editorConfig.user.id="viewer_"+s,a.editorConfig.user.name="Viewer_"+s}this.$nextTick((function(){e.docEditor=new DocsAPI.DocEditor(e.id,a)}))},onDocumentReady:function(){this.$emit("on-document-ready",this.docEditor)}}};var c=i(93379),l=i.n(c),d=i(38176),f={insert:"head",singleton:!1};l()(d.Z,f);d.Z.locals;var u=i(81249),h={insert:"head",singleton:!1};l()(u.Z,h);u.Z.locals;const p=(0,i(51900).Z)(s,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-only-office"},[e.$A.isDesktop()?[e.loadError?i("Alert",{staticClass:"load-error",attrs:{type:"error","show-icon":""}},[e._v(e._s(e.$L("组件加载失败!")))]):e._e(),e._v(" "),i("div",{staticClass:"placeholder",attrs:{id:e.id}})]:i("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}),e._v(" "),e.loading?i("div",{staticClass:"office-loading"},[i("Loading")],1):e._e()],2)}),[],!1,null,"117dc0fe",null).exports}}]);