(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e572c5f"],{1017:function(t,e,n){},"14d8":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"file-box"},[n("div",{staticClass:"header flex-between"},[n("div",[n("span",{staticClass:"el-icon-arrow-left",on:{click:function(e){return e.stopPropagation(),t.handleClose(e)}}}),t._v(t._s(t.file.name)+"."+t._s(t.file.file_ext))]),t._v(" "),n("el-button",{directives:[{name:"show",rawName:"v-show",value:t.editBtn,expression:"editBtn"}],attrs:{loading:t.loading,size:"small",type:"primary"},on:{click:t.save}},[t._v("保存")])],1),t._v(" "),n("div",{staticClass:"main"},[n(t.type,{ref:"fileEdit",tag:"component",attrs:{fid:t.fid,file:t.file,url:t.file.file_url,editBtn:t.editBtn},on:{closeLoading:t.closeLoading}})],1)])},a=[],d=n("e3e1"),l={name:"",components:{docx:function(){return Promise.all([n.e("chunk-3a8b7c00"),n.e("chunk-0c1f8b44")]).then(n.bind(null,"9b10"))},md:function(){return Promise.all([n.e("chunk-634267b8"),n.e("chunk-cf7857ea")]).then(n.bind(null,"15be"))},mp3:function(){return n.e("chunk-7705376e").then(n.bind(null,"ac61a"))},mp4:function(){return n.e("chunk-2d0cc0e4").then(n.bind(null,"4bff"))},pdf:function(){return Promise.all([n.e("chunk-f924c850"),n.e("chunk-e419ed76")]).then(n.bind(null,"34f2"))},txt:function(){return n.e("chunk-a4dbfee8").then(n.bind(null,"b1cb"))},office:function(){return n.e("chunk-50e0b98c").then(n.bind(null,"0378"))},docxEdit:function(){return Promise.all([n.e("chunk-4ab6739a"),n.e("chunk-3dbe5a7a")]).then(n.bind(null,"6122"))},xlsxEdit:function(){return Promise.all([n.e("chunk-dfb654d6"),n.e("chunk-88e5e2be")]).then(n.bind(null,"83d3"))}},data:function(){return{type:"",file:{},id:0,fid:0,loading:!1,editBtn:!1}},created:function(){this.id=this.$route.query.id,this.$route.query.fid?(this.fid=this.$route.query.fid,this.getFileInfo()):this.getAttachInfo()},methods:{getFileInfo:function(){var t=this;Object(d["Y"])(this.fid,this.id).then((function(e){t.handleRes(e)}))},getAttachInfo:function(){var t=this;Object(d["X"])(this.id).then((function(e){t.handleRes(e)}))},handleClose:function(){window.opener=null,window.history.back()},handleRes:function(t){this.file=t.data,this.type=t.data.file_ext,t.data.name||(t.data.name=t.data.file_name.split(".")[0]),document.title=t.data.name,t.data.auth&&1==t.data.auth.update&&["docx","xlsx","txt","md","html"].includes(t.data.file_ext)?("html"==t.data.file_ext&&(this.type="md"),this.editBtn=!0,"docx"==t.data.file_ext?this.type="docxEdit":"xlsx"==t.data.file_ext&&(this.type="xlsxEdit")):["doc","pptx","ppt","xlsx","docx","xls"].includes(t.data.file_ext)&&(this.type="office")},closeLoading:function(){this.loading=!1},save:function(){this.loading=!0,"docxEdit"==this.type?this.$refs.fileEdit.wordOption():"xlsxEdit"==this.type?this.$refs.fileEdit.exportData(1):("txt"==this.type||"md"==this.type)&&this.$refs.fileEdit.save()}}},s=l,c=(n("beb7"),n("2877")),o=Object(c["a"])(s,i,a,!1,null,"6c854ed7",null);e["default"]=o.exports},beb7:function(t,e,n){"use strict";n("1017")}}]);