"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[750],{31243:(e,t,o)=>{o.d(t,{Z:()=>r});var i=o(1519),n=o.n(i)()((function(e){return e[1]}));n.push([e.id,".component-only-office[data-v-05ff7f64]{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.component-only-office .placeholder[data-v-05ff7f64]{flex:1;height:100%;width:100%}.component-only-office .office-loading[data-v-05ff7f64]{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,o)=>{o.d(t,{Z:()=>r});var i=o(1519),n=o.n(i)()((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},58750:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var i=o(20629);function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function r(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";null!==this.docEditor&&(this.docEditor.destroyEditor(),this.docEditor=null);var o="zh";switch(this.getLanguage()){case"CN":case"TC":o="zh";break;default:o="en"}var i=this.code||this.value.id,n=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,r="".concat(this.fileType,"-").concat(r,"-").concat(t),a="http://nginx/api/file/content/?id=".concat(i,"&token=").concat(this.userToken);this.historyId>0&&(r+="-".concat(this.historyId),a+="&history_id=".concat(this.historyId));var s={document:{fileType:this.fileType,title:n,key:r,url:a},editorConfig:{mode:"edit",lang:o,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(i,"&token=").concat(this.userToken)},events:{onDocumentReady:this.onDocumentReady}};if(/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(s.document.title=" "),$A.leftExists(i,"msgFile_")?s.document.url="http://nginx/api/dialog/msg/download/?msg_id=".concat($A.leftDelete(i,"msgFile_"),"&token=").concat(this.userToken):$A.leftExists(i,"taskFile_")&&(s.document.url="http://nginx/api/project/task/filedown/?file_id=".concat($A.leftDelete(i,"taskFile_"),"&token=").concat(this.userToken)),(this.readOnly||this.historyId>0)&&(s.editorConfig.mode="view",s.editorConfig.callbackUrl=null,!s.editorConfig.user.id)){var c=$A.getStorageInt("viewer");c||(c=$A.randNum(1e3,99999),$A.setStorage("viewer",c)),s.editorConfig.user.id="viewer_"+c,s.editorConfig.user.name="Viewer_"+c}this.$nextTick((function(){e.docEditor=new DocsAPI.DocEditor(e.id,s)}))},onDocumentReady:function(){this.$emit("on-document-ready",this.docEditor)}}};var c=o(93379),l=o.n(c),d=o(31243),f={insert:"head",singleton:!1};l()(d.Z,f);d.Z.locals;var u=o(81249),h={insert:"head",singleton:!1};l()(u.Z,h);u.Z.locals;const p=(0,o(51900).Z)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"component-only-office"},[e.loadError?o("Alert",{staticClass:"load-error",attrs:{type:"error","show-icon":""}},[e._v(e._s(e.$L("组件加载失败!")))]):e._e(),e._v(" "),o("div",{staticClass:"placeholder",attrs:{id:e.id}}),e._v(" "),e.loadIng>0?o("div",{staticClass:"office-loading"},[o("Loading")],1):e._e()],1)}),[],!1,null,"05ff7f64",null).exports}}]);